skip to content

town

town

i’ve been looking at and playing through gamebooks lately: books with rules that govern how they’re read, essentially. choose your own adventure books are the simplest kind: something like gnomes-100 dragons-0 is maybe the most complex, and attempts to provide the kind of storytelling experience of a person-to-person role-playing game, but with for a single participant. (many early computer games envisioned themselves filling the same role.)

i’ve been looking at ways to write gamebooks digitally. the problem with conventional interactive fiction of the type-a-command mode is that nearly anything can conceivably be a verb. (most contemporary interactive fiction relies on a partially-concealed verb list for its puzzles, in fact.) thorough design entails anticipating and accounting for the hundreds of things a player might conceivably type, which seems like an endless road to walk. as an author, it’s also an incredibly daunting prospect and probably the reason i don’t write interactive fiction as often as i could.

so i’ve been fiddling with tools to make digital stories of the take-this-action or take-this-other-action variety: digital gamebooks. the first kit i fiddled with, qml, was a disaster. though the language itself looks both simple and robust, actually getting my stories online (so people could play them) didn’t work out and my stories kept breaking.

next i tried twine. unlike qml, twine outputs self-contained html files that can just be dropped on a website for people to play. it also looks pretty without any extra work (though knowledge of html and css will help you make your stories look exactly how you want). what was deceptive, though, was just how much scripting i’d have to do inside the editor to make places and scenes appear like i want them to. it’s really simple and neat if you simply want to make a hypertext story: if you want to track the states of lots of different things (as you would in something resembling an adventure game), that’s where it gets messy.

on the subject of mess, twine also organizes the parts of your story in a neat flowchart that kind of resembles boxy infocom maps, putting all your text in boxes and drawing lines between them to show how they connect. the problem is that all those boxes, which are updated with text as you type it, and all those increasingly-tangled lines slow the program down pretty quickly, until text is entered at a crawl. i got around most of the slowdown by hitting F12 to open the full-screen text editor, but there seems to be a text-only version of twine (or rather “twee,” the language it uses to make stories) that i should maybe try.

town is a story i wrote to learn twine. it’s a text reimagining of a town from another game. click blue words to move through the story, cllick “start over” if you want to start over. there is an ending to find.

17 comments

  1. Cossix wrote:

    Maybe I could help you get QML working later if you’re still interested in it.

    7/17/2009 at 12:16 am | permalink
  2. Filipe wrote:

    I’ve had similar problems with Inform 7. Give the player an inch, and they’ll take a mile. It’s a shame Twine isn’t the ideal inbetween.

    I’m assuming from your game, though, that Twine can keep track of small things like inventory? What were you trying to do that made things so messy?

    7/17/2009 at 2:15 am | permalink
  3. agj wrote:

    This Twine thing looks like just what I wanted. I like IF, but hate the interface.

    7/17/2009 at 3:53 am | permalink
  4. Pacian wrote:

    Interesting. The game I’m working on basically functions the same way - although I think I like the implementation of this a lot more.

    7/17/2009 at 5:23 am | permalink
  5. auntie wrote:

    where things got hairy was with conditionals, and there are a lot of conditionals in this story. there’s at least two versions of almost every scene, depending on what the player’s seen and done, and twine doesn’t support switch statements or elseifs, resulting in some pretty hard-to-read nested ifs. the other thing is that formatting is turned off inside if statements, so i had to use html (anything within <html> and </html> tags is interpreted as html) to add carriage returns and even the spaces between sentences where necessary.

    i also had to go back and define all the flags in the game (there are ten) in the opening “passage” because conditionals with undeclared variables didn’t seem to resolve correctly. that was annoying. but maybe there’s a better way i could have done it?

    7/17/2009 at 11:39 am | permalink
  6. Lyx wrote:

    Even if the control-logic can be fixed - if one wants to do a game with a lot of dynamics… different variants of events… and the game is outputted to individual html-files before playing… doesn’t this mean that one would end up with perhaps thousands of html files?

    To me, this engine seems to be made for mostly linear stories with only a bit of branching.

    7/17/2009 at 12:44 pm | permalink
  7. auntie wrote:

    the entire game, regardless of how much it branches, is a single html file.

    7/17/2009 at 12:47 pm | permalink
  8. Lyx wrote:

    ah, got it. Thanks for the clarification.

    7/17/2009 at 1:30 pm | permalink
  9. Chris wrote:

    One thing that can help make things easier to follow when you’re writing is to split things into separate passages, and then use the [[display]] macro to glue them together. i.e. to initialize the game state, I’d create a passage that just did that, and then use this source code:

    [[silently]][[display ‘(init)’]][[endsilently]]

    (I’m replacing angle brackets with square ones because Wordpress usually eats them in comments.)

    7/17/2009 at 1:57 pm | permalink
  10. booyaa wrote:

    twine was a nice find!

    i really love the use of tiddlywiki to give it web sparkle and keep the whole thing in a single html page!

    7/17/2009 at 5:48 pm | permalink
  11. increpare wrote:

    yeah it’s a reasonably slick setup. hypertext is just fantastic. but, hmmm, there’s a part of me that really strongly desires to be overwhelmed by some aspect of it that i haven’t seen used in a game yet that i can’t quite put my finger on.

    7/17/2009 at 8:55 pm | permalink
  12. auntie wrote:

    one idea for translating the hidden combination puzzle to text that i was considering was to make an obviously suspicious feature but make its hyperlink look like the normal, static text of the story. the player would have to actively look for the link to find it.

    substitute for invisible walls: the player has to drag the mouse and hilight hidden (black on black) text to see the combination?

    7/17/2009 at 11:15 pm | permalink
  13. iguanaDitty wrote:

    If you haven’t already I recommend taking a look at The Space Under the Window by Andrew Plotkin. He does some interesting things with not exactly hypertext and not exactly puzzles.

    7/18/2009 at 1:11 am | permalink
  14. Sam wrote:

    Any way you could please post your story file for Town? I’d love to use it as a way to learn Twine.

    7/18/2009 at 2:25 am | permalink
  15. auntie wrote:

    you can grab my story file here. it’s a bit messy for reasons i’ve mentioned, but hopefully it’ll be helpful to someone.

    some of the formatting (replacing the title with an image, removing the useless sidebar links) was done after the fact in html, so if you build a story out of that file it won’t look exactly like the one i’ve posted online. (feel free to look at the source of the online version using your web browser.) but all my (at times convoluted) scripting is in there.

    7/19/2009 at 11:47 am | permalink
  16. Hunter wrote:

    Project Aon has some gamebooks playable online, particularly the Lone Wolf series.

    http://www.projectaon.org/en/Main/Home

    Also, if you’re interested in writing any non-electronic gamebooks let me know, because a couple years ago I was seized with the compulsion to write a cool set of mechanics for one, which I did, although I never intend to actually write any gamebooks unless there is a nuclear holocaust that leaves all electronics in ruins, but enough people alive to justify a print run. And you’re welcome to use these mechanics for your own gamebook.

    7/22/2009 at 4:27 pm | permalink
  17. nadir wrote:

    i’m a little disappointed it’s so short, i was hoping i’d be able to visit the house of blues and the castle of lots and lots of evil.

    this is cool though, nice work

    7/30/2009 at 3:44 pm | permalink

post a comment

your email is never published nor shared. required fields are marked *
*
*