Argax Project

Node Status: COMPLETE

Interactive Fiction

History

The first text adventure game was Colossal Cave Adventure, commonly called Adventure or simply Advent. Adventure was written in 1975/6 by Will Crowther as a personal project to create a game that his two young daughters could play. An avid caver, Crowther modelled the "rooms" and locations of Adventure on the Bedquilt entrance of the Flint-Mammoth cave system in Kentucky. Sprinkled through this landscape are a few fantasy elements, such as a dwarf and a pirate, and various puzzles to solve. With Crowther's permission, the game was soon expanded upon by Don Woods, a graduate student at Stanford University. This version inspired many other Adventure clones, variants, and imitators across the networked mainframes of late 1970s academia (Montfort 2005).

One of the most popular Adventure clones was Zork, developed by students at MIT. Its developers soon started a software company, Infocom, in 1980. Infocom developed a virtual machine called the Z-Machine. This virtual machine allowed Infocom's game authors to code a single version of a game that could then be played on most of the diverse and usually incompatible home PC hardware available at the time. Infocom started by converting their mainframe version of Zork into a trilogy of games for PCs. However, they soon expanded beyond the fantasy-tinted dungeon-crawling genre. Their catalog eventually included murder mystery, sci-fi, and pulp fictions games (Montfort 2005).

Other companies, such as Scott Adam's Adventure International, Synapse, Level 9, Magnetic Scrolls, and Legend Entertainment soon joined the market. As they collectively explored broader genres, wrote games based on existing novels, and collaborated with established fiction authors on new games, many of these companies embraced the term interactive fiction (IF) as a more literary and inclusive term than text adventure. Text-based games were no longer only dungeon-crawling adventures (Montfort 2005).

The commercial boom of interactive fiction was short-lived, however. By the end of the 1980s, it was losing ground to the new graphical adventure games, such a Sierra's King's Quest and Space Quest series and LucasArts's Secret of Monkey Island. The last mainstream commercial IF game was Legend Entertainment's Gateway II: Homeworld in 1993 (Montfort 2005).

Yet the end of IF's commercial viability did not mean the death of the form as a whole. To this day, a small but avid community of independent developers continue to produce interactive fiction games. Originally formed on the Usenet newsgroups rec.arts.int-fiction and rec.games.int-fiction, this community has hosted an annual Interactive Fiction Competition (2015) since 1995. The community includes such developers and authors as Graham Nelson, Andrew "Zarf" Plotkin, Roger Firth, Adam Cadre, Emily Short, Mike Roberts, and Eric Eve. The community maintains a public archive of decades of IF games in the IF Archive (2015) and the Interactive Fiction Database (2015). Sites such as the Brass Lantern (2015) help introduce both players and new authors to the genre.

Many of the artistically significant IF games have appeared from this community, well after the commercial boom. Examples include such games Galatea, Photopia, and Lost Pig, though many other examples also exist. Emily Post's Galatea (2000) subverted the normal puzzle basis of IF by providing only a single room and a living statue to converse with. Adam Cadre's Photopia (1998) also does away with most puzzles. It consists of a series of seemingly disconnected short vignettes, some fantastic and some mundane. Cadre uses color to mark the different fantasy sections. The stories all come together into a single poignant conclusion that reveals that the different stories all revolve around a single teenage girl whom we never play directly as a character. Lost Pig (2007) pokes fun at the traditional puzzle-solving dungeon-crawling genre of IF while exploring the effects of narrator voice.

For a much more extensive history and introduction to interactive fiction, see Nick Montfort's Twisty Little Passages (2005).

Essence of IF

Traditional interactive fiction can be defined as an explicitly-modelled narrative world with a text-based user interface.

