Branching Narrative
Personal project
Horror game created so that I could test and broaden my branching narrative skills. I had been sitting on this idea for a good while and decided to create a short piece (consisting of 2 levels) and played around in Twine to demonstrate how it would work. It took a while for me to wrap my head around certain aspects of Twine, but through this project I ended up improving my design skills a great deal and learned so much more about where to use different types of variables.
CONTEXT
Characters include William (player character) Eva (player character’s mum) and Anne (Eva’s friend). William is nine years old in the first level and fourteen in the second level.
Both levels are set in Anne’s house. Anne and Eva met at university and despite some arguments over the years, they have remained good friends, though Anne has a terrible secret. It is up to the player to uncover the truth.
SAMPLE 1
Click on either image to see the full thing!
Or read this piece below!
Living Room - interactable objects (not working)
Wanted the player to explore the living room completely before moving onto the next part of the game, so I needed the options to disappear once the player had clicked on them and then “continue” would appear.
Setting the variable for “Interactables” wasn’t an issue but getting the options and “continue” option to show up in the right places was a challenge.
Received a lot of error messages because Twine couldn’t recognise what I wanted the macro “else” to do.
Realised that I kept setting the “Interactables” variable as 1 every time (rather than setting it to “it +1”), so a greater value was not possible, which is why nothing was working as intended.
SAMPLE 2
TWINE PROCESS
Living Room - interactable objects (working using “num-type”)
Read through some of the Harlowe manual; I tried using “num-type” when setting the interactables variable, which seemed to work fine.
Used the greater than and less than signs with “num-type”, which then made it possible to use two “if’s”.
Copied the variables over from the first living room level to the second living room level. I set the “Interactables” variable back to 0 in the second level (before the player starts looking around the living room), which did the trick.
Living Room - interactable objects (working using “count”)
Recognised a potential issue; I wanted the player to go through all options available (just once) but since the variable is set to numbers, it doesn’t matter which option the player clicks on, as long as they click on those options 5 times.
Could potentially experiment with a string/naming variable rather than using only numbers.
Used my mentor’s suggestions for the interactable objects (using a simple counting variable
Didn’t have my passages leading back into one specific passage (the living room one), so I changed my passages to make it work (since the count variable required a sort of loop back into a main/"parent passage.
Was not moving on from the living room after all options were clicked - I think because I have an option leading on from a different one (coffee table drawer from coffee table).
Made it work by using an “else” variable and put the options inside of a hook, so that they’re hidden when the player has clicked on all of them.
Sleeping Pills & Wine Glass - “go-to” & Boolean (not working)
Created a Boolean variable for the sleeping pills, so if the player takes them, it’s set to true, but if they leave them in the coffee table drawer, it’s set to false, which is to be used further on in the second level.
If the player took the sleeping pills, they have the option to put them into one of the two wine glasses, otherwise if the player left the sleeping pills in the drawer, they go straight to the next part of the game.
This Boolean also comes in handy in the last part of the game because the “SleepingPills” variable being true or false determines the game’s outcome (good or bad).
The problem I ran into, is that I needed another variable for the wine glass (to keep track of which one the player put the sleeping pills into).
Because it’s another Boolean and isn’t attached to the “SleepingPills” variable, the text for the “WineGlass” variable being set to false shows up even when I want just the text for the “SleepingPills” variable (when false) to show up.
Tried implementing my mentor’s suggestions for the sleeping pills section (using “go-to”) but all three options lead back into the same options, so there is no way to differentiate between where it should take the player for the last section, since the “HasSleepingPills” variable is going to be true or false anyway and there isn’t anything else for the third option.
Sleeping Pills & Wine Glass - “go-to” & integer (working)
Tried changing the sleeping pills variable to an integer instead of a Boolean, which worked fine, but obviously the text for when the wine glass variable is false still shows up, since they’re still separate variables.
Decided to remove the “WineGlass” variable and just keep the “SleepingPills” variable, which I kept as an integer and set the value that way depending on player choices.
Worked well, though could probably find a better way of doing it, so will revisit another time.
Some of the text in the passages towards the end was not showing up because of the “go-to” variable, so some stuff was missing and does not make sense.
Could use the “after” (a certain amount of seconds) variable and “redirect” variable and keep the text in the “call down to Anne” and “start going downstairs” passages, but I didn’t necessarily want to use a timer.
Instead, I kept the “go-to” macro in those passages and set a variable in the “call down to Anne” passage to true; then used the “if” variable in the last 3 passages and used a hook with the text from the previous 2 passages (“if” that variable is true, show this text; “else”, show this text).
Boolean & integer - keeping track of if player knocked on the door or rang the doorbell (and in what order)
Created a Boolean and an integer variable for keeping track of whether the player rang the doorbell or knocked on the door first (for a later part of the game).
When it came into play in a later passage, I used the “if” and “else” macros so that it leads to the correct story continuation.