Back issues



Related links




Tales From the Code Front:
Interactive Fiction in Five Easy Years!

by Stephen Granade

Write Your Own Interactive Fiction! v1.0 by Stephen Granade
Developed with TADS, the Text Adventure Development System.
Beginning game time: November 1989

Enthusiasm, Part I

November 1989. The idea of writing an adventure game came to me while I was a high-school senior. It began life as an idea for a Sierra Online game. I had solved "Hitchhiker's Guide to the Galaxy" and played "Ballyhoo" and "Infidel," but didn't know much about Infocom's other games. On the other hand, I had solved almost every game Sierra produced from King's Quest II through Space Quest III. I had grand visions of creating games for Sierra, a consequence of my surfeit of free time and lack of experience.

Despite these grand visions, I didn't give serious thought to writing a game until I fell sick during Christmas break. Chained to my bed by illness, unable to sit in front of my computer, I was reduced to doodling on a pad. At one point I sketched a gauntlet which, when worn, would teleport the wearer to different locations. I began thinking about the consequences of such a device, how it could be used and abused. I suddenly realized that I had the concept for my game.

After that breakthrough, ideas began pouring forth. I decided to spread the game out over three worlds to give the game a feeling of space. The worlds would be connected by Waystations -- teleportation booths resembling Dr. Who's TARDIS. Naturally, the hero would have to save the universe, but from whom?

Humans, that's who. I had just finished reading several dystopian novels, so the idea had a certain appeal. I pulled out my well-thumbed copies of "Writing Basic Adventure Programs for the TRS-80"[1] and "Creating Adventure Games on Your Computer"[2] and began work in earnest. Within a week I had the basic outline for Waystation completed.

Then I got well.

I belatedly discovered that being bedridden is one of the best ways to get work done. Waystation remained nothing more than fevered scratchings on paper for the next several months.

Enthusiasm, Part 2

April 1990. With the coming of summer, I decided to finish Waystation and send it to Ken Williams, president of Sierra Online. I began by deciding what each world would be like, and deciding how the player would save the universe. Next came the map. I started with blank squares, wrote a two or three-word name for each room, then began designing puzzles for each room. After two months, I had the game designed. The final step was to write general descriptions for all of the rooms, a task which proved more daunting than I expected. One month and many thousands of words later, it was finished and sent via registered mail.

By August I had my reply. An anonymous Sierra secretary sent me a generic form letter. It contained about six paragraphs, ranging from "We loved your letter!" to "I'm afraid that Sierra Online does not give hints through the mail...." Each paragraph had a small blank in front of it; the paragraph which best answered your letter was checked. The checked paragraph in my letter said, "We are sorry to inform you that we cannot use your game ideas. Although we are constantly amazed by our customers' inventiveness...."

With a loud thud, all of my Waystation notes were tossed in the back of a closet.

AGT Rears its Head

November 1991. A college friend showed me the copy of AGT he had downloaded from a local bulletin board. "You can write adventure games with this!" he told me excitedly.

Waystation is reborn. I hauled out my old notes and began work programming the game in AGT. I was able to take the room layout from the maps I had made. Writing the long descriptions of the rooms took some time, since my original descriptions were never intended to be actual printed descriptions. By January, the rooms were ready.

The puzzles were the stumbling block. AGT's metacommand language was quite sufficient for the simpler puzzles, but when I reached Waystation's kitchen area I was stumped. The next several months were spent trying to program and debug that one room. After a while, my enthusiasm dwindled away once more, leaving me with reams of AGT code and little else.

In my infinite wisdom, I decided to write my own interactive fiction language. It was modeled after AGT, the only language I was familiar with. I worked on it beginning in September of 1992, forgetting all about Waystation in the process.

TADS to the Rescue

February 1993. The friend who introduced me to AGT handed me a copy of TADS. After perusing the documentation for one hour, I tossed the notes for my programming language in the closet and pulled out my notes for Waystation. For two weeks I played with TADS, getting a feel for the language.

April 9, 1993. Waystation is reborn. Again. The first rooms went slowly: I was learning the language as I went while I waited for my manual to arrive. The kitchen and cafeteria took a week to code. My coding experience is best typified by what I went through in creating the kitchen and cafeteria.

  • Write the room descriptions for the two connected rooms of the kitchen. 1 hour.
  • Add the conveyor belt, rails, and other decorations to both of the kitchen rooms. 2 hours.
  • Create the turnstile in the kitchen. Realize that a new class is required, one which will print out "Beyond the xxx you see..." 30 minutes.
  • Go back and change all of the "==" to "="; TADS 2.1 doesn't support full C syntax yet. Repeat after every step. 2 minutes each repetition.
  • Debug the "beyonder" class. Discover that the showcontcont() function (which displays the full contents of an object) must also be rewritten to handle the "beyonder" class. 1.5 hours.
  • The second time the kitchen is visited, it is closed. Write all of the code to handle that case. 30 minutes.
  • Move any item left in the kitchen so that it is not seen upon return visits. 20 minutes.
It took 7 hours of coding spread out over three days before I had a working kitchen. After that, though, I knew that TADS could handle any puzzle I could dream up. I finished the first half of Waystation by May of 1993. A summer research job squelched my momentum, and Waystation languished until the spring of 1994. At that point I decided that I had to finish the game. In a burst of frenetic energy, I wrapped up programming in two months and rounded up ten betatesters.

Squashing the Bugs

August 1994. The betatesters began uncovering bugs two minutes after I mailed them their copies of Waystation. Within two days I had over twenty pages of bugs, typos, and suggestions, half of it due to Michael Kinyon alone. Debugging is a long, frustrating process. In Waystation's case, it took from late August until December before I had it in a form that I felt was ready for release. In early January, I uploaded Waystation to GMD.

What I Learned, or How Not To Write IF

Five years of off-and-on work taught me a lot about the process of writing interactive fiction. Hopefully others will find the following advice helpful:
  • Design everything you can on paper before you ever begin programming. It's much easier to toss out unworkable or silly sections if they're only written down. Once you've programmed a section of your game, you'll want to keep it no matter what.
  • Choose the programming language which best suits your needs. TADS dovetailed nicely with my C programming experience; for others, Inform, AGT, Hugo, or any of a dozen other systems may be best.
  • Work EACH day, even if you only spend five to ten minutes some days. Like water wearing away a stone, you can make the colossal task of writing IF manageable if you keep your momentum going. My constant starting and stopping delayed Waystation by over a year, just considering when I started working with TADS.

Thanks for playing Write Your Own Interactive Fiction!
Elapsed game time: 5 years, one month.  


[1] Dacosta, Frank. "Writing Basic Adventure Programs for the TRS-80." Tab Books: Blue Ridge Summit, PA, 1982.

[2] Hartnell, Tim. "Creating Adventure Games on Your Computer." Ballantine Books: New York, 1984.

[right arrow] Go to the next page in this issue
[left arrow] Flip back to the previous page
[top arrow] Go to the XYZZYnews home page
This site is maintained by Eileen Mullin
Legal information