Designing Branching Narrative

In the past I have talked about technologies such as Inkle, Undum, Twine, and there are others I haven’t really mentioned: ChoiceScript, StoryNexus, and Varytale, which all use branching narrative with some world state variables as their form of interactive storytelling. Now, if you’ve read Chris Crawford on Interactive Storytelling, you know what he thinks of branching narrative (AKA Choose-Your-Own-Adventure); and he’s right. Branching narrative is a bit too simplistic to be the holy grail of interactive storytelling, but it is the most common form of interactive storytelling today because of its accessibility. In this post, I will attempt to break down the process of designing and writing a branching narrative, and point out some ways to write more complex branching structures. I will also link to other blog posts or articles that I have found useful when researching this topic.

The Branching Narrative

The simplest nonlinear stories use a branching structure; you start at the beginning, are given several options, and those options lead to new choices, which each lead to new choices…this can go on forever, but there is a point where all of these branches become too expensive. If you are writing a branching narrative, similar to one of the old Choose-Your-Own-Adventure books, your story structure might look something like this:


This is called a branching tree, and as you might imagine, with each choice, the amount you have to write increases exponentially. If you were going to write a story with ten choices, two options at each choice, you would have to write 2^10 (which is 1024) branches. That’s a lot of writing. Add one more choice to the game, and you have to write double that: 2048.

To combat this complexity, you can create a foldback structure, where the player has choices, but these branches eventually all lead to the same place. This keeps the number of branches you have to write to a manageable number, but it cheats the player out of making meaningful decisions. What is the point of choosing one path over another, if they both eventually lead to the same conclusion?


So, how do we get the expressiveness of a fully branching narrative and the compactness of a foldback structure? One method that many systems use today is World State.

World State

Tracking a world state allows the writer to create more advanced branching narratives, without writing thousands of nodes. A choice can set a variable (such as true/false, or increase by a factor of 1, etc.). Then, later on, when text is being printed by the computer, it can check that variable and print different text based on the value of that variable. This can limit the choices available to a player, or simply change whether the player character is described as a “he” or “she.”

For example, let’s say you have a story where a certain character can either die or be rescued in one scene near the beginning. This can be set as a variable: Bob_Dead = true. Later on down the road, you write a scene where some of the main characters are sitting around a campfire talking about their tough times. If Bob_Dead is true, then one character might say, “I really miss Bob.” If Bob_Dead is false, then Bob might say something, and nobody will lament his death, because he’s not dead.

You can imagine it like this:


As you can see, earlier decisions affect later decisions because of variables. If the variable is a number that can be increased and decreased, then output can be varied even further. For some interesting results, you can use a number as a chance variable; the higher the variable, the higher your chance of succeeding. Be careful with using random chance, however; you can get some unintended and frustrating results.

Most branching narrative systems today allow variable tracking and conditionals, such as Undum, InkleWriter, ChoiceScript, and Twine.


Choosing Variables

Choosing the proper world state variables is a large part of creating a state-based branching narrative. If you use too many variables, they will get jumbled up into a big mathy mess that is confusing and difficult to work with. It is best to choose a small amount of variables where each variable has a known and defined use inside the branching narrative.

Some variable types:

  • Skills
  • Personality
  • Morality
  • Status
  • Resources
  • World state
  • NPC variables

There are many other types of variables that can be used, but before you blindly start coding variables into your branching narrative, make sure that you know what they are going to be used for and how they are going to be used. Some variables can be simple boolean values, but some should be numbers or strings.

It is very easy to write too many variables into your story on the first draft, especially if you are making it up as you go. However, the more variables you write, the more you will have to remember, and if you have variables that are similar to each other, then they may conflict at some points in the story. For example, if you have a Strength variable, and a Number_of_times_pumped_iron variable, you can probably imagine how these variables overlap. A simpler solution would be to just replace Number_of_times_pumped_iron with Strength, and increase that variable each time the character pumps iron. Otherwise you might run into a situation where there is a strength check, and although the character has a high Number_of_times_pumped_iron score, if their Strength score is low, they will fail the test.

