You Are In a Maze of Twisty Little Passages, All Alike


For computer geeks of a certain age, such as yours truly, it was an opportunity to relive the glorious past when Dennis Jerz announced that an early 1977 version of Will Crowther's Adventure game source code had been discovered. Adventure was one of the first puzzle-exploration games and it not only captured the imagination of computer users worldwide when it became more widespread in 1978, but it inspired many future games such as the popular Zork and even many of today's graphics-heavy computer games. Not bad for a text-only game written in Fortran. Right, Fortran.


Crowther's game was inspired by Mammoth Caves, a real-life cave system in Kentucky. In the game, you explore the cave and give one or two word commands to move or perform actions. As you go, you collect items that may or may not be useful in other parts of the game, and often there is a sequence you need to follow in order to complete a task. Don Woods expanded the game and the version most well known was released in 1978.

I first encountered Adventure soon after I joined the VAX Fortran compiler project in 1978, as it had been released on a DECUS (Digital Equipment Computer Users Society) library tape and made its way into the compiler's test system, where a script had it play a perfect game. (Factoid: Another game in the VAX Fortran test system was a program that played Scrabble against a human opponent. When the VAX-11/730, a low-cost model, was being tested in 1980, we were puzzled to find that the 730 played a different game than the previous 750 and 780 models did. It turned out that the program had a 30-second limit to its search for the optimal play, and the 730 was enough slower that it exceeded this on certain plays, leading it to choose a different word.)

Like many others, I spent many hours exploring the game and drawing up a "map" of the various rooms with notes as to what commands were valid and what to do in each room. Many of the game's phrases and "magic words" became part of the programmer's vernacular in the following years.

I found it interesting to compare the "original" version of the code with the one I knew. For example, the original did have the set of eight connected rooms all of which described themselves as "You are in a maze of twisty little passages, all alike", but lacked the additional set of the newer version which were variously "You are in a twisty maze of little passages, all different", "You are in a maze of little twisty passages, all different", etc. (This inspired my usual description of Linux as "A maze of twisty little distros, all different.")


It was amusing to see the Slashdot crowd examine the Fortran code and try to make sense of constructs many had never before seen, such as computed GOTO and arithmetic IF, not to mention such oddities (and extensions) as comparing a REAL variable to a five-character string (Crowther developed the code on the 36-bit DEC PDP-10 which had 6-bit characters, uppercase only).

If you're interested in learning more, or want to play the game yourself, explore Rick Adams' Colossal Cave Adventure Page. For building with Intel Fortran, the "Adventure 6" version can be used. Turn off array bounds checking and note that the ADVSETUP program needs to be built and run once before running the game. Happy spelunking!

For more complete information about compiler optimizations, see our Optimization Notice.


anonymous's picture

very super

anonymous's picture

I worked at DEC's large disk facility in Colorado Springs in the early eighties. At the time Storage Guru Richie Lary was working on the HSC Cluster and he told us about developing Scrabble. Apparently he tore about a copy of Websters and divided it amongst his zealot friends to enter the dictionary. Richie's quirky sense of humor greatly appreciated my story: While working on my CS degree, my boyfriend's best friend and I used to have vicious old-fashioned Scrabble matches that I usually won. Mid-term he bought us copies of the Scrabble dictionary and challenged me to a Sat night match. Buried in data structures, I had no time to "study" but the match went on. He whooped me in Game 1 by 200 pts and was well on the way to another win in Game 2 when he took mercy. He walked me into his bedroom and opened the closet. There was my boyfriend with a TI Silent 700 entering our play by play into Richie's Scrabble game on the ASU RSTS/E machine. Dave was "transmitting" tiles by way of tapping his ring on a table rigged with a mic that transmitted to an ear dot in my boyfriend's ear. At one point during the game, he lost carrier and he had to quickly reenter the whole game while Dave "stalled". Most endearing practical joke of the era.

anonymous's picture

I may still have my source laying around for a hybrid game I was working on that took adventure (with multiple altrernative advent.dat room descriptors) and Star Trek (TTY terminal only) into a game where you had to fly the Enterprise through space to find and explore a world to get supplies and stuff to facilitate continuing exploration to another world where you could then explore it.

Never completed it but an interesting thought for a game in 1979

Dave Schmidt
Who read the IBM 704 Fortran II compiler listings for inspiration

anonymous's picture

I worked with the program in the late 1970's on a Nova 16 bit system and later on the Heathkit H89 8 bit systems. I cracked the code in the database containing the room/locations, translations between them, and the items locations. The special words "XYZZY" and a later version with "PLOVER" implemented teleportation options within specific room/locations. It was great fun at the time. I recall one homebrew map containing all the room/locations names and where the commands such as E, W, N, S, NE, NW, SE, SW would take the player. Watch out for the pirate!

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.