I've been procrastinating and haven't really started at all on art or real content yet. I did manage to make a lot of progress on NPC routines though. At this point it's possible for NPCs to:
- Move to different waypoints.
- Wait in place for some amount of time.
- Say something.
- Set a global game-state flag.
- Wait in place until a game-state flag is set (good for synchronizing multiple NPCs).
- Switch to a different routine.
- Conditionally switch to a different routine if a game-state flag is set (this is how player interaction will affect the game mostly).
Originally, each NPC routine was defined in an array, like this:
[ ["message", "Hello world"], ["travel", Vector2(600,300)], ["message", "Goodbye world"], ["wait", 2.0] ]
But I decided it was going to be a pain to define them like that for the actual game, so I wrote a parser to load routines from plain text instead. Now I can define the same routine like this:
message "Hello world" travel 600 300 message "Goodbye world" wait 2.0