37
Interactive Fiction - A Beginner’s Guide by Stephen Granade http://brasslantern.org/

Beginner's Guide to Interactive Fiction

  • Upload
    bakava

  • View
    66

  • Download
    12

Embed Size (px)

DESCRIPTION

Beginner's Guide to Interactive Fiction

Citation preview

Page 1: Beginner's Guide to Interactive Fiction

Interactive Fiction - A Beginner’s Guide

by Stephen Granade

http://brasslantern.org/

Page 2: Beginner's Guide to Interactive Fiction

Table of Contents

How to Play a Text Adventure – Part 1 ...................................................................... 6

Some General Principles......................................................................................................... 6 Playing Through Glowgrass ................................................................................................... 7

How to Play a Text Adventure – Part 2 .................................................................... 12 Finding Your Way Around IFArchive ..................................................................... 18

What The Archive Is............................................................................................................. 18 How the Archive is Structured.............................................................................................. 18 Tools for Downloading......................................................................................................... 18 The Newest Files .................................................................................................................. 19 Finding Games...................................................................................................................... 19 Hints and Walkthroughs ....................................................................................................... 20 Writing Your Own Games.................................................................................................... 20 Information About Interactive Fiction.................................................................................. 20 Writing Your Own Games.................................................................................................... 22 IF Archive Partial Organization Map ................................................................................... 22

Downloading and Running Text Adventures ........................................................... 23

Basic Structure...................................................................................................................... 23 Hugo ..................................................................................................................................... 24 Alan ...................................................................................................................................... 24 TADS.................................................................................................................................... 24 Z-Code .................................................................................................................................. 25 AGT ...................................................................................................................................... 25 TADS 3................................................................................................................................. 25 Glulx ..................................................................................................................................... 26

Macintosh Text Adventure Interpreters................................................................... 27

TADS.................................................................................................................................... 28 Inform/Z-Machine ................................................................................................................ 28

Zoom ................................................................................................................................ 28 Zip Infinity ....................................................................................................................... 28

Hugo ..................................................................................................................................... 28 AGT ...................................................................................................................................... 28 ALAN ................................................................................................................................... 28 Glulx ..................................................................................................................................... 29 TADS 3................................................................................................................................. 29 IFDropFile ............................................................................................................................ 29 Current Interpreters............................................................................................................... 29

Linux Text Adventure Interpreters .......................................................................... 30

Introduction........................................................................................................................... 30 TADS.................................................................................................................................... 31

Unix TADS ...................................................................................................................... 32

Page 3: Beginner's Guide to Interactive Fiction

Glk TADS ........................................................................................................................ 32 Z-Machine............................................................................................................................. 34

XZip ................................................................................................................................. 34 Unix Frotz ........................................................................................................................ 34

Hugo ..................................................................................................................................... 35 Console Hugo................................................................................................................... 35 X Hugo ............................................................................................................................. 35 wxWindows Hugo............................................................................................................ 36

Glulx ..................................................................................................................................... 36 AGT ...................................................................................................................................... 37 Alan ...................................................................................................................................... 37

Page 4: Beginner's Guide to Interactive Fiction

Introducing Interactive Fiction It's been more than two decades since Will Crowther and Don Woods wrote Colossal Cave, the first computer adventure game. Things have gotten complicated since then, what with the proliferation of web sites and the growing number of people using computers. This article is a brief overview of the specific brand of interactive fiction covered by this site, namely, computer adventure games. If you're new to the adventure game scene or want a review of what resources are available for the adventure game player, then read on. Interactive fiction (IF) is a broad term. Strictly speaking, interactive fiction is anything in which you influence the outcome of a story, like continuous stories you can add to or those old "Choose Your Own Adventure" books with their branching stories. But there is a more specialized meaning of interactive fiction which I use on this site: computer adventure games. In general, computer adventure games are computer programs which tell you a story. In them you play a character in the story, and you move the story along through your actions. In many pieces of IF you have to solve puzzles to keep the story going, puzzles like "How do I open the locked door?" or "How can I get the bridle off the alpaca so I can return it to Barry?" In some games you also have to interact with non-player characters (NPCs) to keep the plot unfolding. Because IF involves storytelling and puzzle-solving, it tends to emphasize thought over action, a boon for people who like to play computer games but don't like reflex-dependent ones like Quake. If you do like a little action with your thinking, try hybrid games like Tomb Raider, where puzzle solving is blended with jumping and shooting. IF comes in two flavors: graphic and text. Text adventures came first. Playing them is like reading a book in which you have to type commands to tell the protagonist what to do. Famous text adventures include Zork and The Hitchhiker's Guide to the Galaxy, which is based on the book by Douglas Adams. Graphic adventures tell their stories through pictures rather than words. You may be familiar with graphic adventures like Myst, in which you view the world through your character's eyes, or Monkey Island, in which you move your character around on-screen. If you want to play a graphic adventure, you'll most likely have to pay for it. Most graphic adventures are sold by companies like LucasArts and Cyan, so you'll have to order them from the companies or visit your local software store. Text adventures, on the other hand, tend to be free. If you're looking for a text adventure, chances are you'll find it on the Interactive Fiction Archive. The IF Archive is the world-wide repository for text adventures, and should be the first place you look for new ones. (If you're new to the IF Archive, you'd best read through this guide before going there.)

Page 5: Beginner's Guide to Interactive Fiction

Regardless of whether you want to play graphic or text IF, you should be sure to see what reviewers have to say about the game you've picked. Many commercial game sites review graphic adventures, while the main site for text adventure reviews is Baf's Guide to the Interactive Fiction Archive. If you play IF, sooner or later you're going to get stuck on a puzzle you can't solve. When that happens, there are places you can go for help. Most adventure game sites provide walkthroughs, which are series of step-by-step instructions explicitly leading you through games. However, your best resource for help is other people who have already played the game you're playing. You can talk to other fans of IF on bulletin boards or on Usenet newsgroups. If you're unfamiliar with newsgroups, you can learn more about them at Google Groups, which gives you access to Usenet through the web. There's a lot more out there than what I've talked about here, some of it listed on this site. Don't be afraid to go exploring. After all, playing IF can be entertaining and educational; sometimes, it even aspires to be art.

Page 6: Beginner's Guide to Interactive Fiction

How to Play a Text Adventure – Part 1

Maybe you're a big fan of adventure games, but have only played graphic adventures before. Perhaps you've tried some online text adventures and don't know where to begin. Or maybe you bought a collection of the old Infocom adventures and aren't sure how to play them.

This article is here to help you out. Text adventures can be a lot of fun, but they take some getting used to. By taking you by the hand and leading you through part of a game, I hope to make your trip up the interactive fiction learning curve easier.

What I'm going to tell you won't apply to every game that's out there, but it will help you play many of them. My goal is to help you learn how to look at a text adventure and figure out what's going on.

Some General Principles

When you start up a text adventure, it will display some introductory text and then print an input prompt, something like >. Nothing will happen while you wait at the prompt; time doesn't pass until you type something and hit Enter.

That prompt seems to be saying, "Type anything you want to do." Don't let it fool you. It's lying. What the prompt is really saying is, "Type in a command in one of the formats I understand and maybe you can do that." This sounds restrictive, but once you become familiar with how text adventures work, it'll help you narrow down possible actions.

The commands you type are, for the most part, imperatives. It's as if the sentences begin with "I want to...". Think of the commands as telling your adventurer alter-ego what to do.

While many older adventures varied greatly in what kinds of commands they would accept, modern adventures tend to share the same commands and general syntax. For modern adventures, commands tend to fall into one of six categories:

• A one-word action These are the commands like LOOK, JUMP, and SING which don't act on any objects.

• An action and a direct object These are the commands that act on something. For instance, TAKE THE BOOK. TAKE is the verb, and THE BOOK (or simply BOOK) is the object.

