The Harbinger's Head
Games

Learning How to Write Interactive Fiction: Diving in Headfirst With “The Harbinger’s Head”

I still remember the day I read my first Choose Your Own Adventure (CYOA) novel. I was a child, maybe 10 or so at the time, and it was December. I was determined to be outside, and my arms and legs were covered in goosebumps, but I barely felt the cold. I sat with my back against the cement base of a street light and my freckle-dusted nose buried in a slim, pale blue volume titled Sunken Treasure. I died at least a hundred times (or so it seemed) but I didn’t care. I was head-over-heels in love.

For a time, I collected second-person style gamebooks like candy. I had a whole shelf full of them, many used and well-worn with the love of readers past. I didn’t play a lot of video games back then—didn’t get to experience the pleasure of exploring the twisting caves of Will Crowther’s Adventure or the other early text adventure games—but I quickly developed a particular fondness for interactive stories and branching narratives. I even tried to write a few of my own in my teens, including a swashbuckling Neopets story which was tragically abandoned halfway through development.

The first interactive fiction story I managed to finish was a Twine adaptation of a short story I’d written for a friend’s project. But it wasn’t until I played Choice of the Dragon that I began to seriously consider making a proper, full-length IF game of my own. And it wasn’t until I began to take my idea for The Harbinger’s Head seriously that I first began to learn how to write interactive fiction.

Step 1: Finding a Story That Fits

Typical writer advice is to read if you want to write. The same holds true, on a more specific level, when learning how to write interactive fiction. To understand how IF works, you have to play it. Whether you go analog and pick up a classic CYOA paperback or prefer the digital route, the important thing is to understand both how a branching narrative works, and what sorts of stories fit that particular format.

The initial idea for The Harbinger’s Head didn’t obviously lend itself to interactive storytelling. The seeds were planted years ago one October day by my 5th grade homeroom teacher. Always a great one for spinning a yarn, he traumatized entertained my class with a version of Washington Irving’s The Legend of Sleepy Hollow that involved tossing into our midst a paper bag containing what we all believed to the horseman’s head. (After much shrieking and confusion, we discovered it was just a basketball stuffed into a latex Halloween mask. Or was it…?)

Years later, when thinking about what sort of IF story I wanted to tell, I considered:

  • What sort of setting I, as a player, would want to spend time in and explore
  • What sort of characters I would be drawn to interacting with
  • What sort of themes would be best explored through interactive, rather than static, fiction

In the end, the answers that came to me were a fantasy setting, creatures from Irish folklore, and death—in particular, the inevitability of it. It’s one thing, after all, to read about characters who must come to terms with the “death and taxes” law of mortal existence. It’s another thing entirely to be directly confronted with that fact of life yourself, even if only in a fictional world. A branching narrative in which death lurked around every corner seemed the perfect frame for my concepts; a mythical 1800s Ireland, the perfect setting.

However, a simple retelling of The Legend of Sleepy Hollow wouldn’t suffice. Ichabod Crane is a well-known character with specific personality parameters; as a player character, he’s too well-defined to offer any real sense of agency or choice. I delved deeper into Irish lore and took inspiration from an unexpected source—anime. For those yet unaware of it, Durarara!  tells the story of Celty, a sweet female Irish dullahan in a fictionalized modern-day Tokyo who has lost her head. I began to wonder how a more classic dullahan might react to such an indignity, and how some poor, innocent passerby might become entangled in his adventure—and thus, The Harbinger’s Head was born.

Step 2: Programming a Branching Narrative

Probably the biggest barrier to learning how to write interactive fiction—at least for digital platforms—is code. I myself have never taken a programming class. I (used to) know some very basic HTML, and gained a temporary functional knowledge of Twine which I have since misplaced somewhere in my gray matter. I can’t speak to the learning curve for Python or other programming languages, but I do now have two years of experience working with ChoiceScript.

To any writers out there who find IF compelling but coding confusticating: don’t let it hold you back. Choose a programming language (or program) that’s beginner-friendly. If the one you’re working in isn’t working for you, try a different one. Twine offers a visual alternative that looks more like a conspiracy theorist’s concept map than a wall of code, while ChoiceScript was created by Choice of Games (CoG) with “authors with no programming experience” in mind. I chose, and stuck with, ChoiceScript mainly because of how much I enjoy existing games in that language.

Step 3: Writing from All Angles

