Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thanks! A name generator could certainly be a good fall back as it doesn't require any art. I've never done anything like that before. Would you pull names from an online resource, or just hard code arrays of (copy and pasted) categorised words and chose them randomly?

That's pretty much up to you! Writing out arrays of words directly into your source file is the least difficult thing to do, but it's also not very flexible. Creating and then reading from .json files is only barely more difficult, at least in python.

If you have a file like birds_north_america.json, you could load its list of birds in python 2.7 with the following:

import json

#assumes birds_north_america.json is in the same directory as your script
bird_json = json.load(open("birds_north_america.json))

#this will print "Birds of North America, grouped by family"
print(bird_json["description"])

#this gets the list of bird families
families = bird_json["birds"]

#this gets the first bird family from the list
ducks = birds[0]

#this prints the first member of the duck/geese/swam family
#which is "Black-bellied Whistling-Duck".
print(ducks["members"][0])

"ducks = birds[0]" should actually read "ducks = families[0]". I'd edit the post directly but itch.io's post edit feature messes up code pretty badly

Thanks for the tips! I think for now I'll stick to doing things the nasty way as I don't want to introduce too many ways to fail when I'm already going to be struggling! That could be a refactor later. :)