A good resource to read on this topic would be the chapter on Personality Models in Chris Crawford on Interactive Storytelling, especially the second edition. He talks about creating variables with little overlap, while retaining the highest amount of utility. This is called orthogonality, so remember that when you’re googling.



Storylets are basically little snippets of narrative that the player can see, depending on a world-state. For example, if each storylet were a chapter, chapter one would always be visible, and choices inside chapter one would set some qualities that cause other chapters to be visible. Then, when the player returns to the contents, they can choose from the available chapters. So each storylet is a separate narrative, but it influences which other storylets are available and what happens inside them.

A good example of a story using storylets is Bee, by Emily Short. I would definitely recommend reading/playing through it, then reading the two articles linked to at the end of this section.

Two main systems that use storylets are Varytale and StoryNexus. You can probably simulate storylets in InkleWriter, Undum, and Twine, but they aren’t set up explicitly for that.



What choices you make available to the player will largely define how they percieve your story. The choices have to be broad and interesting, but they also have to be manageable from the writer’s perspective. I have played a lot of branching narratives that have pathetic choices; if you’re only giving the player one choice at the end of each story node, then you should ask yourself if you really need a choice there at all.

Choices need to have some effect on the story, otherwise there’s no point for them. They could change some relationship variables, start a new branch of the story, or give your character some advantage that will come in handy later in the story.

The player should also have some idea of how the choice will affect the story. If the player clicks an option, and something completely random happens and changes the story, the player will get frustrated. This is a very common problem; even many high-budget games struggle with this issue. Mass Effect is notorious for this; you may choose an option that seems like a simple question, but then Shepard goes crazy and starts violently interrogating someone. After several playthroughs, I have a pretty good idea of what the writers were thinking, but my experience doesn’t help any first-time players.


Planning with Graphs

Before you open up your branching narrative editor of choice, you should do a little planning. Hopefully you already know about your world, your characters, and some of the possibilities that can happen to them, (if you don’t, read this earlier post) but now you need to start designing the actual branches of your narrative.

The idea behind this is similar to that of The Snowflake Method for writing a novel; you start with the broad strokes, and you add detail later.

Step one: create a high-level storyline that connects all of your main scenes (or storylets, if you’re going that route). Overall, this high-level storyline should be fairly linear; it doesn’t have to be, of course, but adding a lot of branches at this point will mean that you will be writing a lot of content that must be connected to nodes inside of other scenes, and this adds more variables to keep track of…in short, if you want to confuse yourself, go right on ahead. Branching narratives are not easy to create; however, if you plan carefully before you start writing, you may save some headaches later on down the road.

The purpose behind this step is to come up with the overall plot of your story. Yes, branching narratives have a plot, but it branches. Figure out how your story will begin, what things can happen in the middle, and how it ends.


Step two: zoom into each node of the previous graph, and start adding some branches within that node. These nodes can have as many branches as you want, but they should all end up at the same place. Don’t worry; since you have world and character state variables, you can change the text depending on their values. This means two players who end up in the same place may have very different experiences when they get there.

This is where you can really start to add some complexity to your story; figure out the main choices the player can make, and how they affect the world state and future decisions. Write down a list of variables you think you might need, and cross off any that you find you don’t.


As you can see, to get from one main storyline to the next, there are a lot of little options that can branch amongst themselves, but they have to all come back together to one or two main locations.

After this, you can sit down and start writing. You may need to rethink your outlines as you write, if you find problems or decide to add more detail, and there’s nothing wrong with that. As long as you have a roadmap and know where you’re (generally) going.



Whew, that’s been a long one. I hope this brief (yeah, right) overview has helped you somewhat. My intent was not to cover the topic exhaustively, because there is a lot involved in not only planning a branching narrative, but writing prose in general. That is why I added so many links; if there are any subjects you would like more information on, they should help.

7 thoughts on “Designing Branching Narrative

  1. Pingback: (Response) Branching Narratives: Games to Novels, How to Involve the Reader. – Journey Into Digital Storytelling

  2. Pingback: Mission Statement – Roll Character

  3. Pingback: Brief project update, and essential resources for interactive fiction – Nick Petrou – Author

Leave a Comment

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

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