Branching Narratives in Interactive Fiction: Day One

Who remembers Infocom’s Zork? The classic text adventure from 1980 that started it all. What? You never played it? You can play it for free here. 147 KB of pure fun and imagination. Adventure deep into the Great Underground Empire and collect the nineteen treasures of Zork. Mind you, that was before you could hop on a website and download a guide or a map. Who drew squares on paper in an attempt to map out the madly branching world and narrative of Zork? You did, didn’t you?

While Zork was written in MDL, today you would maybe use Inform 7 or Ink or any of the other tools for creating interactive fiction, such as Twine or Inklewriter, to name a few. You can also deep dive into the Zork source code and see how it was made. Fascinating!

For this exercise, I chose Twine’s story format Harlowe to create a simple branching narrative, nothing as masterful or complex as Zork. I wanted to include a health bar, some stats, and randomized combat, plus some Easter eggs, which players can discover after repeated visits or clicks. Nothing too complex. You can also add graphics and sound, but then you may want to use inky with Unity integration, instead.

In order to be able to re-use passages, I set up header, footer, and stats routines which are called using the (display:) macro in each passage. In a full story or game, you will have many more subroutine passages to be reused throughout the story. You do not want to have to edit hundreds of passages because you need to change or add something in the stats, header, or footer section. Depending on your project, you may need to pick a specific story format, as well.

What does a simple five-minute-long branching narrative in “Day One” look like?

“Day One” Branching Narrative in Twine

The green rocket icon marks the start of the story. You can see the three subroutines to the left without links. The rest of the passages are branching all over the place and some even link to themselves, e.g., the Attack passage, since the player will have to resolve the fight (win or lose). You will notice that many passages loop back to the beginning of “Entrance”. This is on purpose, to let the player try again, making different choices each time, and discover things previously missed. It’s not linear. Some choices are dead ends, some lead to certain death, and others will unlock achievements. And then there are those deeds, that will result in negative karma, which you then could use to define how NPCs will react further into the story, akin to alignment in role-playing games. The possibilities are endless.

Pretty simple, right? The Twine desktop app keeps your passages organized. You can start writing with zero coding knowledge, thanks to the excellent tooltips and debug features. Of course, if you want to get the most out of it, you will want to visit the Twine Cookbook or explore the many stories available and look at their code. IF tools are also great for prototyping ideas or plotting out your story beats.

You can download the Day One Twine file here.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s