Exampl. SuperSimpleStory - jackdarker/TwineTest GitHub Wiki

Lets try and create a most basic example:

several rooms are connected by doors; the hallway connects to the kitchen and the living room Each room can be presented as a passage:

In Twine-Editor you would create a layout like this:

As Tweego-story-file, the same would look like this:

:: Kitchen
You are in the kitchen.
[Hallway](/jackdarker/TwineTest/wiki/Hallway)

::Hallway
You are in the hallway.
[Kitchen](/jackdarker/TwineTest/wiki/Kitchen) [Living Room](/jackdarker/TwineTest/wiki/Living-Room)

:: Living Room
You are in the living room.
[Hallway](/jackdarker/TwineTest/wiki/Hallway)

When you play this story, f.e. by starting test-play in Twine-editor, the story will be presented in your Web-Browser. You can interact with it by clicking on the passage links; in this picture its the hallway.

You could now create a story of branching, linked passages or passages that are linkd to each other. But at some point you would like to add more logic to the game, f.e.: pick up an empty chips bag in the living room, walk into the kitchen and put it into the dustbin We could add a passage-link to the living room "pickup Chipsbag" and also an action-passage about throwing away the bag: :: pickup Chipsbag
You grabbed the empty chipsbag.
[dump it in the dustbin](/jackdarker/TwineTest/wiki/dump-it-in-the-dustbin)

:: dump it in the dustbin
You walk into the kitchen and throw the empty bag into the dustbin.
[Kitchen](/jackdarker/TwineTest/wiki/Kitchen)

But now you have a problem: if the player walks back to the living room, he will still see the option to pickup the chipsbag.

So we need a way to memorize the state-change of the story and dynamically change the content of the passage. Twine on itself cannot do this. But Twine + Storyformat (and Javascript) can help here.