Daily Archives: 10 April 2015


Coding Interactive Fiction for Students

Zork Opening LineThis semester, I’ve been team teaching a composition class themed around narrative and video games. My co-teacher, Joshua Hussey, and I decided to have our students create an interactive fiction game for their final project. We considered both Twine and Inform 7 for the assignment; Twine has a low barrier to entry, as it is user friendly and allows content creators to almost immediately begin building their projects. But Twine’s level of interactivity is somewhat more limited as it is mostly built on a multiple-choice style of interaction, in which reader/players are given a list of options from which they select the next path in the story. Zoe Quinn’s well-known game Depression Quest was developed with Twine. Inform 7, on the other hand, has a much steeper learning curve. As a naturalistic code language, the code that it produces is very readable; even someone with little to no coding experience could probably make some sense out of a simple Inform 7 project without too much assistance. However, this naturalistic language can be somewhat deceptive to an unsuspecting novice, as it can make it seem as if Inform 7 can understand whatever English you throw at it. Nothing could be further from the truth; while Inform 7 eschews the brackets and braces that adorn other coding languages, it is still very much a language with clear and specific rules that users must learn and follow. However, Inform 7 allows users to create interactive fiction games in which reader/players have a far greater degree of control over how they interact with the story space. These games are the progeny of Zork and the genre it created.

The basic Inform 7 dual-paned screen, with code on the left and the "skein" on the right.

The basic Inform 7 dual-paned screen, with code on the left and the “skein” on the right.

Considering these two options, we settled on Inform 7 as we felt that the challenge it offered and the creative opportunities it provided would be best for our students. But I had not done any significant coding since high school, and so in the weeks leading up to the beginning of the unit, I created a small game for our students to play. The experience was a chance for me to learn some of the basics of Inform 7, but also to think about puzzle design and spatial dynamics in a textual form. In this case, I thought it would be fun to make the assignment sheet for our students’ Inform 7 Project the “prize” for completing the game. Drawing from our class discussions of textual space and branching narratives (one of the puzzles requires the player to consult Borges’s story “The Garden of the Forking Paths,” which we read early in the semester), I wanted the game to allow students to explore a small text environment while also providing them with an example of what they could accomplish using Inform 7. In all fairness the game is pretty haphazard, but I wanted to share it nevertheless.

In the end, the game may have been too difficult, not because the puzzles themselves are impossible, but because building great puzzles is also about providing the right kind of clues and directions to players. Judging from my website’s metrics, most of the students at least attempted the game, but only a fraction made it all the way to the assignment sheet at the end. Furthermore, the puzzles in my game were really a hodgepodge because I was trying different kinds of functions in Inform 7. Still, when a student says that playing an interactive fiction game was the most interesting way they had ever been asked to find an assignment sheet, I count that a moderate success.

Play my Inform 7 game, “Meaningful Instructions and Where to Find Them”

For more information on playing interactive fiction games, consult Emily Short’s Introduction to Interactive Fiction