Writing Interactive Fiction With Adrift

Once students have tried and enjoyed interactive fiction, they often inquire about writing their own works of IF. Frequently, students are impatient to get on with the IF-writing adventure, and a realistic teacher may have to rein them in a bit. It doesn’t make much sense to try to write in a genre that you don’t really understand.

Still, creating interactive fiction can be enjoyable and educational. The necessary first step, if a real work of fiction is the goal, is for the student-authors to produce a non-interactive script of the works they hope to produce. Creating a good script will require students to apply the usual stages of the writing process: prewriting, drafting, revising, editing, and publishing.

Here’s the script of a very simple interactive story.

“Lost Chicken” Script

You’ve made it to your home, as usual, but it seems that you’ve forgotten your key.

Lost Chicken
An Interactive Fiction by Brendan Desilets 

Outside Front Door
You’re outside your front door. The door is to the west, and your front yard is to the south.

You can see a doormat and an oak door here.

 >i
You are carrying:
a pet treat

 >x doormat
You find a note under the doormat and pick it up.

 >read note
The note reads, “The chicken hides the spare.”

 >s

 South Yard

This is the lovely south yard of your home.

 You can see Bronson Alcatt and a plaster chicken (closed) here.

 >look at Bronson

Your very old cat, always a formidable presence. He looks particularly grumpy right now, as he rubs against his favorite lawn ornament, a plaster chicken.

 >open chicken

Your irascible cat scratches you, preventing you from getting at the chicken.

 >give treat to Bronson

Bronson gobbles up the treat. He looks less grumpy now.

 >open chicken

You open the plaster chicken, revealing a key.

 >take key

Taken.

 >n

 Outside Front Door

You’re outside your front door. The door is to the west, and your front yard is to the south.

 You can see a doormat and an oak door here.

 >w

You unlock the door and enter your house.

 Front Hall

You have made it inside, where Bronson happily joins you.

 *** The End ***

Of course, the script is just an early step. Even with the best of scripts in hand, a writer needs a way to create the interactivity that students enjoy so much. Fortunately, though, a number of excellent authoring systems for interactive fiction are available.

ZIL and TADS

 In the commercial heyday of IF (the 1980’s), professional writers and programmers produced the works with authoring systems that looked like other programming languages. The most prominent publisher of interactive fiction at this time was an MIT spinoff called Infocom. The writers who worked at Infocom used a proprietary system called Zork Implementation Language (ZIL). ZIL is available today, but it’s not a system that current writers use.

At present, the most popular authoring system of the programming-language type is TADS 3 by Mike Roberts. This is an outstanding authoring system in many ways. It has excellent documentation, great flexibility, and an active community of users. When TADS first appeared in 1988 as shareware, it was the only fully-featured system of its kind. Now, TADS is completely free of charge.

Of course, if you’re not a teacher of computer science, you’re probably not interested in showing your students how to program in a language that looks like C, with a few bits of Pascal. The whole approach is just too arcane for most of us. As an example, here’s a bit of TADS 3 code, courtesy of the “Get Me Writing” website (http://www.getmewriting.com).

entryway: Room ‘Entryway’

“This large, formal entryway is slightly intimidating:
the walls are lined with somber portraits of gray-haired
men from decades past; a medieval suit of armor<<describeAxe>>
towers over a single straight-backed wooden chair. The
front door leads back outside to the south. A hallway leads
north. ”

describeAxe
{
if (axe.isIn(suitOfArmor))
“, posed with a battle axe at the ready,”;
}

north = hallway

south = frontDoor

out = frontDoor
;

+ frontDoor: Door ‘front door’ ‘front door’
“It’s a heavy wooden door, currently closed. ”

initiallyOpen = nil

dobjFor(Open)
{
action() { “You’d rather stay in the house for now. “; }
}
;

 

 

Inform

Inform

In 1993, the British polymath Graham Nelson introduced Inform, another authoring system of the programming-language sort. By the end of 1996, the system had developed into a very stable version, Inform 6, which came to rival TADS in popularity. In 2006, Nelson published Inform 7, ushering in a dramatic change. Inform 7 does not look very much like a programming language at all. In fact, its source code is, more or less, a subset of ordinary “natural language.” Inform 7 is a tool of immense educative power, and it’s the topic of three separate sections of this website.

Like TADS, Inform, in its varying versions, runs on Windows, MacOS, and Linux, and features remarkably thorough documentation. All versions of Inform are free.

 

 

Adrift and Quest

Adrift_Rooms 

In 1988, English developer Campbell Wild introduced Adrift Developer (originally called Adrift Generator), a Windows-only tool for making IF stories with a minimum of programming.

Adrift tries to provide most of the functions of TADS and Inform, through a series of forms and menus. Adrift lacks the power and flexibility of TADS and Inform, and it cannot approach the thoroughness of documentation that characterizes the other systems. However, it is probably the fastest way for students to produce simple works of interactive fiction – and more advanced stories, too — complete with pictures and on-screen mapping. Adrift started as commercial software, but is now free of charge. An Adrift tutorial appears later in this section of the website.

quest

In 1998, Alex Warren, a British developer, published Quest, another user-friendly way to write interactive stories. Quest started out as a Windows-only platform, but it now offers a Web version as well. Like many Web versions of PC software, Quest on the Web is somewhat slow, buggy, and truncated, but it’s usable. Initially, Quest may involve a slightly steeper learning curve than Adrift, but it has an advantage for educators in that offers ActiveLit, a private place on the Web for classes to use in working with interactive fiction. The Quest website includes a helpful series of tutorials, at http://docs.textadventures.co.uk/quest/tutorial/tutorial_introduction.html. These tutorials focus mainly on the Windows variation of Quest. In another section of this site, we’ll offer a tutorial on using the Web version.

activelit  

A Tutorial for Adrift, Version 5

Since Adrift is probably the fastest way for students to get their own IF stories up and running, we offer a rather lengthy tutorial. To keep the formatting of the tutorial consistent, the document is in the form of a .pdf file, which you can access using this link.

 

Leave a Reply

Your email address will not be published.