Making story-writing possible

Today I hit a decent sized milestone in getting the first draft of the engine’s “event” and “game state” sub systems working well enough to write most of the prologue (on the way to Enceladus). Here’s what the first moments of gameplay will look like, roughly. To summarize, the captain calls you onto the bridge, and when you get there and talk to him he tells you what’s going on. Then, when you talk to him again, he says something different.

Tada, story telling! With these basic building blocks I can *almost* write the entire first scene of the game — pretty sure I just need to make it so doors can lock and unlock and then write all the dialog and state-logic, and I’m there.

In designing this sort of thing, one always runs the risk of going so far up your own butt that you need climbing gear to get back out. Seriously, this is like CS porn: I’m creating a framework that will track and then execute arbitrary events to transmute game state. And when I talk about game state, I don’t mean keeping track of where the characters and bullets are; I mean the meta-state, such as “have I talked to that guy yet?” and “should this door be locked when the room is loaded?”

I forced myself to take a step back and follow the wisdom of writing code like I just learned to program. I’m here to put pixels on the screen, not write frameworks! So I settled for a system that enumerates all the serious game-state events and features lots of hard-coded logic referring to these states. It’s the simplest thing that could possibly work. You can check out the code on GitHub here and here, then get to work stealing my hard work to make your own blockbuster indie game!

Leave a Reply

Your email address will not be published. Required fields are marked *