Remember playing text-based computer games? Depending on your generation (and your fondness for nostalgia-inducing computer games), the words “You are likely to be eaten by a grue” may or may not resonate, but for players of Zork and other classic games they are hauntingly familiar.
Text-based games haven’t gone away, and they can be an accessible starting point for bringing games into your classroom in an unexpected way.
Text-based games, or interactive fiction, have continued to evolve since the days of Zork. Many works can be powerful for play in the classroom: Emily Short’s “interactive epistolary” First Draft of the Revolution, Andrew Plotkin’s physics-grounded Dual Transform, Peter Nepstad’s historically grounded 1893: A World’s Fair Mystery, and Aaron’s Reed’s interactive novel Blue Lacuna are only a few examples among a vast archive of varied works.
One of the great appeals of text-based games is the relative ease with which you can make them. Building a text-based game can be an exciting assignment in any classroom, and an opportunity to present ideas or think about stories in a new way. I’ve talked in the past about making games in the classroom, but it can be daunting to get started, especially when graphics and interfaces are involved. So throughout this series, I’m going to introduce a few free tools and resources for making games, beginning with one of my favorites: Inform 7. You can download Inform 7 for free and get started creating interactive fiction easily--I recommend the Writing with Inform manual for getting started.
Inform 7 is a powerful starting point for those who’ve never programmed because it uses natural language for creating everything. What do I mean by “natural language” code? Here’s an example:
The Classroom is a room. “You are surrounded by computer monitors. Most are dark, but one screen flickers with text. A whiteboard with smudged text covers the front wall. The professor’s desk is in front of the room.”.
This includes one line of “code,” The Classroom is a room. It’s followed by a description (anything in quotes) that Inform 7 connects to the object (the Classroom) that was just defined. We can add more complex objects by defining them in terms that Inform 7 already understands:
A desk is a supporter in the classroom. “It’s a shabby desk, strewn with office supply junk.” Instead of taking desk, say “You really don’t want a desk with this many battle-scars.” A book is a container on the desk. “The book is Aaron Reed’s ‘Creating Interactive Fiction with Inform 7.’ You notice that the book describes the creation of an interactive story in great detail.”
This snippet includes three lines of code: the first creates an object called a desk in the classroom we’ve already established. The second reacts to the user should they try to take the desk: this is part of the core of building interactive fiction, trying to anticipate actions the user might try and respond to them appropriately. The third line establishes a book sitting on the desk, possible because of the definition of the desk as a “supporter” capable of holding other objects.
Once a game has a room like this one, the player can explore it through text commands, interacting with the objects under the rules we’ve set: here’s a great introduction to playing interactive fiction. These snippets are from quick introduction to Inform 7 I created for Brian’s Teaching with Games MLA 13 roundtable. You can play it (and view the complete source text) online.
Working with language on this level has many potential applications for thinking about lliterature, but interactive fiction has also been used for creating interactive philosophical quandaries in the classroom or interpreting historical work. You can find several resources on teaching with Inform 7 on their site. I use Inform 7 in my classroom primarily for changing students’ understanding of narrative, but it also encourages a different way of thinking--and can make an interesting start for bringing some of the logic of programming into your classroom.
Have you worked with Inform 7 or created a text-based game? Share your ideas and experiences for making games in the classroom in the comments!
[CC BY 2.0 Photo by Flickr User Believekevin]