So You Want to Write Interactive Fiction?

Back in 1996 I played Curses, an extremely good text adventure game. I also read the inspiring documentation for Inform 3, the programming language Curses was written in, and found it extremely elegant. (The game, the programming language and its documentation were all the work of one Graham Nelson.) I had vague plans for writing my own game in Inform, but never got round to it. Instead I went through various interesting upheavals in my life (mainly involving women and the resulting children) that pretty much catapulted me out of geekdom, certainly as far as gaming was concerned.

Now, inspired by the Colossal Cave paper I linked to the other day, I googled “graham nelson inform”. And boy have he and his associates been busy!

Inform is now at version 7. It has transformed into a natural English compiler for interactive fiction. Inform 7 source code can look like this:

Martha is a woman in the Vineyard.

The cask is either customs sealed, liable to tax or stolen goods.

The prevailing wind is a direction that varies.

The Old Ice House overlooks the Garden.

A container is bursting if the total weight of things in it is greater than its breaking strain.

This incredible-sounding piece of software is a free download available for Win, Mac and Linux. Book-length documentation is included. I’ve got to check out what kind of text adventures / interactive fiction people are writing these days with tools like that!

[More blog entries about , , , , , ; , , , , .]

Advertisements

15 thoughts on “So You Want to Write Interactive Fiction?

  1. Apparently Inform 7 starts with a load of default assumptions about your game world, so a single sentence about a place or person will compile into a playable “game”, albeit one where you can’t really go anywhere or do anything other than look around. Programming is largely about adding information and overriding the defaults as needed.

    Like

  2. I used to love these games; I wrote a few for the old ZX Spectrum when I was a kid, but they were all lost (in retrospect they were pretty rubbish, but then I was only 13).

    I have often thought that they could be a fantastic teaching tool, and history/archaeology would provide a very useful setting. Most of the “ancient” or “fantasy” genre are a bit silly (everyone trying to do a Hitch Hikers’ Guide and generally failing). But imagine what you could do with a fairly good representation of an Egyptian temple, or the city of Nineveh, or medieval London! If done well (yes, Curses is great), they can be extremely atmospheric, and you can feel like you know the place, simply by the power of your imagination. Then when you’re presented with the real thing, you at least have a background map to work from.

    I did once start trying to put together the City of Amarna, but didn’t get very far. On Inform 7 this sounds like a more realisable prospect.

    Martin, why don’t you set up a competition for the best “real” archaeological IF? No silly jokes, no magic, but something gritty & believable?

    Just a thought 🙂

    -A

    Like

  3. I have an idea. I can tell it to you everybody, because I know that I have not the time to do it myself, otherwise I would keep it as a secret 😉

    Tacitus…one could make oneself as a person traveling around to the many german tribes he describes. Yee, when one comes to meet the aestonian tribes, and there they are living on the islands on the southern coast of Baltic see, there are even maps over those islands. Suiones, suitones, Venet(d?)i… Many…more…
    One could show all the habits they are described to have…

    Like

  4. The interesting thing is that those “memory experts” tell you that in order to remember intricate things, a useful technique is to imagine the rooms of a house, and populate those rooms with bits of information, then imagine a walk-through. This is almost exactly analogous to I.F., which is one reason why I think it could be an excellent learning tool for science, medicine, history, etc. I tried Inform 7 last night, and it really looks as if it could make the job of creating such “modules” very easy. How students will take to them is another problem; would they tough out the puzzles? Or would they just jack it in, and head down to the pub?

    Like

  5. I imagine it would be a fairly easy job to put z-code-based games such as those produced by Inform on-line with the aid of a universal interpreter written as a browser script. Less hassle when you want to try the games out, easier for new people to get hooked.

    Anyone with enough intellectual stamina to plough through a 300-page novel should be able to enjoy IF as well.

    Like

  6. Martin, I’m glad to know my article has given you the incentive to check out IF again.

    There is already a Java-based Z-machine interpreter.

    http://ifwiki.org/index.php/Zplet

    I’ve aslo seen a JavaScript and php interpreter.

    I do use IF in some of my classes. I’m convinced that some students simply don’t have the IF gene. Few students seem to enjoy puzzles, though a good storyline and rich setting will definitely hold their attention.

    Adam Cadre’s 9:05 and Photopia are good examples of games that are complex enough to be interesting, but the puzzles don’t get in the way of the story.

    Graham Nelson’s Jigsaw is a massive epic that includes brief visits to various sites throughout the 20th century. One segment involves manipulating a slightly-simplified enigma machine. The separate segments are all tied together with some elegant framing material that gives the player a sense of overall progress.

    If you’re looking for models, try the XYZZY Award winnders. There are awards for best setting, best puzzles, best writing, etc.

    http://wurb.com/if/award/3#527

    There’s also a company that’s planning to market educational IF games to middle-schools… Here’s a good overview.

    http://grandtextauto.gatech.edu/2007/07/06/textfyre-an-interactive-fiction-company/

    Like

  7. Manioc field
    You are in an ancient El Salvadorian manioc field. Volcanic ash lies all around – it smells recent. There is a huge smouldering caldera to the south and a path leading west. To the east you can hear the sound of running water.
    On the ground there is a dessicated manioc pod.

    >

    Like

  8. Aaaargh! The girl ate the manioc pod, which was carrying enormously high levels of mercury. Kissing her transferred the mercury to your bloodstream, and now you have autism, as well as infarcted amygdala (See Respectful Insolence for details – be aware there is a queue). No longer able to appreciate your personal safety, you stumble into the caldera of the volcano, and get frazzled to a crisp.

    You have died.

    Would you like to RESTORE a saved game, RESTART, or QUIT?

    >

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s