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 , , , , , ; , , , , .]

Tags

More like this

You are in a maze of twisty little passages, all alike. The original text adventure game, ADVENT, was written in the mid-1970s by Stanford student Will Crowther. This game begat Zork, then King's Quest, then any number of other adventure games on various computer platforms until the present day,…
Lately I've been playing more board games, thanks to gaming friends moving to my area, and also to my son and his buddies reaching an age where they can understand and enjoy games. I have a number of good board games from the 70s, 80s and 90s, and the newest one in the house is Blokus from 2000.…
From age twelve to twenty-five, I was a gaming geek. It started with the Swedish version of Runequest (Drakar och Demoner) and the Lone Wolf solo adventure series, and soon branched out into computer games and sundry board games. Gaming was a big part of my life and I had a lot of fun with it. In…
Reiner Knizia is one of the board-gaming world's greatest celebrities, famous for a long string of hit games. According to the members of Boardgamegeek.com, the best of Knizia's games is Tigris & Euphrates (1997), which is #11 on the site's thousands-strong ranking list. I can't really…

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.

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

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...

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?

By Amenhotep (not verified) on 23 Aug 2007 #permalink

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.

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-fict…

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.

>

By Amenhotep (not verified) on 24 Aug 2007 #permalink

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?

>

By Amenhotep (not verified) on 27 Aug 2007 #permalink

Sorry Martin - too many beers - I couldn't help myself. I'll go and have a lie down now...

By Amenhotep (not verified) on 27 Aug 2007 #permalink

Hello there!!
That all must depend on that you might be a paredro...?