GDD || Home || Mechanics || Demo || Documentation of Code || User Interface || Navigation


To understand the way the narrative is told I ran a couple of test pieces, where I wrote out the structure.  Below is the  template or structure for my narrative using Twine, below is the structure for predominantly Serenity (legacy name:Lottie) over chapters 1 and chapters 2.


Each box corresponds to a location and time, e.g. canteen breakfast and a number representing the level of that story. Within the code different options depending on what has happened before (states which have been triggered).


Example: Walk to Work 0

The location is walking to work and this box can be accessed from the first loop (loop 0).

The passage checks for variables: $posterDays, $event, $choiceBake and $cupCakes and shows a different line of narrative depending on which variables are true, and sometimes shows multiple  passages.



Example: Breakfast 0

The location is the canteen at breakfast and the loop can be accessed from the first loop.

This passage checks for variables: $breakfastCanteen, $choiceBake and $cupCakes.

The passage also tells you how many times you have had breakfast at the canteen (print: $breakfastCanteen)

And randomly selects which breakfast you are going to eat today (either: “porrdige”, “toast”,  “cereal”).

Breakfast 0



I also included a little bit of formatting so that text would also appear at the top of page even if the passage shown is local at the bottom. To do this I put all text within {} and using html mark-up put the text into paragraphs <p></p>



Alternative Coding Method

Instead of putting the text into each box, I could also have written it in one long box and called it from other box’s. This would be a better method when using a lot of different strands of narrative. You would be separating the text from the code more clearly. I used this method when writing the prose version.


Example: Start

I set all paragraph in the start box, with a hook $verse1 all the way to $verse28.



Example: Verse 1

Then named each box 1-28 and called the hook I had set in Start. If I had wanted multiple paragraphs to be show there would be much less text in these box’s.


Example: Strucutre

There are less links as I only wrote the first loop and hadn’t included other characters yet, each box is a separate paragraph.



Design Decisions:

It is easier to edit text in one file, and then to call the text into the relevant part of the story than to manage the text over many files. It is also easier to write out the state-machine first before the narrative and deal with the instances separately.




GDD || Home || Mechanics || Demo || Documentation of Code || User Interface || Navigation