• An action, a direct object, and an indirect object These are the commands that act on two things. You give a verb, the direct object of the verb, and the indirect object. PUT THE TOAST IN THE TOASTER is an example: PUT is the verb, THE TOAST is the direct object, and THE TOASTER is the indirect object.

Page 7: Beginner's Guide to Interactive Fiction

• An order to another character In many games you'll meet other people or animals, and sometimes you cal tell them to do things. You do that by saying their name, followed by the command you want to give them. For example, RONALD, GIVE ME THE FRIES.

• Communicating with another character Besides ordering characters around, you can communicate with them using commands like ASK RONALD ABOUT THE FRIES, TELL RONALD ABOUT THE MANAGER'S SPECIAL, and SHOW THE GREASY BURGER TO RONALD. Strictly speaking, these fall under the third category above, but they're specialized enough that I wanted to make them a separate category. (And in some newer games you can TALK TO characters, just so you know.)

• A special command These are the commands which do something outside of the game world, like AGAIN, which repeats the last command you did, SAVE, which saves your game, and RESTORE, which reloads a previously saved game.

If you're having trouble getting the game to understand what you want to do, make sure you've phrased your command following one of the examples above. And if this all seems really complex, don't sweat it. A lot of the times you'll figure out what to type instinctively. This list is for the times you can't figure out how to phrase what you want to do.

Rather than give you a list of sample commands, I'm going to lead you through parts of a real game called Glowgrass, by Nate Cull. It's a short, relatively easy science fiction story. Nate entered it in the 3rd Annual Interactive Fiction Competition, and it placed third. If you'd like to play along at home, please do so. You'll need to get the game file (glow.gam) and something called a TADS interpreter. If you're running Windows, I'd suggest you get the player's kit. Once you've downloaded it, double-click on the file you downloaded to install the player. To play the game, select "HTML TADS Interpreter" from the TADS menu under the Start button. The interpreter will ask you to select a TADS game. Find where you placed glow.gam, and select that. If you're running MacOS, I recommend HyperTADS. It comes binhexed, so unhex it and you're ready to go.

Playing Through Glowgrass

When you start Glowgrass, it will print some introductory text, the beginning of its story. The part above the name of the game and its credits sets the stage: you're visiting the ruins of a vanished civilization known as the Ancients. Unfortunately, things go wrong:

Courtyard This appears to be some kind of courtyard in the centre of an Ancient dwelling. The building itself swings around to the north and west, terminating in a crumbling retaining wall due south. A smaller domed construction opens to the northeast, through a wide metal door (closed). To the east is a flat space that could bear further exploring.

Page 8: Beginner's Guide to Interactive Fiction

You hear a high-pitched decelerating whine -- a dropship turbine in trouble -- from the northeast, followed by a dull roaring crash. Just in time, you duck and cover your eyes. Blue-white light etches across the landscape, then the gravity blast wave hits. Every molecule in your private universe shudders. A minute later, you get to your feet, pain gnawing your body. Scratch one dropship; nobody could have survived that crash. Scratch your equipment. Now it's just you, your wits - and the Ancients. Hope you're as good a xenohistorian as you claimed at the Institute. Because unless you find some kind of way out of here, it could be months before a recovery team locates you.

The first paragraph is a description of the room in which you start, in this case a courtyard. That description will have clues about what you can do and where you can go, but I'll leave that for now. More importantly, the second and third paragraphs let you know what's going on and what you've got to do. You've crash-landed, and have to find a way off the planet.

So let's get started. The first thing I do when I enter a new room is see what items catch my eye. Let's take a look at the room description again, using the LOOK command.

>L Courtyard This appears to be some kind of courtyard in the centre of an Ancient dwelling. The building itself swings around to the north and west, terminating in a crumbling retaining wall due south. A smaller domed construction opens to the northeast, through a wide metal door (closed). To the east is a flat space that could bear further exploring. You briefly catch a metallic glimmer from the top of the wall.

