Writing for Video Games: "Branching Stories"

Screenshot from Achromia's new branching story, Control. What will you choose? Available now on Google Play and itch.io.
To celebrate the recent release of Achromia's two video games, OP9 and Control, which I had the pleasure of writing for, I'm excited to share this article on how to write your own video game scripts! Don't forget to check out their games on itch.io (for Windows, Mac, and Linux users) and Google Play (for Android users). 

You could kill your character. Or you could save him.

You could let them kiss. Or you could make them hate each other.

Now imagine if you didn't have the choice. Not only do you not get to choose, you have to write both endings and let someone else choose! That is the essence of a branching story - a novels of sorts where the reader, not the author, makes the choices that determine the outcome of the story.

Chapter 7: Do you take the knife or leave it? If you don't take the knife, you won't be able to defend yourself in the next chapter and you'll die. If you do take it, you'll be able to defend yourself but will be badly wounded. Do you still have the gauze from Chapter 2? If not, you either find another alternative or you die.

You, as the poor author, have to write all these endings and make sure there are no discrepancies. I've learned first-hand how difficult this is after writing OP9, a 130,000 word branching story for Achromia Games. Yes, you read that right - 130,000 words, much longer than a typical paperback novel. Even choices that you make in the very beginning of the story can have effects hours of game play later, and somehow, you as the writer have to keep track of all the possibilities. How on Earth are you supposed to do this?

In this article, I'm going to assume you're writing a computer-based visual novel and that you know a few basic programming terms, which I'll define below:

  • A variable is something you can set to a specific value - a number or true/false. For example, if you were presented with a choice such as, "Should I turn left or right?" I would record your answer by creating a variable called choose_left and assign it a value of either true (left) or false (right). Later on, when this choice became significant, I would provide two different alternatives: if choose_left was assigned true, you'd see one path. If it was assigned false, you'd see a different path.
  • An else-if statement (abbreviated 'elif') is how I determine which path you follow in the story. For example, I could say something like:
    • if choose_left == true: [insert path here]
    • else: [insert path here]

Variables are the best way of keeping track of what's happening in the story. Making a note - on paper or at the bottom of your code script - about what variables are in the story can be extremely helpful. For example:

  • damien_meets_jordan indicates whether or not Damien ever meets Jordan. If he does, this variable is true. If he doesn't, this variable is false. If Damien meets Jordan, scene #1 will be included. If Damien doesn't meet Jordan, scene #1 will be left out.

In this example, if Damien meets Jordan, you give the player access to one additional scene. If he doesn't, the player never sees this scene and the game goes on without mention of Jordan.

A more complex example:

  • damien_meets_jordan indicates whether or not Damien ever meets Jordan. If he does, this variable is true, and if he doesn't, it is false. If they meet, Jordan will be added to Damien's group which will change the entire script. If they don't meet, Jordan will not be added to Damien's group, but will instead become his enemy.

In this example, whether or not Damien meets Jordan determines the outcome of the entire story. The important thing to keep in mind here is that if Damien does meet Jordan, his story will be completely different than if he doesn't meet Jordan. Complex decisions like these can be the hardest to write because you literally write a different book for each choice the player makes. Typically, I don't recommend writing branching stories like this, unless you're willing to put in hundreds of hours to write each possible ending. 

Branching stories should have a thread of consistency throughout. For example, you might write an adventure story about a girl with six teammates (the basic premise of OP9 by Achromia). At the end of the story, she could form a strong relationship with two of those six teammates. The other four relationships are already determined from the start of the story, although you can certainly tweak them to be better or worse depending on your choices. Other outcomes could include accidentally dying, failing to form strong bonds with any teammates, betraying the team, or failing the mission, but the basic premise of the story is already set. It's the outcome, not the story itself, which is determined by the player.

The hardest part about writing a branching story, whether on the computer or not, is keeping track of all the different paths. There's no substitute for having someone read through your work with a critical eye for inconsistencies. Even small continuity errors can totally ruin a branching story because they deprive the player of the ability to make rational decisions within the game. In addition, it's always a good idea to make some sort of chart. I did this in the Atom text editor, using different colors to keep track of all branches (which generally took the form of elif statements and were for some reason green). It's also possible to do this on paper in column or chart format. If you're not keen on writing out all the possible paths - which is extremely difficult and can be even more confusing - try the computer program Twine 2. It was developed as an engine to create HTML/JS text-based branching stories, but you can use it simply to keep track of the paths in a story you're writing elsewhere. Or, if you have a basic knowledge of programming (and/or HTML) and are willing to look up some tutorials, you can use it to create your very own branching story which you can publish online. Either way, it's an extremely useful tool to anyone interested in creating these stories.

The most important thing to remember when creating a branching story is this: make sure the reader is involved, but for your own sanity make sure the story has a base structure which can't be changed. Elaborate from there and leave as many details as you can in the reader's control. And always be sure that there's complete continuity throughout the story.

If you create any of these stories using Twine 2 or another engine, I'd love to check them out! Let me know about them in the comments below.


  1. Wonderful blog! I found it while searching on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Cheers Game Android Offline

  2. Furthermore, some people have boring speech patterns, and if they wrote the way they talked, they would also be boring. So a good writing voice isn't something that comes naturally, and it usually takes time to develop it.Resume Creator

  3. When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. dominoqq

  4. I’m now not sure where you’re getting your information, however good topic. I needs to spend some time finding out more or working out more. Thank you for fantastic information I used to be on the lookout for this information for my mission. free slots

  5. I just thought it may be an idea to post incase anyone else was having problems researching but I am a little unsure if I am allowed to put names and addresses on here. this content

  6. I wrote about a similar issue, I give you the link to my site. Car Removals

  7. I personally use them exclusively high-quality elements : you will notice these folks during: essay writing service

  8. Attempt playing video games online. By playing characters that various other people command, you can much better develop excellent approaches that are effective around many different titles and platforms.안전놀이터

  9. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.

    daftar game terbaik
    game pc
    info olahraga

  10. Versatile games are additionally utilized in numerous mod apk free limited time and promoting efforts wherein the client can mess around and even shop from their preferred product.

  11. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! GTA games Sex

  12. Video games can be found at https://gameschurch.com/. Apk Raid Shadow Legends is the best game here.

  13. - Guide for all Doom Eternal Collectible Locations (Secrets, Cheat Codes, Modbots, Sentinel Batteries, Toys, Slayer Gates, Keys & more). Doom Eternal Walkthrough

  14. I am often to blogging i actually appreciate your site content. The content has truly peaks my interest. I’m going to bookmark your web blog and maintain checking for brand spanking new info. códigos de juegos

  15. Players can expand an assortment of details, for example, wellbeing, harm, mana recovery, development speed and numerous different details.how many people play LoL

  16. Wow. I never felt bored why Reading! Thanks and also Check out WWE 2K20 PC Download. It is awesome game!

  17. I’ve been absent for some time, but now I remember why I used to love this web site. Thanks, I’ll try and check back more often. How frequently you update your site? summoners war codes

  18. In games that show a male strong and smart, he will mostly likely be white, tall, thin, movie star looking and buff. You will rarely see him be a minority, short, chubby, not buff, nerdy looking, while still being strong and smart. You see this even LESS for females. 토토사이트


Post a Comment