Interactive Fiction in Twine: Space Madness


  • Game Designer
  • Prototyper
  • Writer


Fall 2016

"Space Madness" was my opportunity to play a little in writing and game design, using an interactive prototyping tool with very low barriers to entry called Twine.

As someone who grew up on the Choose Your Own Adventure and Fighting Fantasy series, I was excited to play in a similar sandbox to the interactive fiction I enjoyed as a kid. I was especially interested in extending this prototype with more game-like features, like a simple inventory system and encounters with a roving enemy. It's inspired by space horror like Event Horizon and Dead Space, but a bit self-consciously retro, and with the somewhat humorous instant death scenarios that are familiar from the Fighting Fantasy series.

My Approach

Twine is primarily made up of passages, individual pieces of content with a title and a collection of links to and from other passages. Not surprisingly, it is built on Web technologies because conceptually it's very similar to hypertext. What's neat about Twine, however, is the ability to code behavior with macros, allowing for concepts like inventory, battles with monsters, or random encounters.

Because I only had two days to design/write/build this game, I started out by leaning on Twine's default behaviors. As I developed the concept, I realized that I wanted to dynamically assign descriptions and create the possibility of an enemy being present to a series of passages in the game, so it is a different experience each time you play. I ended up with a graph of explicitly linked passages that showed the overall structure of the story, while a small collection of implicitly linked passages provided the enemy behavior and dynamic content.

Twine Screen 1

More challenging was my goal to create a dynamic experience that changes while the user is playing, which required writing a simple algorithm that sends the enemy to a new location each time the player makes a series of moves. In playtesting, that sometimes left the player stuck in a closet with a bad guy on the other side, so ultimately I had to compromise and a mix of rules and hard-coding values.

In general, I've always been interested in tools that leverage code creatively, so it was fun to add some game mechanics to Space Madness. As someone who has had to learn and use half a dozen scripting languages over my career, it's nice to be able to pick up new one-off languages like Twine's Harlowe and get rolling with it quickly.

Thanks to Twine being based on web technologies it was easy for me to add some additional styles and JavaScript behaviors to the game. I used passage tags in Twine to add classes to the body of the page, and gave the game a retro twist when the player interacts with a terminal.