if(adventure): Pre-Post-Mortem Part I
![]() |
| A Code-Based Adventure Game |
Typically with my projects I reach a point where I consider it complete before moving on to the next one. Not necessarily "done," but in a state where I've accomplished what I set out to do and can shelf it. Then there's projects like if(adventure). This is the sort of project that has glared at me from its spot on the shelf for months and constantly makes rude gestures to remind me that it's still not complete.
The inspiration behind if(adventure) was to create a Choose Your Own Adventure book that is played through code. Rather than decisions leading to different pages of a book, the player would control the values of variables, which lead down logic paths and to function calls. It was an idea a friend of mine and I had toyed around with during our senior year at RIT, but never got around to actually developing.
Fast-forward to December 2016, Ludum Dare 37 was coming up, so I decided to take a stab at making this thing a reality. I don't usually go into a game jam with a game in mind to make, and I had also never done a jam solo before, but there's a first time for everything. The theme of the jam was "One Room" which did not really fit the game I wanted to make, but I didn't really care. I just wanted to make this game.
I decided to make it an HTML5 web game, programmed in Haxe and compiled to JavaScript. I figured HTML and CSS would be the easier way to layout and format the text. I was half-right. It was certainly easier to setup initially, though consistency across browsers and devices was an issue. More on that later. I knew the 'code' aspect of the game would be the harder part to develop, so I took the time to properly plan out the hierarchy of classes and how they would behave. I would go into more detail on that, but that might be too educational for this blog and we can't have that. Though, I do recommend taking a peek at the source code if you're interested.
All in all, the jam went fantastic for the first 2 of the 3 days. I paced myself surprisingly well, going so far as to make myself a little to-do list for each day. By the start of day 3, I had completed all the 'code' related systems, leaving me with 10 or so hours to create the actual gameplay. It shouldn't have taken much time. I simply needed to set up a handful of choices for the player to make and link them together. That's where things started to go wrong. Why? You're probably not asking, but we'll talk about that next time.
