a.k.a. ADVENT, Colossal Cave Adventure
by Will Crowther and Don Woods
First Released: Early 1976 (ARPANET)
Canonical Version: May 1977
Language: FORTRAN IV
YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING . AROUND YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND DOWN A GULLY.
“It was the hour of insomniacs,” begins a chapter in Tracy Kidder’s book The Soul of a New Machine, a snapshot of hacker culture at the end of the 1970s. The author has been taken into a basement computer lab after hours to play Adventure, something of a rite of passage.
Strewn before me across the surface of his desk, like the relics of a party, lay dozens of roughly drawn maps. They consisted of circles, inside of which were scrawled names such as Dirty Passage, Hall of Mists, Hall of the Mountain King, Complex Junction, Splendid Chamber, Bedquilt, and Witts End. Webs of lines connected the circles, and each line was labeled, some with points of the compass, some with the words up and down. Here and there on the maps were notations—“water here,” “oil here,” and “damn that pirate!” In the midst of all this paper sat Alsing’s computer terminal. On the screen of the tube in white letters, like the little voice that whispers in a wild gambler’s ear, this message stood:
ARE YOU SURE YOU WANT TO QUIT NOW?
In May of 1977 Adventure became the first computer game blockbuster. While older hits like Hunt the Wumpus or Super Star Trek had trickled out slowly through mail-order paper tape or listings in magazines, and others like dnd were limited to niche platforms, Adventure arrived just as a critical mass of computer users began connecting to the ARPANET, the network of computers that would eventually evolve into the modern Internet. As a result, it hit everywhere all at once, shared and re-shared from one system to the next, and soon became all anyone with computer access was talking about. A famous anecdote goes that the game proved so distracting it “set the entire computer industry back two weeks.” Dave Lebling, later a co-founder of Infocom, recalled: “For a couple of weeks, dozens of people were playing the game and feeding each other clues. Everyone was asking you in the hallway if you had gotten past the snake yet.” It would eventually name both the text adventure and adventure game genres: at the time of its release, few people had seen anything remotely like it.
Adventure begins without much explanation with a description of a forest, written in second person as if you are the one there seeing it. Rather than choose from a set of numbered options, as with nearly every previous game, the player is invited to type freeform one- or two-word English commands. “I WILL BE YOUR EYES AND HANDS,” the game’s instructions read: “DIRECT ME.” Game designer Andrew Plotkin has noted the significance of this novel paradigm: “The help text didn’t offer these commands as a menu, or even as suggestions. You discovered them. The exploration of the game world was the exploration of the parser; it was guided by the game’s narrative and the player’s sense of what was possible.” It’s hard to appreciate today what a radical notion this was at the time.
As you begin to explore you soon find a small building, a lamp, a set of keys, and the locked entrance to a cave. While earlier games like Wumpus or Trek featured navigation through simulated spaces, they had been described mostly with numbers: grid coordinates or phrases like YOU'RE IN ROOM # 4. In Adventure, each location is unique, and vividly brought to life in prose:
YOU ARE IN A 20 FOOT DEPRESSION FLOORED WITH BARE DIRT. SET INTO THE DIRT IS A STRONG STEEL GRATE MOUNTED IN CONCRETE. A DRY STREAMBED LEADS INTO THE DEPRESSION. THE GRATE IS LOCKED. UNLOCK GRATE THE GRATE IS NOW UNLOCKED. ENTER YOU ARE IN A SMALL CHAMBER BENEATH A 3X3 STEEL GRATE TO THE SURFACE. A LOW CRAWL OVER COBBLES LEADS INWARD TO THE WEST. THE GRATE IS OPEN. GO WEST YOU ARE CRAWLING OVER COBBLES IN A LOW PASSAGE. THERE IS A DIM LIGHT AT THE EAST END OF THE PASSAGE. THERE IS A SMALL WICKER CAGE DISCARDED NEARBY. GET CAGE OK WEST IT IS NOW PITCH BLACK. IF YOU PROCEED YOU WILL LIKELY FALL INTO A PIT. LIGHT LAMP YOUR LAMP IS NOW ON. YOU ARE IN A DEBRIS ROOM, FILLED WITH STUFF WASHED IN FROM THE SURFACE. A LOW WIDE PASSAGE WITH COBBLES BECOMES PLUGGED WITH MUD AND DEBRIS HERE, BUT AN AWKWARD CANYON LEADS UPWARD AND WEST. A NOTE ON THE WALL SAYS 'MAGIC WORD XYZZY'.
While Adventure’s cave is sprinkled with magic words, treasures, and fantastical creatures, it’s the surprisingly compelling descriptions of a realistic cave system that are most often remembered. The text transports the player to another place with an immediacy few games had yet achieved:
YOU ARE AT ONE END OF A VAST HALL STRETCHING FORWARD OUT OF SIGHT TO THE WEST. THERE ARE OPENINGS TO EITHER SIDE. NEARBY, A WIDE STONE STAIRCASE LEADS DOWNWARD. THE HALL IS FILLED WITH WISPS OF WHITE MIST SWAYING TO AND FRO ALMOST AS IF ALIVE. A COLD WIND BLOWS UP THE STAIRCASE. THERE IS A PASSAGE AT THE TOP OF A DOME BEHIND YOU
The game’s text feels convincing because it was drawn from life. Will Crowther and his wife Patricia had been avid cavers: courting as MIT undergraduates in the 1950s, they spent their honeymoon getting lost in Virginia’s Breathing Cave. Both had been physics majors who found careers as computer programmers. In the early 1970s they’d gotten involved with a group of cavers in Kentucky embarked on a decades-long quest to connect two enormous adjacent cave systems. Patricia was instrumental in a culminating 1972 expedition that found the final connection: the small, wiry woman could slip through a tiny squeeze too narrow for any of the men on the trip to try. The newly unified Mammoth Cave system, with hundreds of miles of interconnected passages, became the largest in the world. In 1974, in the midst of raising two young daughters, the Crowthers embarked on an extensive survey of Colossal Cave (now just another part of Mammoth), producing an official map of the area near the cave’s Bedquilt entrance—a steel grate mounted in concrete, set at the bottom of a twenty-foot depression, surrounded by forest.
The Crowthers had written code to convert hard-won three-dimensional survey data into maps that could be plotted on the equipment at Will’s office. Ironically, his day job was connecting networks, too. He’d been a crucial member of a team at the research firm BBN that developed a key part of ARPANET: the hardware and code that would become the world’s first network routers. A quiet but brilliant coder, Crowther was “loving the fact that people paid me for playing” with new technology and systems. In a 1990 interview he described his time on ARPANET as “just another one—another fun puzzle. I was willing to do an almost unlimited number of those.”
Then, in 1975, everything changed. Will and Pat separated, the girls staying with their mom. Pat continued caving, and after the divorce would remarry to a fellow member of her famous final connection expedition. Will dropped out of the caving group and the hobby. He started looking for a new job. While he has rarely spoken about his personal life, in one of the few exceptions he noted much later that he’d felt “a bit pulled apart in various ways” that year.
Perhaps to fill some of his unexpected spare time, he joined in on a new tabletop game some of his coworkers were playing called Dungeons & Dragons, just released the previous year. The group’s dungeon master had created a detailed campaign set in Tolkien’s Middle-Earth, with adventures that mostly took place underground, in ancient tunnels and dungeons beneath Mirkwood. Crowther, unlike the other players, named his character after himself: Willie the Thief. The game’s focus on mapping and exploration, perhaps, was a way of scratching a now-forbidden itch. Like many other computer users of the time, he began to idly wonder if you could make something like D&D on the computer.
In the fall of 1975, he decided to try. The impetus may have been an upcoming school holiday when his daughters would be visiting for a long weekend. In a flurry of coding, he wrote the core of a game that would let them, too, explore a cave like their mom and dad had. He based the layout on the Bedquilt area that he and Pat had mapped so thoroughly, and borrowed the framework of a dungeon master describing the world and responding to the player’s actions: a user interface so simple that even a child could master it. Typing in dense, uncommented code (his typical style) from the teletype hooked into the PDP-10 mainframe at the office, within a few weeks Crowther had created the outlines of a game called Adventure.
The girls would later recall being enchanted. Like a dungeon master, the game hinted at a larger world and greater secrets, even if that was often to hide its own limitations: trying to look again at the same location prints SORRY, BUT I AM NOT ALLOWED TO GIVE MORE DETAIL, as if the limits are by design, not necessity. Unlike most earlier games, Adventure gave the illusion of a storyteller on the other end of the chattering teletype terminal, responding to commands that didn’t change its state but existed purely for immersion or verisimilitude: typing enter stream, for instance, results in the message YOUR FEET ARE NOW WET.
Crowther gave the game obstacles to overcome so there was more to do than just explore: some were obvious (the keys opened the locked grate) and others less so (a bird drove off a dangerous snake). It would even offer hints if it detected you were stuck, again like a helpful dungeon master might have done: ARE YOU TRYING TO CATCH THE BIRD? Or after typing out WEST a few times, it might reply IF YOU PREFER, SIMPLY TYPE W RATHER THAN WEST. It was a conversation: but unlike with the chatbot Eliza, a conversation actually about something other than itself, connected to an underlying simulation of places, objects, and obstacles. Though limited—only a prototype—it was a working interface into a virtual world that required no technical skills to use.
YOU ARE IN A LOW N/S PASSAGE AT A HOLE IN THE FLOOR. THE HOLE GOES DOWN TO AN E/W PASSAGE. THERE ARE BARS OF SILVER HERE! GET SILVER OK DOWN YOU ARE IN A DIRTY BROKEN PASSAGE. TO THE EAST IS A CRAWL. TO THE WEST IS A LARGE PASSAGE. ABOVE YOU IS A HOLE TO ANOTHER PASSAGE. E YOU ARE ON THE BRINK OF A SMALL CLEAN CLIMBABLE PIT. A CRAWL LEADS WEST. D YOU ARE IN THE BOTTOM OF A SMALL PIT WITH A LITTLE STREAM, WHICH ENTERS AND EXITS THROUGH TINY SLITS. A LITTLE DWARF JUST WALKED AROUND A CORNER,SAW YOU, THREW A LITTLE AXE AT YOU WHICH MISSED, CURSED, AND RAN AWAY. GET AXE OK
Crowther kept improving the game between his daughters’ visits so he’d always have new bits for them to play. He showed it off to his D&D friends at the office, too, though for a different reason: “Will was very proud—or more accurately amused—of how well he could fool people into thinking that there was some very complex AI behind the game” (source). Much like Eliza, Crowther’s game trafficked in the intriguing illusion of an intelligence typing back those words on your printer. It’s a fantasy we might compare with much older traditions like epistolary literature, or puppetry: the magical sense that behind the facade is something real. It’s no accident that both chatbots and parser interactive fiction would remain enchanting for decades to come, and that today we are just as entranced by the futuristic-seeming possibilities of “virtual humans” and text-generating artificial intelligences.
But once Crowther had pulled off the magic trick, delighting daughters and coworkers alike, he had little interest in expanding or perfecting it. By early 1976, he’d abandoned the game about caving, along with other pieces of his old life. ARPANET had been declared officially operational. He’d accepted a job at Xerox PARC across the country in California. He and Pat were not getting back together. He was turning 40. It must have seemed time to turn the page and move on to new things. But before he logged out of his BBN account for the last time, he did something typical for hackers used to a culture of freely sharing programs, a simple act that would have a profound impact on the history of computer games. He put the unfinished Adventure in a public folder, where anyone browsing the ARPANET could find it.
One year later. 22-year-old Stanford grad student Don Woods stumbles across Crowther’s program and becomes intrigued. Though rough around the edges, Woods sees tremendous potential, and starts to think of ways to extend and complete it (perhaps as a distraction from those first-year graduate courses). But the version he has is just an executable: there’s no source code, and it’s not even clear who created it. Never really expecting anyone other than his BBN coworkers to peek at it, Will had left only a single, cryptic message in the instructions that mentioned his program’s provenance:
ERRORS, SUGGESTIONS, COMPLAINTS TO CROWTHER
What happened next is one of computer history’s most charming stories, both a revealing time capsule of how small the early internet was and a testament to Woods’ outside-the-box approach to problem solving, which had doubtless drawn him to the game in the first place:
“The game mentioned Crowther as its author, so I sent mail to crowther@xxx for all hosts xxx on the Internet, which in those days was still very small... I got back several error messages from sites that had no person by that name, but did eventually hear from Crowther, who... sent me the source for his program.”
Armed with the source code, Woods first figured out exactly how it worked, adding extensive documentation and comments explaining Crowther’s labyrinthine algorithms, and then began to revise and expand it. He doubled the size of the game, adding many new rooms, treasures, puzzles, and enemies. He added a scoring system and a way to win: finding all the treasures and returning them aboveground. He made the game smarter by extending the range of inputs it could respond to, and made it more practical to play by adding the ability to save and restore, and restrict the hours in which it was available (vital to prevent system admins from deleting it outright).
Woods also made Crowther’s unfinished experiment into a more consistent simulation. The original featured a bottle of water you could drink, but Woods extended it to work as a general container for liquids that could be filled and emptied at appropriate places, and was needed to solve multiple puzzles. He fleshed out dropped threads and unresolved teases in the game’s descriptions: both versions include a room where THERE ARE HOLES ALL OVER, BUT THE ONLY BIG ONE IS ON THE WALL DIRECTLY OVER THE EAST PIT WHERE YOU CAN’T GET TO IT, but only in the Woods version does this foreshadow a new area you can actually reach. Crowther’s magic word XYZZY was a testing shortcut to jump straight into the cave, but Woods invented a more consistent system of magic words that implied an underlying fictional logic behind it. While Crowther’s game was a clever hack, Woods made it closer to a working engine: a consistent simulation of a fictional space that could sensibly respond to a player exploring it.
Part of the workings of that engine—sketched out by Crowther but more fully exercised by Woods—was a cleaner separation between code and data. In part because of Fortran’s limited string-handling functionality, Crowther had put most of the game’s text in an external data file which the main program could read from when it needed to print anything: room descriptions, player vocabulary, item names and incidental messages. Scanning through this file gives an impression of the way the game simulates a fictional reality, capable of responding to a range of sensible commands for interacting with it.
101 THE SNAKE HAS NOW DEVOURED YOUR BIRD. 102 THERE’S NOTHING HERE IT WANTS TO EAT (EXCEPT PERHAPS YOU). 103 YOU FOOL, DWARVES EAT ONLY COAL! NOW YOU’VE MADE HIM *REALLY* MAD!! 104 YOU HAVE NOTHING IN WHICH TO CARRY IT. 105 YOUR BOTTLE IS ALREADY FULL. 106 THERE IS NOTHING HERE WITH WHICH TO FILL THE BOTTLE. 107 YOUR BOTTLE IS NOW FULL OF WATER. 108 YOUR BOTTLE IS NOW FULL OF OIL. 109 YOU CAN’T FILL THAT. 110 DON’T BE RIDICULOUS!
But significantly, the data file contains not just the text itself but much of the logic for when to display it. Rows of numbers which Woods dubbed the “travel table” specify how to respond to typing certain vocabulary words in certain rooms, either by printing a piece of text or moving the player to a new location. For instance, this travel table line:
1 2 2 44 29
...meant that from Location 1 (End of Road), move to Location 2 (Hill) if the player’s input contains a word from vocab list 2 (“road”, “hill”), 44 (“w”, “west”), or 29 (“above”, “ascend”). The syntax could also describe conditional logic, such as restricting movement when the right object wasn’t carried or the wrong flag set. What this meant was that much of the game world could be created solely from its data file, without needing to code new FORTRAN or modify the original program. In theory, at least: in practice Adventure’s code still needs special-case exceptions all over the place to enable much of its interesting behavior. But the separation of concerns suggested the intriguing possibility of distinguishing engine programmer from world designer, a notion that would become crucial to the genre’s proliferation in future decades.
Adventure also included some of the first complex simulations of characters to appear in a computer game. The hostile dwarves who wander the cave (and in Woods’ version, a treasure-stealing pirate) require over a hundred lines of code, far more than the handful devoted to Klingons or Wumpii in earlier games. Woods’ code comments go some way toward revealing the complexities of their behavior:
“First off, don’t let the dwarves follow him into a pit or a wall. Activate the whole mess the first time he gets as far as the Hall of Mists (loc 15). If newloc is forbidden to pirate (in particular, if it’s beyond the Troll Bridge), bypass dwarf stuff. That way pirate can’t steal return toll, and dwarves can’t meet the bear. Also means dwarves won’t follow him into dead end in maze, but c’est la vie. They’ll wait for him outside the Dead End. …Move each dwarf at random, except if he’s seen us he sticks with us. Dwarves never go to locs <15 [ed: above ground]. If wandering at random, they don’t back up unless there’s no alternative. If they don’t have to move, they attack. And, of course, dead dwarves don’t do much of anything.”
This code was quite dense: Crowther’s uncommented version of the dwarf behavior (one small portion of which is shown below) is all but inscrutable to anyone not deeply embedded in the codebase.
63 IDWARF=IDWARF+1 ATTACK=0 DTOT=0 STICK=0 DO 66 I=1,3 IF(2*I+IDWARF.LT.8)GOTO 66 IF(2*I+IDWARF.GT.23.AND.DSEEN(I).EQ.0)GOTO 66 ODLOC(I)=DLOC(I) IF(DSEEN(I).NE.0.AND.LOC.GT.14)GOTO 65 DLOC(I)=DTRAV(I*2+IDWARF-8) DSEEN(I)=0 IF(DLOC(I).NE.LOC.AND.ODLOC(I).NE.LOC) GOTO 66 65 DSEEN(I)=1 DLOC(I)=LOC DTOT=DTOT+1 IF(ODLOC(I).NE.DLOC(I)) GOTO 66 ATTACK=ATTACK+1 IF(RAN(QZ).LT.0.1) STICK=STICK+1
But the kind of node- and state-based simulation driving Adventure was most effective at representing explorable spaces, not interactive characters. The game’s cave is three-dimensional and complex. Passages often twist such that leaving a room to the east arrives from the south, or from above. One-way tunnels can drop you into a new area you must find your own way out of, or reveal a shortcut to a familiar landmark. Sometimes not all connections from a room are described, or exits are collapsed into vague statements like PASSAGES OFF IN ALL DIRECTIONS, lending a sense of discovery to the otherwise rote task of exhausting each exit. Some exits even lead to different places each time you take them; and the teleporting magic words add another dimension to movement. Even after several sessions, the cave can remain disorienting. Like its real-world inspiration, it can only be tamed with careful, scrupulous mapping.
Winning also requires mastering two complex mazes: spoilers ahead. Crowther’s original maze was ten interconnected rooms, each featuring an identical description:
YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL ALIKE.
Moving through, it’s impossible to tell at first which of the ten rooms you’re in, and thus how to navigate or escape: the game engenders a sense of dread by removing the information needed to traverse it. But a player who realizes they can drop objects in each room can leave a path like Hansel and Gretel through this textual wilderness, differentiating the identical chambers:
YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL ALIKE. THERE IS A LITTLE AXE HERE. NORTH YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL ALIKE. THERE IS FOOD HERE.
Woods extended Crowther’s maze, making it even more tangled and interconnected, but at first wasn’t sure how to use the gimmick more than once. But then he hit on an idea for a second maze which took advantage of the medium of delivery: the words themselves would matter, not just the space they represented.
YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL DIFFERENT. E YOU ARE IN A LITTLE TWISTY MAZE OF PASSAGES, ALL DIFFERENT. E YOU ARE IN A MAZE OF LITTLE TWISTY PASSAGES, ALL DIFFERENT. N YOU ARE IN A TWISTING LITTLE MAZE OF PASSAGES, ALL DIFFERENT.
While the all-different maze seems at first only semantically distinct from the previous one, the key insight is to realize that here, the semantics matter. The texts aren’t randomized: each describes a specific room, forming a kind of signature that can be used to make a map: TLMP (Twisty Little Maze of Passages) is north of MLTP. Woods added several other jokes based on wordplay, including a giant clam that turns out to have a pearl inside, after which the embarrassed narrator consistently refers to it instead as a giant oyster. This kind of linguistic play is a joy unique to text adventures, and some of the genre’s most beloved titles of later decades, like The Gostak (2001) or Counterfeit Monkey (2012), would also involve wordplay that couldn’t work in any other medium.
Woods posted his extended version of Adventure back to ARPANET in the spring of 1977. By May it had become a massive hit: nearly everyone into computers at the time was playing it. Programming pioneer Donald Knuth remembers being “fascinated by” (if a bit suspicious of) the program: “Clearly the game was potentially addictive, so I forced myself to stop playing — reasoning that it was great fun, sure, but traditional computer science research is great fun too.” (Classic Knuth.) Other less-disciplined souls poured hours into solving the game or further extending it with their own revisions, additions, or remakes—including the creators of Zork, among many others. In years to come early software companies would release commercial ports of Adventure to great success, including Microsoft, who, despite Bill Gates’ famous 1976 rant about software piracy, never paid the game’s original creators a dime. Crowther was surprised and somewhat bemused at his program’s unexpected second life and enduring popularity, eventually coming to appreciate the irony that he’d be remembered less for helping invent the Internet than for accidentally causing its first viral success.
Adventure was a clever program, but also the right program at the right time. It arrived just as regional clusters of hackers were merging into a single online community, and the tantalizing possibility of home computers was becoming a reality, along with the need for compelling software to run on them. It inspired the first generation of commercial game companies and provided a template for their products: it’s no exaggeration to say Adventure’s success jump-started the entire computer gaming industry. It provided the direct model for parser interactive fiction, which would continue to be created and enjoyed for half a century and counting.
But arguably its key innovation was to demonstrate one of the most powerful illusions a computer can create: transporting its user to another reality. While the game industry as a whole would eventually move to chase that illusion with images, not words, each new generation of writers, indies, and solo creators keeps rediscovering the magic of that original trick. Sometimes a single gripping sentence—describing, say, a mist-filled hallway and an angry snake—is all it takes to get you there.
Next week: Four MIT hackers decide they can improve on Adventure, and start work on a program that will still be topping bestseller charts eight years later.
Adventure is one of the most-studied early text games: major sources for this piece included extensive original research by Dennis Jerz, Jimmy Maher, and Jason Dyer, among others. You can play the game in a pretty spiffy online port, or check out the original Crowther source or the Woods source. Patricia Crowther’s historic cave adventures are chronicled in the excellent book The Longest Cave, and Nick Montfort’s Twisty Little Passages is also a great read chronicling the genre that arose from the game.