There are a couple of things I want to point out. First of all, I abbreviated LOOK as L. (You don't have to type it in all-caps like I did; I only did that to make sure you could tell it was "l" and not "1".) Second, I've put all of the items mentioned in the room's description in bold. Most of them won't be important, but occasionally you'll find something out by examining everything in a room. Third, notice that last sentence about a metallic glimmer? That's the author's way of indicating that there's something important about the wall. Let's oblige him.

>examine wall The wall is at least three metres high, and appears impossible to climb. There seems to be a metallic object lodged in the vegetation just above the wall.

Aha. A clue. There's something metallic stuck up there, and it might be important. Let's take a closer look.

Page 9: Beginner's Guide to Interactive Fiction

>examine glimmer The object looks metallic, and out of place in the vegetation above the wall. It could - you hardly dare to hope - could be a piece of equipment from your pack, but you can't tell which one from this distance.

I believe we've stumbled on our first puzzle: how do we get that metallic object down from the wall. Maybe we can climb the wall, or the vegetation.

>climb wall I don't know how to climb the southern wall. >climb vegetation The jungle vegetation isn't important.

Well, we probably won't be able to climb up and get that object. The phrase "I don't know how to..." is a standard TADS phrase, and means the author didn't code anything special for the wall. Sometimes you'll see "I don't think much is to be achieved by that" in other games -- it means the same thing. Phrases like "The [item] isn't important" and "Don't worry about the [item]" mean just that -- we don't have to worry about that item any more. That's the game's way of telling us that that item is just there for decoration. So we won't be able to get the item by pulling on the vegetation, or burning it, or anything.

For now there's nothing we can do about the metallic object, so let's go exploring. Most text adventures use compass directions to get around. You move by typing directions like NORTH and SOUTHEAST. These directions can be abbreviated to one or two letters. N means NORTH, S means SOUTH, NW means NORTHWEST, and so on. Room descriptions give clues about which directions we can go. Look at the room's description again. If it's not on screen, either scroll back up or type L.

Courtyard This appears to be some kind of courtyard in the centre of an Ancient dwelling. The building itself swings around to the north and west, terminating in a crumbling retaining wall due south. A smaller domed construction opens to the northeast, through a wide metal door (closed). To the east is a flat space that could bear further exploring.

We can't go north or west because the building's in the way, and we can't go south because of the wall we can't climb. What about that door to the northeast?

>ne You'll have to open the northeast door first. >open door The door appears to be locked, using a simple ferromagnetic latch from the middle Ancient period. It's a pity you don't have any of your equipment; some of the Institute's devices could really help here. >examine door The door is wide, around three metres across, and twice as

Page 10: Beginner's Guide to Interactive Fiction

tall as yourself. It's constructed of some Ancient metal alloy, probably tungsten or aluminium. It's closed, and locked. >x door The door is wide, around three metres across, and twice as tall as yourself. It's constructed of some Ancient metal alloy, probably tungsten or aluminium. It's closed, and locked.

We can't go northeast until we open the door, and we can't open the door because it's locked. (Notice that I abbreviated EXAMINE as X the second time around, just for demonstration purposes. You'll use EXAMINE a lot, so you'll probably want to abbreviate it once you get used to using it.) What if we try to unlock it?

>unlock door (with the jungle vegetation) I don't know how to unlock anything with the jungle vegetation.

Surprised? Here's what happened. The game expected you to tell it what to unlock the door with -- a key, or something like that. But you didn't tell the game what to use. So it tried to guess what you wanted to use. The bit in parentheses is the game telling you what it guessed you wanted to use. Sometimes that's very helpful, since good text adventures can often guess what you want to use. This time it was just a bit silly.

Maybe we already have something we can unlock the door with. To find out what you're carrying, use the INVENTORY command.

>inventory You are empty-handed.

That answers that question. Since we're not carrying anything, let's go somewhere else. The only direction left to us is east.

>e Lawn You're standing in a square area of neatly trimmed green lawn, shimmering faintly in the afternoon light. To the west, the lawn gives way to courtyard, and beyond it to the west and north are buildings. An odd, paved rectangular depression in the ground leads down to the southeast; the encroaching jungle vegetation further back is kept at bay by a barrier of translucent sheeting. Something about the scene gives you a sudden tingle of recognition, a surge of awe. As if you're walking into a legend.

By now you should be getting a little more comfortable with room descriptions. This room is the Lawn. The objects which catch my eye are grass, the depression, vegetation, and the translucent sheeting. Of all of it, the sheeting looks the most important. We can

Page 11: Beginner's Guide to Interactive Fiction

go back to the west, where we just were, or travel further to the southeast. Oh, and this somehow looks familiar to our character.

I'm going to stop here for now, and continue on in a later article. Before we stop, I'll show you how to save your game so you can restore it later, using the commands SAVE and RESTORE. You can normally just type in SAVE and let the game ask you for a filename, but I'm going to use a specific filename:

>save "example.sav" Saved. > quit

Do you really want to quit? (YES or NO) > y Thank you for playing Glowgrass!

That saved our game to a file called "example.sav", and then quit the game. At the start of the next article, I'll have us restore the game using RESTORE "example.sav".

Page 12: Beginner's Guide to Interactive Fiction

How to Play a Text Adventure – Part 2

If you've not read the first article in this series, you'll be hopelessly lost, since I'm diving straight back into our game of Glowgrass which is already in progress.

Okay, when we last stopped, we had just reached the Lawn. Let's load our saved game.

>restore "example.sav" Restored. Lawn You're standing in a square area of neatly trimmed green lawn, shimmering faintly in the afternoon light. To the west, the lawn gives way to courtyard, and beyond it to the west and north are buildings. An odd, paved rectangular depression in the ground leads down to the southeast; the encroaching jungle vegetation further back is kept at bay by a barrier of translucent sheeting. Something about the scene gives you a sudden tingle of recognition, a surge of awe. As if you're walking into a legend.

Now we're back to where we left off. We can give that sheeting a closer look.

>x sheeting The barrier is a thin, translucent film, resembling modern polycarbon alloys. Possibly an early form of monomolecular diamond; if so, it confirms some of your theories about the development of Ancient materials handling. It stands nearly three metres high, forming a protective wall across the entire south and east edges of the lawn area.

I guess we won't be going south or east. Nothing else here looks that interesting, so let's keep going.

>se Pool You're standing in a concrete rectangle set into the ground, paved with a grey substance, probably stressed concrete. It's recognisable as a swimming pool, a popular Ancient recreation fixture. Whatever water was once here has long since drained away, probably through the outlet grate set centrally in the pool's floor. You see a bright orange object here.

Ooh, an object to play with! And there's a grate in the pool which might be important. But first, let's find out about that orange object.

>x object It's a bright orange polymer casting, moulded in the shape

Page 13: Beginner's Guide to Interactive Fiction

of a spiral disk. A tiny legend on the now faded material reads, in the Ancient language, FRISBEE (tm) HELIPTA.

Our character may not know what this is, but we do! And I know one thing Frisbees are good for.

>get frisbee Taken. >throw it The Frisbee Helipta spins furiously as it leaves your hand, hovers briefly before shooting straight up into the air, then glides in a graceful spiral back into your hand. Reminds you of a a modern dropship in flight.

Notice that I referred to the Frisbee as IT. IT refers automatically to the last thing you did anything with. It's pretty useful shorthand.

So I've got a Frisbee I can throw around. I think I know how this will come in handy. But before I do anything with it, I'll take a look at that grate.

>x grat I don't know the word "grat". >oops grate In the outlet grate you see a set of cards.

If you're like me, you'll make a number of typing mistakes. The OOPS command is good for fixing one misspelled word. Above I mistyped "grate" as "grat", and the game complained. OOPS tells the game, "Replace the word you didn't understand with this word." So OOPS GRATE told the game to replace "grat" with "grate" in my command and try again. OOPS has its limits, since you can only replace one word, and the game can't have understood the word you mistyped.

What if you make a mistake that can't be fixed by OOPS? If, for instance, you accidentally burn the map that would lead you to the treasure? UNDO undoes the last turn, letting you back up one step in time.

Now back to the game. Notice how I didn't see the cards until I looked at the grate? A lot of games "hide" items like that, which is why I like to examine any items in a room which stand out. If I'm stuck, often I'll go back through the rooms I've been in and make sure I looked at everything. Let's grab those cards, since they might be useful, and see if we can do anything with the grate.

>get cards and x cards With some difficulty, you fish the set of cards out of the outlet grate. Taken. It's a set of card-sized holographic images, in full colour, printed on some kind of synthetic backing material

Page 14: Beginner's Guide to Interactive Fiction

which has survived immersion in a pool of water for years. Flicking through the holos, you see images of an Ancient family seated in an aerial vehicle; a young girl, holding what looks like a fabric toy; the same girl, a little older, throwing an orange disklike object; the family again, together, around the pool; the girl, older yet, examining a blade of grass with an optical instrument. Definitely, this is an important xenohistorical artifact. >i You have a Frisbee Helipta and a set of holograms. >open grate The grate doesn't open; it's welded in place.

I've thrown a number of concepts at you in this last bit, so let me take them one at a time. You can stick several commands on the same line by putting AND, THEN, or periods between them. So GET CARDS AND X CARDS (or GET CARDS THEN X CARDS or GET CARDS. X CARDS) means "pick up the cards and then examine them." The cards themselves show pictures of times past. Notice that one of them show a girl throwing an orange disklike object? I bet that's a clue as to what to do with the Frisbee. Authors tend to put hints in descriptions like that, so read carefully when you examine things or enter a new room.

I then wanted to see what we were carrying, so I took inventory, which I abbreviated as I. That's the last of the abbreviations you'll use the most: I for INVENTORY, L for LOOK, and X for EXAMINE. We've got the frisbee and the holograms.

Then I tried opening the grate, in case it lead to somewhere. Since it's welded shut, I doubt we'll do anything else with it.

There's not much else to do here, since we can only go back to the northwest. (If you try to go in any other direction, like south, the game will tell you "You can only go up to the northwest.") Before we do, though, I need to introduce mapping. You don't have to draw a map, especially for a small game like this, but you might find it useful. When I'm mapping, I draw a square for each room and put the room's name in the middle of the square. I put little sticks off of each room showing the directions I can go, with north being towards the top. Beside each square I list the items I found there, or that I think are interesting. Doors or other obstacles are blocks.

Here's a cleaned-up version of the map I would have drawn so far for Glowgrass:

Page 15: Beginner's Guide to Interactive Fiction

I think we can use that Frisbee to get the metallic object. Let's see if I'm right.

>nw.w Lawn You're standing in a square area of neatly trimmed green lawn, shimmering faintly in the afternoon light. To the west, the lawn gives way to courtyard, and beyond it to the west and north are buildings. An odd, paved rectangular depression in the ground leads down to the southeast; the encroaching jungle vegetation further back is kept at bay by a barrier of translucent sheeting. Something about the scene gives you a sudden tingle of recognition, a surge of awe. As if you're walking into a legend. Courtyard This appears to be some kind of courtyard in the centre of an Ancient dwelling. The building itself swings around to the north and west, terminating in a crumbling retaining wall due south. A smaller domed construction opens to the northeast, through a wide metal door (closed). To the east is a flat space that could bear further exploring. You briefly catch a metallic glimmer from the top of the wall. >throw frisbee at metallic object The metallic object is too high to reach with your hands alone. Perhaps you could find something to help you get it down.

Okay, this is one of the problems that text adventures have: what do you do when you know what you want to do, but the adventure game doesn't understand what you've typed? There are a couple of possibilites. You might have to use a different verb, a synonym to the one you tried. You might have to use a more complex command, one with an indirect object. In this case, I'll try a simpler version of my command.

>throw frisbee The Frisbee Helipta spins furiously as it leaves your hand, hovers briefly before shooting straight up into the air,

Page 16: Beginner's Guide to Interactive Fiction

knocking into the vegatation at the top of the retaining wall, and dislodging a metallic object, which falls back to the ground with it.

There we go! Let's see what we got.

>l Courtyard This appears to be some kind of courtyard in the centre of an Ancient dwelling. The building itself swings around to the north and west, terminating in a crumbling retaining wall due south. A smaller domed construction opens to the northeast, through a wide metal door (closed). To the east is a flat space that could bear further exploring. You see a silver rod and a Frisbee Helipta here. >get rod Taken. >x it This is definitely a piece of your equipment. It's a magprobe, a silvery rod about ten centimetres long and half a centimetre wide. The ceramic inductors inside are crude, useless for interfacing with any modern technology, but sufficient to manipulate small ferromagnetic devices.

Ferromagnetic devices, eh? I think I remember something like that being mentioned....

>x door The door is wide, around three metres across, and twice as tall as yourself. It's constructed of some Ancient metal alloy, probably tungsten or aluminium. It's closed, and locked. >open door The door appears to be locked, using a simple ferromagnetic latch from the middle Ancient period. Perhaps the magprobe might prove useful here, after all.

Ah, a gentle nudge in the right direction. All we have to do is figure out how to use the silver rod. There's no switch or trigger on the rod. Maybe all we have to do is put the rod against the door.

>put rod against door I don't know the word "against". >put rod on door There's no good surface on the northeast door.

Well, that didn't work. Maybe I'm making this harder than it really is. What I really want to do is use the rod to unlock the door.

Page 17: Beginner's Guide to Interactive Fiction

>unlock door with rod After a few minutes of careful manipulation with the magprobe, you feel the door's magnetic contacts click open. You breathe a sigh of relief; those hours of studying Ancient artifacts at the Institute training finally paid off.

Excellent! Now we can go inside the complex to the northeast.

I'm going to stop here, to let you discover more of Glowgrass on your own. Hopefully this has given you a taste of how to play a text adventure. If I were you, at this point I would SAVE my game so that I could RESTORE it later if I needed to.

I've covered a lot of ground in this article, so let me sum up. First and most importantly, read carefully. The descriptions of rooms and objects will hold clues as to how to use them. Don't be afraid to take notes or make a map, though you don't have to if you don't want to. You may have to rephrase your commands, sometimes called "guess the verb." Although better games will allow you to use a wide range of different commands, even the best games sometimes fall victim to this problem.

There's a lot more to playing a text adventure; what I've given above is merely a taste of what to expect. At this point you should have the basic tools you need to play. The best way to learn more is to experiment more with Glowgrass and other text adventures.

Page 18: Beginner's Guide to Interactive Fiction

Finding Your Way Around IFArchive

If you've been following the text adventure scene for a while, chances are you've heard GMD or the Interactive Fiction Archive mentioned. You were told that the latest adventure was "on the archive," or that you needed to visit the archive to get an interpreter to play the newer text adventures. Sometimes people announce tools or games and they don't even mention the archive by name, saying instead that "the files are in /programming/tads2/examples", leaving you with no idea what they were talking about.

The text adventure community more or less expects you to figure out what the archive is and how to navigate it on your own. While this approach works, it can be extremely frustrating. This article will hopefully help you clamber up the archive learning curve. I'll be discussing what the archive is, how it is structured, and where to go to find what you're looking for. At the end of the article will be a map of the archive with most of the links from the article laid out for you.

What The Archive Is

A historical note: the archive was originally housed at GMD, the German National Research Center for Information Technology, the creation of Volker Blasius. For a long time "GMD" was synonymous with the IF Archive. However, in August of 2001, the archive moved to ifarchive.org. People still occasionally refer to the archive as "GMD" out of habit. So whenever you see "GMD" mentally replace it with "IF Archive."

The IF Archive has both a web-based interface at http://ifarchive.org and an FTP-based one at ftp://ftp.ifarchive.org.

What is FTP, you ask? FTP stands for File Transfer Protocol, and is a method for transferring files between computers. These days you can access the archive through the web, and will only need to use an FTP client if you want to upload things to the archive. Explaining all about FTP is beyond the scope of this article; for more information, read the beginner's guide to FTP at FTPPlanet.

How the Archive is Structured

The archive is made up of directories. The top-level directory is where you'll go if you're looking for something and don't know where it lives on the archive.

Where you go from here will depend on what you want to find. Do you want to play games? Are you interested in writing your own? Do you want to learn more about Infocom? Once you've decided what you're after, this guide can hopefully help you find it.

Tools for Downloading

if-archive/download-tools

Page 19: Beginner's Guide to Interactive Fiction

The files at the archive come in all shapes and sizes. Some are zipped, some are arjed. Some are PDFs and can only be viewed using Acrobat Reader. Some are tarred or gzipped, or both.

If you don't have the programs that unpack or view the files you will be downloading, you can stop by this directory to find the tools you need. There are tools for PCs, Macs, Unix systems, and more.

The Newest Files

/incoming /if-archive/unprocessed

(Note: the /incoming directory is not available except through the FTP interface. It is also write-only, so you won't be using it unless you're uploading files.)

When people upload files to the archive, they go into the /incoming directory. Files in this directory haven't been processed yet, and can't be downloaded from there. Once they've been initially vetted and before they go into the main archive, they're moved to the /if-archive/unprocessed directory.

Why do you care about these directories if everything that's put in them will eventually be moved to the full archive? Because uploaded files may not be moved for several days, and many fans of text adventures aren't willing to wait that long to play the latest games. When someone makes an announcement about a new game or tool, check the /if-archive/unprocessed directory first unless the announcement tells you otherwise.

Finding Games

if-archive/games

If you want to find text adventures to play, you should look in the if-archive/games directory. There are three types of directories under this one:

System-specific game directories. These are games which run under one operating system. There are games for the PC, Mac, Amiga, and more. The games in these directories tend to be older ones, as most new text adventures fall in the next category.

Portable game directories. The game files for games written using text adventure languages are found in these directories under the if-archive/games directory. Game files are organized by the programming language used to create them. Some of the more popular languages are TADS (if-archive/games/tads), Inform (if-archive/games/zcode), and Hugo (if-archive/games/hugo). You'll need an interpreter to play these games; for TADS and Hugo, you can find one in the /executable directories that are in the programming section. For Inform, you'll need to look in the if-

Page 20: Beginner's Guide to Interactive Fiction

archive/infocom/interpreters directory. (More specifically, check the frotz and zip directories.)

Competition game directories. Every year there's a competition for text adventures that can be won in two hours or less. The games are kept in the following directories:

• if-archive/games/competition95 • if-archive/games/competition96 • if-archive/games/competition97 • if-archive/games/competition98 • if-archive/games/competition99 • if-archive/games/competition2000 • if-archive/games/competition2001

If you'd like to learn more about playing the games in all of these directories, read through Stephen Griffiths's FAQ about playing the Interactive Fiction Archive Games.

Hints and Walkthroughs

if-archive/solutions

The archive has a number of hints and walkthroughs for text adventures. Most are in this main solutions directory, but files for the Universal Hint System, which gives hints rather than outright solutions, live in the if-archive/solutions/uhs directory.

Writing Your Own Games

if-archive/programming

If you are interested in writing your own adventure games, the archive has a number of interactive fiction languages that can make your life easier. In this main programming directory is a bewildering array of choices. The most popular languages are:

• TADS (if-archive/programming/tads2) • Hugo (if-archive/programming/hugo) • Inform (if-archive/infocom/compilers/inform6)

(Note that the Inform directory isn't under the if-archive/programming directory, but the if-archive/infocom/compilers one.)

In each of these directories you'll find executables in an /executable directory, manuals in the /manuals directory, and example source code in the /examples directory. You can also find source code for games in the if-archive/games/source directory. There's a directory for each of the above languages.

Information About Interactive Fiction

Page 21: Beginner's Guide to Interactive Fiction

if-archive/info if-archive/magazines if-archive/infocom

There is a lot of information about interactive fiction to be had at the archive. First stop: the /info directory. In this directory are guides to writing text adventures, interactive fiction bibliographies, and more.

Next up, the /magazines directory. Unsurprisingly enough, magazines dedicated to interactive fiction are kept here. The two magazines which publish the most regularly are:

• SPAG (if-archive/magazines/SPAG) • XYZZYnews (if-archive/magazines/XYZZYnews).

Finally, the /infocom directory. Here is where you will find any and all information about Infocom. There are copies of their old newsletter The New Zork Times (later called The Status Line), files that are missing from Activision's repackaging of the Infocom games, tools for decoding the Infocom game files, modern interpreters for Infocom games, and more. If you're looking for anything having to do with Infocom, check this directory.

Page 22: Beginner's Guide to Interactive Fiction

Writing Your Own Games

IF Archive Partial Organization Map

Page 23: Beginner's Guide to Interactive Fiction

Downloading and Running Text Adventures

Let's face it: if you haven't played a modern text adventure before, chances are you'll have some trouble even figuring out how to get one to run on your computer. The talk of interpreters and runtimes and virtual machines is enough to make you give up before you even really get started.

If you find yourself confused by the terminology or unsure as to just what you need to download to play interactive fiction, this guide should help. Note that I won't be talking any about what to do once you actually start playing one of these new-fangled games. If you're looking for a guide to playing text adventures, you will need to look elsewhere.

Basic Structure

Most modern text adventures come in two pieces: the game file, and the interpreter.

I can hear the question already: "Why these two pieces?" There is a reason behind such a division, and it does make sense. Honest. Let's say you're going to write a text adventure. You want as many people as possible to play your game, especially since there aren't that many who are interested in interactive fiction. Ideally that means your game will need to be available on all kinds of computers running all kinds of operating systems, from Windows to MacOS to Linux to PalmOS.

You could try porting your game to each of these computers, rewriting it so that it ran on all of these different systems. It wouldn't be as difficult as porting a modern game with graphics, but it would still be a lot of work. And you'd have to have access to a Mac and to Windows and to Linux and to a Palm or Handspring....

Or you could save yourself some time and energy by dividing your game into the data, which describes your particular game, and the engine, which won't really change from game to game. Then you only have to port this engine to new systems, as the data won't change from computer to computer. You will still need access to many computers, or to volunteers who have those computers, but there will be less to port. There's an additional benefit: if later you write another text adventure, you won't have to port that adventure. By porting the engine now you can save yourself time and energy in the future.

That engine is a virtual machine, the equivalent of a computer created out of software instead of transistors and chips. (See, it's "virtual" because it doesn't really exist except as electrical impulses. Oh, those wacky computer science types.) Once it runs on a given computer, all of the software (in this case, text adventures) written for the virtual machine will run on that computer. Java is one language which runs on a virtual machine; most modern text adventures run on virtual machines as well.

Even if you never plan on writing a text adventure, virtual machines are good for you. Once you've downloaded the program which implements a given virtual machine on your computer, called an interpreter, and customized that interpreter, you won't have to re-

Page 24: Beginner's Guide to Interactive Fiction

customize it for the next game you play. As an added bonus, you'll have less to download in the future, since you won't need to get the interpreter again.

That's why most modern adventures come in two pieces. Once you've downloaded a game file, you'll need to make sure you have the appropriate interpreter. Oh, and the interpreter may be called a runtime or engine or somesuch as that. Don't be fooled: they're all talking about the same thing.

The file names of game files tend to end in strange extensions such as .gam or .z5. If you download these files using a web browser, your browser may not know that these are supposed to be binary files and should be saved as such. If you download a game using your browser and can't get it to run, try right-clicking (or clicking and holding on a Mac) the link and selecting the option to "Save link as" or "Download link to disk".

Before I move onto specific systems, one final note: I will often make reference to a directory on the IF Archive. The IF Archive is a big repository of interactive fiction resources, including interpreters and game files. If you're unfamiliar with the archive, I recommend that you take at least a brief glance at my guide to the archive.

Hugo

I'll start with the text adventure language Hugo because it is one of the easier languages to deal with. Hugo game files end in .hex. Some Hugo games have graphics and sound, which come in separate files. Those files don't have any set extension; however, in most cases the graphics and sound files are bundled with the .hex file in a zipped archive. You can download an interpreter for your system (which is called the engine) from the Hugo home page. Versions of the interpreter are available for Windows, Mac, Linux, Dos, and more. You can find Hugo games in the /if-archive/games/hugo/ directory of the IF Archive.

Alan

Alan game files come in two pieces: an .acd file and a .dat file. Because of this, Alan games are usually put into a zip file so you don't have to download them separately. You can get the interpreter (which is called the runtime) either from the Alan home page or from the /if-archive/programming/alan/executables directory of the IF Archive. You can download Alan games from the /if-archive/games/alan directory of the IF Archive.

TADS

Before I can talk about TADS, I need to explain the two variants of TADS: regular, and HTML TADS. HTML TADS is a variant of TADS which allows games to have graphics and sound in them. Because of this, most platforms have two possible interpreters, a regular TADS interpreter, and a multimedia interpreter. Either version will play any of the TADS games, but since multimedia TADS interpreters can also display graphics and play sounds, I recommend that you use one of them.

Page 25: Beginner's Guide to Interactive Fiction

TADS game files end in .gam. The games which have graphics and sound sometimes have additional resource files, which end in .rs0, .rs1, and so on. You can get a TADS interpreter from this page. Note that TADS interpreters tend to have different names on different platforms: HTML TADS under Windows, HyperTADS on the Mac, etc. You can find TADS games in the /if-archive/games/tads directory of the IF Archive.

Z-Code

Z-code games are, to some extent, the most complex of the ones discussed in this article. Z-code games are written for a virtual machine known as the z-machine, which was developed by Infocom. All of Infocom's text adventures ran on the z-machine, and the text adventure language Inform creates z-code games by default.

Z-code game files come in several varieties: .z3, .z5, .z8, and sometimes .dat. The different filename extensions have to do with what specific flavor of the z-machine they are supposed to run on, but since z-code interpreters will run any of these without complaint, you don't have to worry about these details.

Most z-machine interpreters are variants on one of two basic types, Frotz and Zip. (No, not Zip as in "zipping files up to compress them". I know. It confuses me, too.) On some platforms Zip is preferred; on others, Frotz. Your best bet is to get your interpreter from a page such as this one. There are umpty-ump billion z-code games, which you can get from the /if-archive/games/zcode directory of the IF Archive.

AGT

Once upon a time AGT bestrode the world of amateur interactive fiction like a Sauroposeidon. And like that dinosaur, AGT is not seen as often as it once was. There are still a lot of games available written using this program. AGT games can generally be recognized by the sheer number of files they come in: .d$$, .da1, .da2, and so on through .da6, along with .ttl, .ins, .voc, .opt, and sometimes .cfg. (Did I mention that AGT games come in many many files? I was not lying.) Because of this, AGT games are almost always bundled as zip files. Very rarely you will see a game come in just one .agx file -- more on that in a moment.

The AGT interpreter was originally only available for MS-DOS, but Robert Masenten wrote AGiliTy. AGiliTy is available for many computers. In addition, AGiliTy has the ability to take all of the files mentioned above and replace them with one .agx file. You can get AGT games from the /if-archive/games/agt directory of the IF Archive.

All of the systems I've talked about so far are well established. However, there are newer systems available that are built on the foundation of older systems, namely TADS 3 (often called T3) and Glulx.

TADS 3

Page 26: Beginner's Guide to Interactive Fiction

TADS 3 is the newest version of TADS, and is very much under development. TADS 3 uses a different virtual machine than TADS does. T3 game files end in .t3x, to distinguish them from older .gam files. T3 interpreters are available from the /if-archive/programming/tads2/executables directory of the IF Archive.

Glulx

Glulx is Andrew Plotkin's new virtual machine which is designed to work with Inform and to sidestep some of the limitations of the z-machine. Glulx game files end in .ulx. Its interpreter is called Glulxe, so that there is no possible way that you would confuse it with the virtual machine itself. You can get a copy of Glulxe for your machine from the /if-archive/programming/glulx/interpreters/glulxe directory of the IF Archive.

Page 27: Beginner's Guide to Interactive Fiction

Macintosh Text Adventure Interpreters

This article will help you find interpreters for MacOS Classic. After reading this guide you should be able to make a complete collection of interpreters for all of the major text adventure languages. Note that I won't be describing the different languages and virtual machines that are out there; if you don't know why you'd want a z-machine interpreter, you should read my article on the various interpreters first. Similarly, I won't tell you what the Interactive Fiction Archive is; if you don't know, read this guide to the IF Archive first.

What about MacOS X? Native OS X interpreters are still a little hard to come by. Z-code interpreters are available as native applications, and the Classic apps can still be run in Classic mode. If you'd prefer, you can compile the Unix interpreters yourself if you really don't want to run any interpreters in Classic mode.

As I've said before, writing instructions for downloading and installing interpreters is akin to trying to nail jelly to an air mattress. This guide will no doubt be out-of-date in short order. If you've found an error in this guide or if some of it is now out of date, drop me a line.

I need to talk a moment about packaging. Most Mac interpreters come in StuffIt files, which are recognizable by their .sit extension. You'll need a program to uncompress StuffIt files. Aladdin Systems are the makers of StuffIt; you can download their free StuffIt Expander to deal with StuffIt files. When you download a StuffIt file, run it through StuffIt Expander (assuming your browser doesn't do that for you). Once you've done that you will have either a single application or a folder, either of which you can move to wherever you want on your hard drive. After that you can throw away the StuffIt file.

There are some OS X interpreters which come as disk images, recognizable by their extension .dmg. Occasionally they are gzipped as well, in which case the file ends in .dmg.gz. The nice thing about disk images is that you can mount them by double-clicking on them, making them behave just like a removable disk. Once you've done that, you can open the image and copy files wherever you want them.

Some files you'll download will be in MacBinary format, and end in .bin. StuffIt Expander should handle those just fine.

But wait! There's more! Some files you'll be downloading are BinHexed, and carry the extension .hqx. And as with the other types of files, you'll need to let StuffIt Expander decode BinHexed files for you. Don't be surprised to see StuffIt BinHexed files (.sit.hqx) and Stuffit MacBinary files (.sit.bin). The solution to them all is to run them through StuffIt Expander, the Swiss army knife of Mac uncompression tools.

Finally, if all you're looking for is links to the latest interpreters, you should skip ahead to the last page.

Page 28: Beginner's Guide to Interactive Fiction

TADS

Thanks to the efforts of Iain Merrick and Andrew Pontious, there's a nice HTML TADS interpreter for the Mac called HyperTADS. Near the bottom of the HyperTADS page is a link to the latest version. It's in a StuffIt file. Download, unStuff, and put the resulting HyperTADS executable in a folder on your hard drive. Then throw away the StuffIt file you downloaded and you're ready to go.

Inform/Z-Machine

There are three popular z-machine interpreters available for Macs, MaxZip, Zip Infinity, and Zoom. MaxZip is a Classic app, Zip Infinity is a Carbon app, and Zoom is OS X only. If you're running OS X, I'd recommend Zoom; otherwise, I'd recommend Zip Infinity. Both of those interpreters can handle the graphics and sound of version 6 games, while MaxZip cannot.

Zoom

You can get Zoom from Andrew Hunter's pages. MaxZip comes as a gzipped disk image, which OS X should know how to handle automatically. Double-click on the file to mount the disk image.

Zip Infinity

Zip Infinity can be found at Matthew Russotto's pages. The file is linked near the bottom of the page. It's a StuffIt file. By now you undoubtedly know the routine: download, run through StuffIt Expander until you get a folder, move the folder to your hard drive, and get rid of any leftover .sit files.

Hugo

The latest version of the Hugo interpreter lives in the if-archive/programming/hugo/executables directory of the IF Archive. Look for the wxWindows version of the interpreter hugovnn_wxwin_mac.sit, where nn is the version number of the program. Download and unStuff as per usual.

AGT

Though AGT was originally only available under DOS, Robert Masenten wrote a more portable version of the interpreter and called it AGiliTy. You can download it from the if-archive/programming/agt/agility directory of the IF Archive. Download the MacAgility_n.nn.sit.bin file, where n.nn is the version number of the program. By now I trust you know the drill.

ALAN

Page 29: Beginner's Guide to Interactive Fiction

You can get the Alan interpreter from the if-archive/programming/alan/executables directory on the IF Archive. Download the MacGlk-Alan-nnn.sit.hqx file, where nnn is the version number of the program, and run the file through StuffIt Expander.

Glulx

The Glulxe interpreters, which run Glulx files, live in the if-archive/programming/glulx/interpreters/glulxe directory of the IF Archive. You'll need to download the Glulxe-nnn.hqx file, where nnn is the current Glulxe version number.

TADS 3

TADS 3 is the still-in-progress update to TADS. Luckily for you, if you downloaded the HyperTADS interpreter, you've already got an interpreter which will run TADS 3 games.

IFDropFile

This isn't actually an interpreter, but rather a must-have utility written by Andrew Plotkin. Here's how it works: download IFDropFile. Then, if you ever get a game which shows up as a blank icon or as a SimpleText document, drop the game on IFDropFile. It'll set the Mac type information so that you can double-click the game in order to run it. How about that?

Current Interpreters

Below is a list of all of the current interpreter versions along with links to both the interpreter and the section of this guide where their installation is discussed. This part of the guide is the most likely one to be out of date. If it is, let me know.

Program Current Version

HyperTADS HyperTADS 1.2.8

Zoom Zoom 1.0.1

Zip Infinity Zip Infinity V6

Hugo wxWindows Hugo 3.0.01c

AGT AGiliTy 0.8.9

Alan Macintosh Alan 0.2 (Alan 2.8.6)

Glulx Glulx 0.3.4

IFDropFile IFDropFile 3.1.0

Page 30: Beginner's Guide to Interactive Fiction

Linux Text Adventure Interpreters

Introduction

The world of text adventure interpreters can be a confusing one, especially if you're running Linux. Get this tar-gzipped file, edit that makefile, compile those source files. And that's not even addressing the question of which interpreters you should get.

Hence this guide. I'm going to try to lead you through the steps required to get all the major text adventure interpreters running under Linux. I'm going to assume that you know what the different interpreters are for, and why you want them. In addition, I'll pretend that you have some knowledge of the Interactive Fiction Archive, the major repository for all things related to interactive fiction. If you don't, or would like a refresher course on the GMD archive, take some time and skim through my guide to the IF Archive.

Writing instructions for a process like compiling interpreters is akin to trying to nail jelly to an air mattress. If you have problems with any of these instructions, or if they seem to be outdated, let me know and I'll update them.

Before I get to the heart of the article, I'm going to spend a few minutes talking about tar-gzip archives and makefiles. If you feel comfortable with these concepts, feel free to skip to the next page.

Most files for Linux come as tar-gzipped archives. They're analagous to zip archives under Windows, or Stuffit archives under MacOS. tar stands for "tape archive", and is the format used to back files up to a tape drive. You can recognize tar files by their .tar extension. However, this archive format can be used to back up to single files as well as to tape drives, and the Unix world has gotten used to using them for all-purpose archiving. tar files aren't really compressed much, so most tar files are then run through a compression library called zlib, a process known as gzipping after the name of the program used. The result is a tar-gzip file. Tar-gzipped archives usually have the extension .tar.z, .tar.Z, .tar.gz, or .tgz. To unpack a tar-gzip file, use the command

tar -xzf <filename>

where <filename> is the name of the file you want to unpack. (Note that you shouldn't put < and > around the filename; those are just there to indicate that you have to replace that part of the command with the appropriate filename.) The -xzf part of the command are flags: x stands for eXtract, z tells tar to run the archive through gzip before untarring it, and f tells tar that you're going to give it a Filename instead of using a tape drive.

In many cases, you won't be able to download a precompiled version of the interpreter you want. Instead you'll have to compile source code. Most source code packages involve

Page 31: Beginner's Guide to Interactive Fiction

the use of a makefile. A makefile, usually called Makefile or makefile, defines a set of rules for compiling a program. To invoke it and begin compilation, type make. When you're done compiling, if you want to save the source code but get rid of all of the files that were created during compile, type make clean. Note that this will delete whatever program you just compiled, so be sure to move the program to a new directory before doing a make clean. Otherwise, after you've compiled the program and moved it to its permanent home, you can delete the directory with the source code.

Unfortunately, life isn't usually kind enough to let you just type make and have everything work. You will in all likelihood need to edit the makefile. With any luck this will just involve commenting or uncommenting lines. A comment in a makefile is any line which begins with a #. Commented lines are ignored when make is run. For example:

#LIBDIR = /usr/lib # This line's commented out LIBDIR = /lib # This line isn't

The LIBDIR = /usr/lib line will be ignored during the make. To uncomment a line, remove the # from the beginning of a line. To comment out a line, stick a # at the beginning of the line.

TADS

The executables for TADS live in the if-archive/programming/tads2/executables/ directory of the IF Archive. If you're lucky, that directory may hold a precompiled interpreter for Linux. The precompiled files are usually called tads-linux-2nn.tar.gz or tads-2.n.n.glk.linux.bin.tar.gz. The 2nn and 2.n.n are the version number of TADS; for example, 255 or 2.5.5. Note that there is a new version of TADS, TADS 3; the version of I am talking about in this section is TADS 2. Do not get a TADS interpreter with a version number of 3. Often the precompiled Linux interpreters are a version or three behind the latest release of TADS. To see if a precompiled interpreter is up-to-date or not, look at the file htmltads_nnn.exe. The nnn part will tell you what the most recent version of TADS is. If that version number is the same as the one on the precompiled interpreter, you're good to go. Download the archive and unpack it with the tar -xzf <filename> command.

If the version number on the htmltads_2nn.exe file is larger than that on the precompiled interpreters, or if the precompiled interpreter doesn't work for you, you'll have to compile your own. Look in the if-archive/programming/tads2/source/ directory of the IF Archive. tads_src_2nn.zip is the official source code; tads2src-2nn.tar.gz is a version of the source converted for Unix. If the latter is up-to-date, get it rather than the former, as that will make your life easier.

If you download the Unixified source, unpack it with the tar -xzf command. This will create a directory called tads2 which contains all of the source code.

Page 32: Beginner's Guide to Interactive Fiction

If you download the official source, you'll have to do more work. Once you've downloaded it, unzip it with the unzip -aa <filename> command. The -aa flag is necessary to translate all of the source code files from MS-DOS format to Unix format. If you don't do this, your compile will fail in interesting and unenlightening ways. This will also create a directory called tads2, but all of the filenames will be capitalized incorrectly. To fix that, change to the tads2 directory and run the following Perl command:

perl -e 'while ( <*> ) { rename $_, lc $_; }'

(That is all one command, and should be typed all on one line before you hint ENTER.) That command should make all of the files in the tads2 directory be lowercase. Now you're ready to go.

You have two options when it comes to TADS interpreters: the easier to compile yet not quite as nice plain-vanilla Unix interpreter, and the much nicer yet more complicated to compile Glk interpreter. Glk is a portable I/O library written by Andrew Plotkin which is well-suited for text adventure interpreters. I personally recommend you compile the Glk interpreter.

Unix TADS

To compile the Unix TADS interpreter, go to the tads2/unix directory. You will need to edit the makefile before you compile. Fire up your favorite text editor and open makefile. You will need to uncomment the lines under the Linux 386 with GCC 2.7.2 heading. Search for that string. Once you've found it, remove the # from every line under it starting with the CC line and ending with the MAKEXEC line.

Once you've done that, at the command line type make tadsr. This will compile the tadsr interpreter. Watch the pretty compile messages scroll past your window. If you get a bunch of errors right out of the gate, make sure that, if you got the standard source and not the Unixified source, you used the -aa flag when you unzipped it.

The make may crash and burn while trying to compile osunixt.o. If so, edit the osunixt.c file. Near the top of that file will be the line

/*#include <sys/time.h> /* SRG ditto */

Remove the /* from the start of the line and type make tadsr again. The compile should proceed without trouble this time.

The end result: tadsr. Copy that file to whatever directory you want to keep it in, then either do a make clean to save the source code or delete the tads2 directory and all of the directories beneath it.

Glk TADS

Page 33: Beginner's Guide to Interactive Fiction

Before you can compile GlkTADS, you have to download and compile the Glk library. Get the Glk library source from the Glk home page. Look for the Liberation heading; you want either the GlkTerm or the XGlk library, depending on whether you want to make a terminal interpreter or an X-windows interpreter. Download the appropriate library archive file into the tads2/glk directory.

Unpack the Glk archive you just downloaded. GlkTerm will create a glkterm directory, while XGlk will create an xglk directory. Change to the appropriate directory.

If you're using GlkTerm and you know that your terminal will support Latin-1 characters, then edit gtoption.h and remove the /* and the */ from in front of and behind the line

/* #define OPT_NATIVE_LATIN_1 */

If you're not sure whether your terminal supports Latin-1, try uncommenting this line. If in the end you see strange characters when you run TADS games, put the /* and */ back around that line and recompile.

With any luck you will be able to type make and have the appropriate Glk library created. If not, you will need to play with Makefile in ways beyond the scope of this document.

Once you've compiled the Glk library, go back to the tads2/glk directory. Now you'll have to edit the GlkTADS Makefile. Fire up your text editor and load Makefile. The first thing to do is uncomment the appropriate library section. For example, if you're using GlkTerm, find the part labelled

# # GlkTerm #

and remove the # from the lines below that label until the next blank line. (In the version that was most current when this guide was written, that means uncomment the GLKINCLUDEDIR, GLKLIBDIR, GLKMAKEFILE, GLKEXEFILE, and GLKFLAGS lines.)

Once you've done that, uncomment the appropriate operating system section. Find the part labelled

# # Linux #

If you're using Slackware, remove the # from in front of the first OSFLAGS line. If you're using Red Hat (or most any other distribution of Linux), remove the # from in front of the second OSFLAGS line. Then uncomment the OPTIMIZE and OSLIBS lines.

Close your text editor and at the command line type make. The result? tadsr, if you're using GlkTerm, or xtads, if you're using XGlk. Copy that program file to a safe place. If

Page 34: Beginner's Guide to Interactive Fiction

you want to keep all of the source code, type make clean in the tads2/glk and the Glk library directories to get rid of the extraneous files. Otherwise, delete the tads2 directory and everything beneath it after you've copied the program file.

(Note that, if you're going to compile Hugo, you might want to keep the Glk libraries around, as one version of the Hugo interpreter uses Glk libraries.)

Z-Machine

You have two main choices for a z-machine interpreter: X-windows interpreter or terminal interpreter. For the former I recommend XZip; for the latter, Unix Frotz.

XZip

You'll need to grab the latest XZip source archive from the XZip home page. Once you've done that, unpack it with our old friend, the tar -xzf command. This will create an xzip directory. Change to that directory.

Before you compile XZip, you'll have to edit the Makefile. Load it into your favorite text editor. Uncomment the SYSTEMFLAGS line directly below the part that talks about definitions for Linux. You will probably also have to uncomment the proper definitions for where your X libraries are. If you're unsure about what to do, try closing the makefile and typing make at the command line. If it doesn't work, type make clean, then edit the makefile again. Scroll down and stick a # in front of the only XINCLUDE and XLIB lines that don't already have a #. Somewhere below that are several different XINCLUDE and XLIB possibilities. Find the one which is appropriate for your system and uncomment them. If that doesn't work, you'll have to go hunting for your X libraries and the associated include files and then put the appropriate path definitions in the XINCLUDE and XLIB lines.

Once you're done editing the makefile, type make at the command line. The program will compile, resulting in the files xzip and xzip.1. The former is the program file; the latter, the man page. To read the man page, type man ./xzip.1. Copy both files to wherever you want them to live. If you want to keep the source code around for later, run the make clean command to remove the detritus of compilation; otherwise, remove the xzip directory.

Unix Frotz

You can get the source code for Unix Frotz from the if-archive/infocom/interpreters/frotz/ directory of the IF Archive. At the time of writing the most current release is frotz-2.41.tar.gz. Download the source file and unpack it with the tar -xzf command. Doing so will create a directory, most likely frotz-2.41. Change to that directory. With any luck you will be able to type make and end up with the program frotz. Move frotz to its permanent home and then either do a make clean or delete the frotz-2.41 directory.

Page 35: Beginner's Guide to Interactive Fiction

Hugo

There are three versions of Hugo to choose from, all of which are available from the Hugo home page. There is a text-only console interpreter, a version for X that uses Glk, and a wxWindows-based interpreter which supports sound and graphics.

Console Hugo

Fortunately, the console version of Hugo comes pre-compiled. On the Download page of the Hugo site, scroll down to the Linux section and look for the "binaries package for the ncurses-based (text-only) Linux port". Download that file. tar -xzf the file you downloaded, then copy the program he to a new directory. Tah-dah! All done!

X Hugo

The Hugo interpreter for X makes use of Andrew Plotkin's Glk, a portable I/O library. To compile this version of the interpreter, you'll need three things:

• The Unix Hugo source. On the Downloads page you'll find it near the bottom. Note that it is not in the Linux section.

• The Glk Hugo source. Under the Linux section of the downloads page is the "source code to compile an X windows version".

• The Glk library. You can get it from the Glk home page. Look for the XGlk library under the "Liberation" heading.

Download and unpack the Unix Hugo source. This will create a base source directory. At the time of this writing that directory is hugov2.5.03; if it is different for you, in what follows just replace hugov2.5.03 with whatever your directory is.

Copy the Glk Hugo source to the hugov2.5.03/heglk directory. This source code archive is in zip format, so unzip it with the unzip command. Also copy the XGlk archive you downloaded to the hugov2.5.03 directory and unpack it with the tar -xzf command. This will create an xglk directory.

Now you're ready to start compiling the different pieces. Go to the hugov2.5.03/xglk directory and type make. This should compile the XGlk library; if it doesn't, you'll have to fiddle with the Makefile.

Then go to the hugov2.5.03/heglk directory and type make. There's a reasonable chance that you'll get errors. First, if you get undefined reference to `png_...' errors, then you do not have a PNG library. You can either install such a library or you can go back to the hugov2.5.03/xglk directory, open the Makefile in a text editor, and uncomment the line which reads

# PNGFLAG = -DNO_PNG_AVAILABLE

Page 36: Beginner's Guide to Interactive Fiction

Note that you'll need to delete both the # and the space -- PNGFLAG must be all the way to the left. Once you've done that, do a make clean to get rid of the old compiled library and then a make to re-compile the library.

Second, if you get undefined reference to `jpeg_...' errors, then you do not have a JPEG library. Either install one or go back to the hugov2.5.03/xglk directory, open the Makefile in a text editor, and uncomment the line which reads

# JPEGFLAG = -DNO_JPEG_AVAILABLE

Again note that you'll need to delete the # and the space. Once that's done, do a make clean followed by a make.

If you have to make changes to the XGlk library, once you're done, go back to the hugov2.5.03/heglk directory and run make. The end result is a program called heglk. Copy that program to wherever you want it to live and then do the usual cleaning up after yourself.

wxWindows Hugo

wxWindows is a library for making cross-platform applications for Windows, MacOS, and Unix. It has many benefits for developers. However, you are unlikely to have it installed on your system, so at the least you'll need to get the wxWindows libraries. The required items to get the wxWindows Hugo interpreter up and running are:

• The Hugo wxWindows binary. You can get it from the Hugo download page. • libwx_gtk-2.2. This is the wxWindows library for GTK. You can get this library

package from the wxGTK home page. • libgtk-1.2. The library for the GIMP toolkit. With any luck, you'll have it

installed already; if not, get it from the GTK page. • libgdk-1.2. Again, hopefully you already have this installed. • libglib-1.2 • libpthread • libmikmod-3.1.9. According to Kent Tessman, earlier versions of the MikMod

library were buggy. You can get the latest version from the MikMod home page.

You'll need root access for installing the libraries, as well as familiarity with installing libraries, either from RPMs or from tar-gzip files. At this point I'm going to wave my hands furiously and recommend that you not bother with the wxWindows interpreter if you'd rather not deal with installing all of these libraries. However, once you've installed all of these libraries, the Hugo wxWindows interpreter should run just fine.

Glulx

Besides Infocom's old z-machine, the text adventure language Inform can compile to a second virtual machine: Glulx. To play Glulx games, you'll need a Glulx interpreter such

Page 37: Beginner's Guide to Interactive Fiction

as Glulxe. (I am not making these names up, honest.) You can download a copy of Glulxe for Linux from the if-archive/programming/glulx/interpreters/glulxe directory of the IF Archive. Look for the Linux binaries. Download the tar.gz file and unpack it with the tar -xzf command. This will create two files, glulxeterm and glulxex. Once you get past all of the consonants in those names, you'll discover that the first file is the console version of Glulxe, and the latter is the X version. Use whichever you prefer.

AGT

As befits its reputation as an easy adventure language to learn, getting an AGT interpreter under Unix is a snap. The actual name of the interpreter is AGiliTy. You can get it from the if-archive/programming/agt/agility directory of the IF Archive. Look for the precompiled Linux version. Download the tgz file and unpack it with the tar -xzf command. This will produce a directory called something along the lines of agil-1.1.1. Inside that directory is the agil interpreter, along with several support files.

According to the readme which comes along with agil, the program expects filenames to be in lowercase, but most AGT games come in zip files with all-uppercase names. This isn't actually a problem, but if you'd like to make the names lowercase anyway, when you download an AGT game in a zip file, unzip it with the unzip -L command. The -L flag will convert all of the names to lowercase. Also, if you'd like you can use the agt2agx program to compact the many files of an AGT game into one .agx file to save space and make your life easier.

Alan

Alan is the only one of the interpreters for which source code is not available. You can get the interpreter from the if-archive/programming/alan/executables directory on the IF Archive. Look for the Alan interpreter for Glk with Linux executables. Download the .tar.gz file and unpack it. It'll create a new directory with a name like glkarun-2.86-linux-i386-2. Inside that directory will be the console version (glkarun), the X version (xarun), and the stdio version (cheaparun). Copy the one you want to save to a new directory and you can get rid of the rest of the files.