Thus, the first essential feature of IF is an explicitly-modeled world. By "explicitly-modelled", I mean that the relevant states of objects in the virtual world are tracked using variables in computer memory. For example, a game may contain a desk drawer. Not all possible features of this drawer will be modelled. For example, the color of its knob or its exact measurements may not be relevant to this particular narrative. However, some state about it will be tracked. At the very least, this state will include the object's current description and what actions can be performed on it. Additional state might include its location: the drawer is in the desk, which in turn is in the library. The model might include whether the drawer is currently open or closed, and it may include which other objects are currently located within the drawer. Furthermore, most of these states will need to be conveyed to the player through the description of the object. That description will then need to change accordingly whenever the state of the object changes--such as if the player opens the drawer or pulls it out entirely and carries it off with him (if this hypothetical drawer supports such an action).

Secondly, an IF world fills some sort of narrative purpose. This narrative may often be fairly primitive, consisting of little more than the entertaining series of events that is produced by the player's exploration from the first location in the game through the last. Yet there is often both a clear starting and ending point in IF games. This gives us the essential beginning-middle-end structure of a story (Aristotle 1961). In addition, there are often puzzles and challenges for the player to overcome along the way that impose a certain linearity to the middle of the story. For example, before the player can enter a castle, she may have to climb a tree and discover the key to the front gate in a bird's nest. It is this combination of challenge and narrative that makes IF a game, rather than only a virtual world simulation.

Finally, the user interface to an IF world is text-based. The world--including both objects and events--is revealed through text descriptions. Also, input to an IF game is text-based. Early games typically supported only one or two-word imperative commands, such as verb or a verb and the object to be effective. Most modern IF games offer a robust natural language parser that can handle sentence-like grammar and differentiate between ambiguous objects based on the current world state.

IF games are usually turn-based. A user reads the current description, types in a command, and is rewarded with a narration of the effects of that action (or an error message, if the command could not be interpreted as a valid action). The IF system then waits for another input from the user.1 This cycle of turn-taking produces an ongoing dialog between the IF system and the player.

Given this definition, there are a number of different angles from which we can conceptualize interactive fiction. First of all, IF is a computer program, with such corresponding features as input, output, procedural generation, and saving state from memory to disk. Secondly, we can examine IF in terms of its virtual world, such as its objects and behaviors. Alternatively, we can think of IF in terms of a game, exploring its challenge level, rewards, scoring mechanism (when present), and user enjoyment. Specifically, we can explore the puzzles that comprise the bulk of the material of most IF games.

As its name suggests, narrative is also a very important aspect of any interactive fiction. This includes the unfolding plot, the various characters, the quality of the narration, the richness of the descriptions, the mood or tone, the genre, and so. The player may piece together a past story through notes or clues left behind by a previous adventurer or a lost civilization. The story may be fairly nascent, emerging primarily from the player's exploration of an open world. Or there may be a well-defined tale, given a tight linear structure by the preconditions and necessary sequence of the puzzles that make up the game.

Nick Montfort (2005) offers the metaphor of a literary riddle as another way to conceptualize the nature of interactive fiction. Like IF, riddles have the potential for significant literary quality or to give us cause to reflect upon our understanding of the world. Yet, like IF, riddles are often marginalized as only trivial games for children. The riddle present an implicit puzzle to be solved. It casts the world and the objects it describes in certain terms that the solver of the riddle must explore closely in order to proceed. For example, here is a classic riddle:

What runs but never walks,
Often murmurs but never talks,
Has a bed but never sleeps,
Has a mouth but never eats.

It casts a common object2 in terms of human qualities. It implicitly asks to listener to explore that description and propose different solutions until one--often obvious in retrospect--is finally discovered. This is not so different from playing an IF game.

Related Forms

When defining a new category, it is often useful to explore the boundaries and edge cases of that category. There are a number of other game forms that are similar to IF in some way but that are not considered to be interactive fiction in the traditional sense.

Hypertext fiction is also a digital text-based genre. Indeed, both IF and hypertext fiction are often grouped together under the broader category of digital literature. Works of hypertext fiction comprise of a number of separate pages connected by links. Such works can be implemented to run in a special hypertext interpreter--such as Storyspace (Bolter & Joyce 1987), which predates the World Wide Web--or simply as HTML pages in a web browser. The reader clicks on links embedded within the text to move between the pages. In some hypertext works, the path taken by the reader through the pages--also called lexia--does not affect the events of the narrative. Instead, it affects only the discourse-level experience by changing the order in which the lexia and related story events are experienced. In other hypertext works, the links chosen by the reader may actually affect the underlying story by taking the reader through only a subset of the possible lexia, much like a Choose Your Own Adventure book.