Non-interactive fiction follows linear plot lines. There may be many, and they may intersect at various points to create an intricate narrative tapestry. They may even be presented in a nonlinear fashion. But, just like a tapestry, non-IF is still made up of single, linear threads with clear beginnings and ends. Interactive fiction, on the other hand, involves decision trees—branches, not threads, with multiple endpoints. Instead of following and interweaving various subplots, your main challenge as an IF author is keeping track of all possible paths and outcomes. When figuring out how to write your interactive fiction story, always remember that the message of your narrative cannot depend on a single specific outcome. Just the opposite, in fact—your story should feel more engaging because of its potential to veer off the tracks.

The vital role which player choice plays in an IF game also impacts how you write your main character. Unlike regular fiction, in IF fiction, basically blank protagonists tend to be the most useful and effective. While some stories may work well with the player stepping into a defined character’s shoes, more often than not the draw of IF is to be able to roleplay as you like—either as yourself, or as a fictional persona you enjoy. For The Harbinger’s Head, I allowed players to choose their name, gender, and profession. I also purposely avoided giving the player character dialogue in order to give the player room to imagine a voice and manner of speaking of their choice.

The opposite is true of supporting characters. Even minor characters, if they interact with the player character at all, must be developed well enough that you can write how they would react to multiple possible interactions. Several characters in The Harbinger’s Head only appear in a single scene or chapter, yet my notes contain brief personal histories and personality quirks for all of them. Interacting with the environment and supporting characters is the core of an IF story—the more believable they are, the more engaging it will be to interact with them.

The same, of course, goes for the setting. Like any good story, the world of an IF novel should feel as real and alive as the characters who inhabit it—and should be just as entertaining to interact with.

The Harbinger's Head promo art

Step 4: Editing and Testing

Proofreading and revising are part and parcel of writing anything worth reading, but with interactive fiction, there’s an extra step. You have to make sure your story works—both in the literary sense and the functional sense. With ChoiceScript, there are command prompts you can run which test for basic programming errors, like missing or broken code or branches that don’t lead anywhere. I must have run those tests a hundred times, until at last every one of them returned results with zero errors reported.

But computers can’t tell you if your story contains continuity errors, or if choices seem to lead in the wrong direction. For that, you need beta testers. Thanks to some very patient friends and the wonderful CoG forum community, I was able to identify and fix several minor issues and one glaring error that led people who had chosen one profession to seemingly switch abruptly to another. These are the sorts of things you want to find during the beta period—because the last thing you want is for them to show up in the final release, especially if it’s pay-to-play.

Step 5: Sharing the Story

For The Harbinger’s Head, I made a conscious choice not to include in-game art, graphics, or sound. I wanted the player to be able to conjure up their own interpretations of how the world and characters looked and felt, and act accordingly. However, not all IF stories are entirely text-based. Some include limited auditory and/or visual elements, such as character art or sound effects for special events, and visual novels rely on compelling imagery to accompany the text.

However, just as novels need an intriguing cover design to catch a potential reader’s eye, interactive novels require virtual cover art to draw in prospective players. In my case, I’m lucky enough to count several talented artists as friends. I asked the lovely Raquel Kidd to bring my headless harbinger to life in full color, and as usual, the results did not disappoint. The art she created for my game has been used for everything from store icons to ad banners to the lead image for this very post. I’m thinking I need to get it printed sometime and have it framed. (Seriously, Raquel, you rock.)

Once the art was done and the final tests run, it was time to publish. In the case of The Harbinger’s Head, this step was taken care of for me—Choice of Games officially published my IF novel on Steam, Google Play, and the Hosted Games iOS app on July 19. Other platforms may offer other options, but for my situation (in which my writing time is limited as it is), this made the most sense. Since its release, it’s been downloaded over 1,000 times and has maintained a 4.5/5 star rating—and that’s just on Google Play!

And honestly, I couldn’t be happier. That’s at least 1,000 people who read my words, played my story, and walked away with my characters in their heads. I even got to watch someone play my game in real-time via a YouTube Let’s Play series. That’s the terror and joy of publishing and sharing an IF story—knowing other people are playing in the sandbox you created, and (hopefully) enjoying it.

The Harbinger’s Head is available to purchase now via Steam, Google Play, and the Hosted Games iOS app.

Writer, gamer, geek. Author of The Harbinger's Head, chiaroscuro, and more.