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.

Word Parsing Exercise

Update: Here’s a more polished version of the magnetic-poetry demo, which uses a “custom function” version of the word-parsing exercise from this week:

Here’s some material to help you think through the word-parsing exercise from class today (5 October 2021). The PDF file (look for it below) contains all of the code printed out for legibility, while the gamemaker zip can be unzipped and run inside gamemaker. They are almost exactly the same body of code and comments, but the gamemaker code lacks the “arrays are tables” illustration, which I’ve included below.

An array is really just another kind of table.

Also worth looking at: This “refrigerator-magnet-poetry” prototype, which uses the word parser code we looked at today.

A Clock Too Far

Here’s a silly “alternative chronograph” I put together on Friday. It took about 3 hours, all told, including comments. The chronograph doesn’t really make any sense: It’s more of a fanciful design. In itself, though, it was an interesting exercise in playing with sinusoidal waves and simple particles. Download the GameMaker zip below if you want to walk through the code.

Wait, what time is it? Seriously, I have no idea.