An example story for the gist-txt text adventure engine.
Play this text adventure at http://potomak.github.io/gist-txt/#acebd8fe14942fab4e8e.
More info at https://github.com/potomak/gist-txt.
An example story for the gist-txt text adventure engine.
Play this text adventure at http://potomak.github.io/gist-txt/#acebd8fe14942fab4e8e.
More info at https://github.com/potomak/gist-txt.
| state |
|
||
|---|---|---|---|
| style | body { background: gold; color: red; } a { color: #900; } |
You found a treasure!
You can steal the treasure or you can just go back to the forest.
| init | function() { window.city = window.city + 1 || 1; } | ||||
|---|---|---|---|---|---|
| state |
|
||||
| style | body, footer { background: #222; color: #eee; } |
A big and crowded city.
{{^citizen}} You have visited the city {{cityCounter}}. {{/citizen}}
{{#citizen}} You visited this city so many times... This is your new home now. {{/citizen}} {{^citizen}} Go back. {{/citizen}}
| style | body, footer { background: #44e544; color: #fff; } a { color: #227222; } |
|---|
You're in the forest.
{{^cave}} Go back or explore the cave. {{/cave}}
{{#cave}} {{#treasure}} You feel guilty because you stole a treasure, but you're rich. You're ready to start a new life in the city. {{/treasure}} {{^treasure}} You have nothing, but yourself and the nature. You're happy. {{/treasure}} {{/cave}}
This is an interactive story where you can choose what to do next.
You can explore the city or you can go to the forest.
| state |
|
|---|
You take all the gold that you can and run back to the forest.
| body, h1, h2, h3, h4 { | |
| font-family: monospace; | |
| } |