Colossal Cave, Zork, and Interactive Fiction
Abstract
The text adventure is the oldest storytelling form native to the computer, and it started with a caver’s side project. Around 1976 Will Crowther, an engineer who helped build the ARPANET, wrote Colossal Cave Adventure in FORTRAN, a game with no graphics that you played by typing English at it. Stanford’s Don Woods expanded it, it spread across the network, and it spawned a genre. MIT students answered it with Zork (1977), and the company they formed, Infocom, built a virtual machine so one game could run on every incompatible home computer of the early 1980s, roughly fifteen years before Java did the same trick and called it new. Graphics eventually buried the commercial text adventure, but the form did not die: hobbyists reverse-engineered Infocom’s machine in the 1990s and have been writing “interactive fiction” for it ever since.
The Cave
Will Crowther worked at Bolt, Beranek and Newman in the early 1970s, writing code for the Interface Message Processors that were the ARPANET’s first routers (see ARPANET: Building the Network). He was also a serious caver who, with his wife Patricia, had helped survey Mammoth Cave in Kentucky through the Cave Research Foundation. After the couple divorced, Crowther wanted something to share with his two daughters, and around 1976 he wrote a program that let a player wander a cave by typing commands, its geography modeled on passages he had actually crawled, its combat and treasure borrowed from the Dungeons & Dragons games he played.
The program ran on a PDP-10 in FORTRAN and understood one- and two-word commands: GO NORTH, TAKE LAMP, KILL DRAGON. Don Woods, a graduate student at Stanford, found a copy on a lab machine around 1977, tracked Crowther down (by emailing “crowther” at every host on the ARPANET), got the source, and expanded it into a larger fantasy with a 350-point scoring system. From Woods’s version the game traveled the network to every research machine that could run it, and it left permanent marks on hacker vocabulary: the magic word XYZZY, and the maze whose every room reads “YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL ALIKE.”
Zork and the Parser
Adventure reached MIT, and a group in the Dynamic Modeling Group decided they could do better. In 1977 Tim Anderson, Marc Blank, Dave Lebling, and Bruce Daniels wrote Zork on a PDP-10 in MDL, a dialect of Lisp. Its advance over Adventure was the parser. Where Crowther’s game took a verb and a noun, Zork parsed something closer to real sentences: PUT THE LAMP AND THE SWORD IN THE CASE worked, and the game understood articles, prepositions, and multiple objects. “Zork” was MIT hacker slang for an unfinished program, and the name stuck.
The problem was that Zork lived on a half-million-dollar mainframe, and the people buying Apple IIs and TRS-80s could not run a word of it.
The Z-Machine
The solution is the reason Zork belongs in a history of computer science and not only of games. In 1979 several of the MIT group incorporated Infocom (on 22 June 1979, founders including Blank, Lebling, Al Vezza, and Joel Berez) and faced the era’s central portability problem: a dozen home computers, each with a different processor, memory size, and disk format, none able to run another’s software.
Their answer was a virtual machine. Joel Berez and Marc Blank designed an idealized fantasy computer, the Z-machine, in 1979, with its own instruction set tuned for text games, and the games were written in a high-level language called ZIL (Zork Implementation Language) that compiled to Z-machine “story files.” To bring the games to a new platform, they did not rewrite the games; they wrote one small interpreter that emulated the Z-machine on that platform. Author once, port the interpreter, run everywhere. A single Zork story file ran unchanged on the Apple II, the Commodore 64, the IBM PC, the Atari, the Mac, and the Amiga; by July 1984 Infocom was publishing for 15 different machines plus generic CP/M and MS-DOS. This is the same idea the Java Virtual Machine sold as a breakthrough in 1995: compile to bytecode for an abstract machine, then supply a small native interpreter per platform. Infocom shipped the first product built that way, Zork I, in 1980.
Splitting the mainframe Zork to fit a home computer’s memory produced three games, Zork I (1980), II (1981), and III (1982). The trilogy sold about 680,000 copies, a third of the roughly two million games Infocom sold in its lifetime.
Feelies and the Peak
Infocom leaned into having no graphics, running ads that argued the pictures its games drew in your head beat anything a 1983 monitor could show. It sold through bookstores as well as software shops, and it packaged each game with feelies: physical props that set the mood and doubled as copy protection, since a puzzle might require a code printed on an object in the box. The line grew literary and strange, from mysteries to A Mind Forever Voyaging to Trinity. Its commercial peak was The Hitchhiker’s Guide to the Galaxy (November 1984), written by Infocom’s Steve Meretzky with Douglas Adams; it sold about 400,000 copies, more than Zork I, and its deliberately cruel puzzles (the game lies to you) are still argued about.
Dead End
Two things ended Infocom. The first was self-inflicted. In 1985 the company poured its game profits into Cornerstone, a relational database for business users; it was priced high, tied to its own copy-protected Z-machine-style runtime, and sold about 10,000 copies. The failure gutted the company’s cash. In June 1986 Activision bought the weakened Infocom for $7.5 million, and after several money-losing years and a management clash, closed the division on 5 May 1989.
The second cause was the whole market moving. Graphics got cheap and good, and the adventure game followed the pictures. Sierra On-Line had put images on adventures from 1980 and animated them from 1984; LucasArts’ point-and-click games (Maniac Mansion in 1987, then The Secret of Monkey Island) dropped the typed parser entirely for a mouse and a menu of verbs. Against a screen you could see and click, a blinking prompt asking you to guess the right words felt like work. The commercial text adventure was gone by the end of the 1980s.
The Afterlife
The form outlived the industry because its runtime was small and its files were portable. In May 1993 Graham Nelson, then finishing a mathematics doctorate at Oxford, released Inform, a free language that compiled new games into the exact story-file format Infocom’s old interpreters still ran. He had worked the format out from detailed study of the surviving Infocom story files, and over the following years wrote it up as the Z-Machine Standard, the document the whole later toolchain builds on. His own game Curses (1993) was the first written in Inform, and the two together restarted the field as a hobby. An annual Interactive Fiction Competition began in 1995, a volunteer archive collected the games, and a community of authors kept writing what they now called interactive fiction rather than “adventure games,” the artistic ambitions louder than the commercial ones had ever been. Inform’s 2006 version let authors write games in something close to plain English.
The genre also branched. When Roy Trubshaw and Richard Bartle wired an Adventure-style world to a network so several people could explore it at once, they made MUD (1978), the multiplayer text world that leads to the whole later history of online games (see MMORPGs and Virtual Worlds). Colossal Cave’s two-word parser turned out to be a seed with a long root system: text worlds, the first storytelling machines, and one of the earliest portable virtual machines, all from a divorced programmer trying to make something his kids would enjoy.
📚 Sources
- Colossal Cave Adventure — Wikipedia — Crowther’s caving and BBN work, the FORTRAN original, Don Woods’s expansion, and the XYZZY/maze lore
- Infocom — Wikipedia — Zork’s 1977 MIT origin, the June 1979 founding, the Z-machine and ZIL, sales figures, the Cornerstone failure, and the Activision acquisition and 1989 shutdown
- Zork — Wikipedia — the MDL implementation and the parser that read full sentences
- Graham Nelson — Wikipedia — Nelson’s Oxford doctorate, Inform, Curses (1993), and the interactive-fiction revival
- Z-machine — Wikipedia — Berez and Blank’s 1979 design, the 15 supported machines by July 1984, and Nelson’s Z-Machine Standard
- Inform — Wikipedia — Inform 1 in 1993, Curses as the first Inform game, and Inform 7’s natural-language syntax in 2006
- The Hitchhiker’s Guide to the Galaxy (video game) — Wikipedia — November 1984 release, Adams and Meretzky, and the roughly 400,000 copies sold
- Aaron A. Reed, “1993: Curses” — 50 Years of Text Games — Nelson’s Z-machine work and the start of the interactive-fiction renaissance