Unlike interactive fiction, hypertext fiction does not explicitly model the story world as software objects in computer memory. Therefore, it cannot track changes in the state of that world. Also unlike traditional interactive fiction, there is no natural language parser for input.

Some hypertext fiction systems, such as Twine (Klimas 2015), muddy these waters a bit by providing support for variables and conditional behavior. Although this still does not provide a full world model, it does allow for some limited tracking of world or story state. This is somewhat reminiscent of the gamebooks that were popular in the 1980s. These paperback adventures added initial tool and skill selections, dice rolls, and randomized combat to what was otherwise a Choose Your Own Adventure story. Joe Denver's Lone Wolf is a classic example of this genre and is now available in digital form (Project Aon 2014). While I would argue that Twine is not true IF, the distinction gets fuzzy and others disagree. Many Twine games are now listed in the IFDB (2015).

Graphical adventure games evolved directly from text adventure games. Both have an explicitly modelled world. Mystery House (Williams 1980) was essentially a text adventure game, but with shorter room descriptions and a single line-drawing for each location. Yet this game lead to the creation of Sierra Online. As their graphics improved, graphical adventures could dispense with the room description entirely. While these maintained a natural language parser through most of the 1980s, they eventually transitioned to a point-and-click system for input. Legend Entertainment's games also pushed the boundary of IF toward graphical games, though they essentially remained IF games.

MUDs (Multi-User Dungeon) and MOOs (MUD, Object Oriented) are very similar to IF and were in fact directly inspired by Adventure, Zork, and other early text-adventure games. As the name suggests, many early MUDs persisted the fantasy-based dungeon-crawling adventure theme, though later MUDs did explore different genres and even supported non-game-related environments for social chat and education. Like IF, MUDs are primarily text-based for both input and output and they have a modelled virtual world. The difference is that MUDs are multiplayer, with players connecting to the MUD server over the Internet or (in the past) by modem. The social aspect of MUDs tends to shift the focus of the game experience away from narrative, lone exploration, and puzzle-solving towards chat, roleplaying, and player vs player combat or collaboration. As with the evolution from IF to graphical adventure games, MUDs gradually included more graphical elements and eventually evolved into MMORPGs (Massively Multiplayer Online Roleplaying Games).

Finally, there are text-based world simulation systems like SHRDLU (Winograd 1971). SHRDLU was an early AI program that explored natural language understanding. Like an IF game, it included a detailed virtual world and a complex parser for input. Its output included both text and an image of the current world state. Unlike IF, the primary goal of SHRDLU was not entertainment or to produce a narrative or game-like experience.

Current IF Platforms

Although a number of others exist, the two most popular platforms for authoring interactive fiction today are Inform ("Home: Inform" 2015) and TADS ("TADS" 2015).

Inform

Inform has the larger community. Inform games can compile into one of two formats. One runs on the Z-Machine virtual machine, which was designed by Infocom in the late 1970s. The other supported format is the Glulx virtual machine, designed by Andrew "Zarf" Plotkin in the late 1990s ("Playing Interactive Fiction" 2015).

Since Inform games are designed to run in a virtual machine, an interpreter is required to run them. While most of these are designed for major operating systems such as Windows, Mac OS X, or Linux, a number of other platforms are also supported. There has recently been work done to develop browser-based interpreters. For example, Parchment ("Parchment" 2015) supports both Z-Machine and Glulx games. Quixe (Plotkin 2014) is a Javascript-based interpreter for Glulx files.

Inform 7, the latest version of Inform, has significantly changed the Inform programming language to be more like natural language. It also offers an Integrated Development Environment (IDE) and other programming tools.

