Code for review: Bestiary

Here’s another version of the procedurally-generative Bestiary that I’m building. Note that it does not yet meet the requirements for this project (I’ll post those here, too) (for example, my code fills the screen with creature faces, but in your final version of the project, your code will create at least 24 beasts, drawn one at a time to the screen, where each is saved as serial PNG file: For example, beast-001.png, beast-002.png, etc.).

As you’re reviewing this code, pay special attention to the three “custom function” scripts.

Working code: Procedural Bestiary

I’m sharing this code — which we discussed very briefly on Thursday of this past week — so that you can review some of the techniques I’m using in order to generate random faces and save that information inside each “obj_head” instance (in case I want to do something with it later).

An early bestiary

NB that the code mostly lacks comments, because it is such an early draft. But that’s a great opportunity for you to try your hand at reading through the code and making sense of it where you can. I have tried to be consistent and explicit in the code itself about what is happening — there won’t be much weirdness. So have a look!

Also worth looking at: There are two “custom functions” (which appear as “script assets”) in this game. Take a look at them, too.