Twine and interactive fiction

Readers of a certain age may recall the Choose Your Own Adventure books for children, that were popular a few decades ago.

Ahead of you, Robin Hood is captured by the Sheriff of Nottingham’s men. As the remaining member of his band at large in the forest it’s up to you to rescue Maid Marian. Do you run back the way you came, to talk to the woodcutter (turn to page 7) or follow the Sheriff’s men as they lead Robin away (turn to page 8)?

That kind of thing. Basically it was a thrilling short novel in which the reader made the decisions, usually after reading only a page or two of text, and thus could read the same book multiple times, having slightly different experiences, and feeling like they were in the middle of the action. I came across a couple of essentially novelty versions for adults in the late nineties but on the whole I’d only heard of the format being used for children’s books.

Having also grown up on text-based computer adventure games (because graphics were a luxury thirty years ago) and sharing a love of noir, it was perhaps inevitable that OneMonkey and I would drift into entertaining ourselves by starting to write a detective story on the computer, with the intention that the plot could pan out in different ways depending on the decisions made at each turn.

Four and a half years ago during a hot, lazy summer we started fooling around with the tale of an unnamed private detective who lived above a chip shop somewhere near Middlesbrough, and what happened when he came home from a poetry recital one evening to find the body of one of his clients sprawled on his kitchen lino:

Yet here she was in the fringes of suburbia, sprawled on my beige and orange linoleum. She’d only been looking for a missing spaniel when she pitched up at my office last week, and wherever the dog was it wouldn’t be in my kitchen. My cat would never allow it.

Instead of the typical second person narrative (you go into the kitchen…) we opted for the traditional noir first person (I stepped over the threshold…) with the reader acting as the detective’s conscience, inner voice, or maybe guiding deity (Should I call the police or slip out the back door?).

Because we both have programming backgrounds and because it probably didn’t cross our minds that anyone else would be daft enough to do stuff like this, we used our markup facility of choice (txt2tags) and made a simple html version so you could read a passage of text, click on one of the links and move to the next passage. The only trouble was, the way we were keeping track of the interconnectedness was to draw decision trees on paper and magnet them to the side of the filing cabinet, and we were running out of filing cabinet. Fun as it had been, we were getting tangled in our own storylines and we shelved the poor detective a couple of years ago.

Fast forward to the Christmas holidays 2019, when I was formatting a radio script to send to the BBC Script Room. OneMonkey, convinced there must be specialist script software that would stop me swearing so much (and indeed, I’ve downloaded a demo of Fade In but I haven’t tried it yet), was trawling the web. He found a nifty thing called Twine, which wouldn’t help with the radio script but was just the thing we needed to get our detective back into his favourite thinking-chair.

Twine is open source (did I ever mention I use Linux? And LibreOffice, and Vim, and…) and is also incredibly simple to use. I find it just visual enough to be helpful without being overwhelming, and at its simplest you can use the default set-up and make simple text passages with simple links (like we were doing in html before), and be up and running straight away. Within an hour we’d downloaded Twine, learnt enough to get started, copied across our existing story and were examining the incomplete pathways.

Screenshot 2020-03-01 at 17.09.16

The layout of our story in Twine, which makes me think of international flight-paths

We set up a couple of tags to add colour-coding, so we know which ones are still only headings, with no text added, and which ones are end-points. OneMonkey got enthusiastic on the coding front and added an inventory (represented here by the disconnected set of items on the left-hand side) so at any time we know what our hero has in his pockets, but this is very much an optional extra.

Since our adoption of this new software approach, all we’ve done is untangle a couple of threads, add an inventory, work out where we’d got to, and sketch out a couple of scenes to be used later (the disconnected items on the right-hand side). It’s not often we’ve both got the time (or maybe I mean energy) to sit down and work on this together, but Twine certainly seems to be a useful way to do it. You can do a test run through the ‘game’ (I can’t figure out what terminology to use for this venture, I would naturally say interactive fiction but they get referred to as games) to see how it’s going so far, or you can sit in storyboard mode (as shown in the screenshot above) and edit the passages, add links etc.

As I understand it, you can get even more advanced by adding images, sounds (say you want to have a distinctive door-opening hum every time the character goes through a door), and we’ve used conditionals in a couple of places already. By ‘conditionals’ I mean the text shown, and/or the decisions available are conditional on what’s already happened – if the detective has visited the bathroom already then he will behave in a different way when he enters the bedroom, for instance. In our detective’s case he’s looking for clues and deciding what to do next based on them, so if he encounters things in a different order then he might jump to different conclusions. If you’re a programming beginner, you might want to stick to basic building blocks of narrative at first and only bring this sort of nuance in once you feel more confident.

As with anything of this nature, a quick search for how-to articles, or YouTube tutorials should turn up helpful pointers. If you want some inspiration there’s a community site with links to interactive fiction that people have constructed, you can even search for ones made using Twine.

We may never guide our detective through all the twists of his fishy plot but at least Twine has given us a way to progress, and if Above a Chip Shop in Teesside is ever available to the public, I’ll let you know.

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 )

Google photo

You are commenting using your Google 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.