Aside from the compiler and interpreter, the Inform community has also created a number of code libraries and extensions that a game author can leverage in their games for added functionality.

TADS

Like Inform, TADS--the Text Adventure Development System--has been in active use since the early 1990s. TADS games also compile to a custom virtual machine architecture. The TADS language has a C-like syntax, and it includes a robust default library for modeling complex objects and the interactions between them. TADS3, the latest version, includes a client-server architecture for running web-based IF games.

Serious Applications of IF

Interactive fiction has been used for more than entertainment. It is has been used widely in education, from middle school through college level courses ("Teach with Inform" 2015). At lower academic levels, it can be used to teach reading and foreign language skills. For young authors, it can be used to teach programming basics. In more interdisciplinary programs, students can author games as projects to learn history, narrative, game design, and new media concepts.

IF in Interactive Drama Research

Within the broader field of interactive narrative, interactive drama research explores how artificial intelligence might be used to author more interactive stories. Specifically, in an interactive drama the player assumes the role of a character in the story. An AI agent then acts as a drama manager for that story, actively shaping or even creating the story at run-time in response to the player's actions in the virtual world.

Interactive fiction provides an appropriate medium for such works, especially in prototype stages. Out of the box, Inform and TADS provide the tools to quickly and easily build a sufficiently complex story world, including simple characters. The existing interpreter handles text input, and text as an output medium can support a rich, emotional experience without the time and expense required for detailed graphics or physics engines. The following are some examples of such uses of IF.

In evaluating a search-tree-based approach to interactive drama management, Weyrauch (1997) constructed a short text-based scenario named Tea for Three. This scene was inspried by part of Infocom's 1982 game, Deadline. Evaluation was done using simulated players in order to generate a high volume of sample game runs.

Nelson and Mateas (2005) revisited Weyhrauch's particular search-based approach, applying it to a modified subset of Michael S. Gentry's IF game, Anchorhead. Finding that Weyhrauch's approach did not perform as well on a different game, Nelson et al. proposed a declarative optimization-based drama managment (DODM) approach (2006). In a DODM system, the author defines the story as a series of high-level plot points and provides an evaluation function to rate different possible plot-point sequences. The drama manager then uses this evaluation function and a predictive model of future player actions in order to make changes in the game world that are likely to make particular future plot points more or less likely. In this way, the drama manager can guide the player towards a story that more closely fits the author's original vision. Evalaution of this approach was done using simulated players.

Sharma, Ontañón, Mehta, and Ram (2010) used a different approach to drama management. Their case-based drama manager uses models of past players' story preferences to determine optimal story paths. By comparing the current player's actions to those of its models, it attempts to encourage the player towards subplots deemed to be of greater likely interest while steering the player away from plots of lesser interest. Sharma et al. used the same portion of Anchorhead used by Nelson et al., but they tested their system with live players. They argued that such evaluation offered much richer findings than using simulated players.

In 2011, I used Inform to author an IF game, Demeter: Blood in the Sky, in order to evaluate my own approach to interactive drama management (Tomaszewski 2011). My drama manager, Marlinspike, used pre-authored story segments called scenes to advance the story in response to player actions. Marlinspike would either select the next scene or customize its contents in such a way as to build upon, or reincorporate, as many of the previous player's actions as possible.

Like Sharma et al., I tested my system using using real players. I also found this to be a valuable approach. One of my discoveries was that, while system-level metrics showed a significant improvement to the resulting story structure when Marlinspike used reincorporation versus when it did not, real players did not report a corresponding difference. However, I also discovered that many players had difficulty with the traditional IF interface. Distracted by input errors and unclear affordances, they seemed to lack the world-level agency required to engage effectively with the story-level changes Marlinspike was producing.

Given the history of IF's use in interactive drama and the growing realization that new systems need to be evaluated with real users, I became interested in improving IF's traditional user interface.

Works Cited

Notes

  1. Some IF games do have real-time events. In these cases, new events and output may occur even if the user does not enter another command.
  2. A river.