Advent of Computing - Episode 15 - Lost in the Colossal Cave

Episode Date: October 20, 2019

Colossal Cave Adventure is one of the most influential video games of all time. Originally written for the DEC PDP-10 mainframe in 1975 the game has not only spread to just about any computer out ther...e, but it has inspired the entire adventure/RPG genera. In this episode we are going to look at how Adventure got it's start, how it evolved into a full game, and how it came to be a lunch title for the IBM PC. Like the show? Then why not head over and support me on Patreon. Perks include early access to future episodes, and stickers: https://www.patreon.com/adventofcomputing Important dates in this episode: 1975: Colossal Cave Adventure Developed http://tee.pub/lic/MKt4UiBp22g

Transcript
Discussion (0)
Starting point is 00:00:00 At your feet all the water of the stream splashes into a 2-inch slit in the rock. Downstream the stream bed is bare rock. Go south. 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 stream bed leads into the depression. The grate is locked. Unlock the grate.
Starting point is 00:00:23 The grate is now. Unlock the grate. The grate is now unlocked. Go down. 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. Well, go west. You are crawling over cobbles in a low passage. There is a dim light at the east end of the passage.
Starting point is 00:00:44 There is a small wicker cage discarded nearby. Keep going west. It is now pitch dark. If you proceed you will likely fall into a pit. Well I guess let's keep going west. You fell into a pit and broke every bone in your body. Oh dear you seem to have gotten yourself killed. I might be able to help you out, but I've never really done this before. Do you want me to try to reincarnate you? No, no, never mind. I'll try again later. I think I might need some more practice to get much further in this game. For those of you not familiar, that's how a game of Colossal Cave Adventure starts, or at least how most of my adventures with the game start. The game was released for the IBM PC at launch, which makes it one of the first exposures to computer games for a lot of early adopters of the system.
Starting point is 00:01:38 But Adventure got its start on the Deck PDP-10 all the way back in 1975. So what exactly is Colossal Cave Adventure? How did it start the genre of text-based adventure games? And how did a mainframe video game turn into a launch title for a business-oriented microcomputer? Welcome back to Advent of Computing. I'm your host, Sean Haas, and this is episode 15, Lost in the Colossal Cave. We're still in spook month here on the podcast, so I decided that it would be fitting to look at an early fantasy adventure game. And Colossal Cave Adventure really has it all.
Starting point is 00:02:27 There's monsters, magic, and a very real risk of getting lost and dying in a cave. Well, at least a simulated death in a simulated cave. Maybe not the most fright-inducing game, but I think it's relatively on theme for October. So what is Colossal Cave Adventure anyway? And let's just call it Adventure from now on for the sake of saving some of my breath. Well, it's a text-based adventure game that was originally written in 1975. Like some of the other early video games going back as far as the 60s, Adventure was designed and written for mainframe computers. But despite its big iron roots, Adventure was always something special. It was the first text-based adventure game ever, and possibly the first example of interactive fiction, at least in the digital world. And outside of all that,
Starting point is 00:03:17 Adventure is also an interesting case for software preservation. We still have very early versions of the original codebase, and that's partly due to the game's popularity and reach. Adventure has been ported to run on just about anything with a processor. So today, let's dive in and take a look at The Colossal Cave, a game that may be unrecognizable today, but laid the foundation for adventure and computer roleplaying games for decades to come. So Colossal Cave Adventure is a text-based adventure game, but what does that mean in practice? With all the fancy graphical capabilities of modern games, text-based games really don't show up all that often anymore. I think the best description of how to play the game is given by the game itself when you first run it. To quote,
Starting point is 00:04:03 to play the game, type short phrases into the command line below. If you type the word look, the game will give you a description of your surroundings. Typing inventory tells you what you're carrying. Get, drop, and throw help you interact with objects. Part of the game is trying out different commands and seeing what happens. Most text adventure games have a similar startup message. For the uninitiated, it's not really a pick-up-and-play type of experience. You interact with the game purely via text, as the name suggests. Your surroundings are described on the screen, and you interact with the game by typing out what you want to do. This is usually restricted to commands like go south, look, take item, or unlock grate.
Starting point is 00:04:57 Compared to more recent games, it may sound a lot closer to a book than an actual game, but don't let that fool you. to a book than an actual game, but don't let that fool you. Despite outward appearances, a lot of the gameplay of Adventure would be right at home alongside a game released in 2019. Your adventure starts outside a shack full of provisions. From there, you enter and then traverse a cavern, the Colossal Cave. You loot the treasure within and then safely try to escape with your spoils. Along the way, you have to solve various puzzles, avoid traps, and slay the occasional monster. And all you have at your disposal are your wits, some random junk found in and around the cavern,
Starting point is 00:05:35 and magic. Well, sort of magic. There's a transportation spell. That kind of description could be used for games like Fallout, Half-Life, Skyrim, or any number of more recent and hugely popular franchises. But remember, this is describing a video game that was written all the way back in 1975. During the time frame that Adventure was developed, there wasn't anything like it, at least for computers. The most advanced games of the era were along the lines of Pong, or Lunar Lander maybe. Not only were video games not very deep gameplay wise,
Starting point is 00:06:12 but they weren't designed to be played for long amounts of time. A game of Pong takes maybe minutes at the most, and it only has one goal, to hit the ball better than your opponent. The replay value was only an increase in your skill. Compared to that, you could sink hours and hours into adventure. That's not something you saw from contemporary games. So if adventure was so different, then how did it come to be? Well, it all started with William Crowther, a programmer who at the time was working at BBN on the fledgling ARPANET project. And his motives were relatively simple. He wanted a way to spend more time with his children while getting them interested in computers. You see, Crowther and his wife
Starting point is 00:06:57 had been recently divorced in 1975, and he was worried that his kids may be drifting away from him. But from the start, any project like this would have to have limitations. For Crowther, the biggest one was the interface. There wasn't such a thing as a personal computer yet, but he had the next best thing, a teletype terminal. Now, these are something that you would never see today. They're essentially glorified electric typewriters that can connect up to a remote mainframe. You could type in commands for the remote computer to run,
Starting point is 00:07:31 and then the mainframe's response would get typed back onto a paper feed. Thanks to his work, he had a teletype at home that had a direct line into a fancy PDP-10 mainframe back at the BBN office. Now, it's easy to think that a teletype would function just like a text display except using paper instead of glass, but that misses a key limitation with these kinds of systems. If you have a text CRT monitor, then you can actually reposition the cursor and draw menus, maybe rudimentary graphics. But a teletype is a lot different in function. use maybe rudimentary graphics. But a teletype is a lot different in function. You definitely don't have the freedom to move your cursor around freely. Everything has to be printed on a continuous sheet of paper, so you can't have anything much more sophisticated than just lines
Starting point is 00:08:16 of text. And in a lot of ways, it's like having a dedicated device that can keep a dialogue going with a computer. This restriction would greatly shape the direction that Crowder decided to go when it came to developing Adventure. Now, his next step may seem like a bit of a dive if you're not too familiar with programmers, so bear with me here for a minute. Outside of programming, or talking about programming, or reading books about programming, a lot of software developers enjoy a little game called Dungeons & Dragons. That includes both Crowther and myself.
Starting point is 00:08:54 Since its first publication in 1974, D&D has been a popular real-world game for more geeky-style folk. D&D is a tabletop role roleplaying game where you can play as fictional characters, fight monsters, solve puzzles, and explore a high fantasy world. The game itself is relatively complex, but the core gameplay revolves around the dungeon master. That's one player who actually manages the gameplay. Now, the dungeon master explains, usually in words and sometimes with the help of maps and visual aids, what's going on in the game world. This can range from setting up scenarios, to describing scenery, to running complicated combat encounters.
Starting point is 00:09:39 The other big hallmark of D&D are its dice. The game is statistics based, so you roll a lot of dice to determine outcomes of actions. But by and large, most of the game is actually played by other players talking with the dungeon master about what they want to do. The other key factor of D&D is its length. You don't sit down and play a 5 minute pickup game. Instead, players usually play a long form game in weekly or monthly sessions, with each session being between a few hours to maybe 8 or 10 hours of play. A single game of D&D, often called a campaign, can take anywhere from weeks to years of sessions to play.
Starting point is 00:10:20 Now, Crowther was familiar with the game. He and his colleagues at BBN had a long-standing D&D session going. So when he started thinking about writing a game to be played over teletype, his weekly dungeoneering sessions came to mind. And if you think of a teletype as a way of carrying out a conversation with a computer, then it really is a good fit as a medium for a game like D&D. But some liberties would have to be taken. It would be a big task to computerize all of D&D's complex gameplay, especially for such a limited interface.
Starting point is 00:10:53 So Crowder decided to make a simplified version. But that's only part of the equation. The gameplay would be based loosely on Dungeons and Dragons, but decisions would still need to be made on the content of the adventure itself. For this, we veer into something particular to Crowder, or at least a hobby that's much less common among programmers. He and his now ex-wife, who also worked at BBN, were both avid spelunkers. But this hobby has a twist. Sometime around 1972, the two, along with some friends, started constructing digitized maps of the caverns that they were exploring, eventually surveying all of Mammoth
Starting point is 00:11:32 and Flint Ridge Caves, both in Kentucky. I'm going to go out on a limb here, but I like to think that these cave systems were the most fanciful place that Crowther knew well. So when he sat down to work on an adventure, he would draw on his experience surveying. Even in more finished versions of the game map, it's still recognizable to spelunkers as parts of Mammoth Cave. Part of what makes Crowther's cave adventure so relevant to, well, his game adventure, is the layout of the game world itself. And it's something that you may not notice unless you take the time to try and map out the game. Adventure's world isn't strictly in Euclidean space. Moving north from a spot doesn't always go the same distance as moving, say, west from the same location.
Starting point is 00:12:20 In some locations, you can even go south and wind up back in the location you started at. You can't just directly map the world with pen and paper, at least not very nicely. This is because the map of adventure is actually set up so that each location is a node with set connections to other nodes in the game's world. Any one location can connect up to another six locations in any direction, the cardinal directions plus up and down, and that includes itself. This means that there isn't a fixed distance between rooms and also the space between rooms isn't included on the map. Now, I bring this up because the mapping in Adventure mirrors how caves are surveyed. because the mapping in Adventure mirrors how caves are surveyed.
Starting point is 00:13:06 As a cavern is mapped, it's broken down into nodes, with passages turned into connections between points of interest. Crowther would finish work on Adventure sometime in 1976. This first version was rudimentary. Gameplay was mainly focused on exploring the cavern and collecting treasure. But it was still missing some key aspects, like a point system or a way to actually win the game. Anyway, once completed, Crowther's children are said to have loved the game, so it served its initial purpose very well. But that wouldn't be the end of
Starting point is 00:13:37 Adventure's Adventure. Exactly how Adventure made its way out of BBN comes down to the nature of the newly forming internet. Crowther had shown off his game to some key co-workers shortly before taking a vacation to Alaska. He explains what happens upon his return during a 1994 interview. To quote, Meanwhile, a guy named Don Woods from Stanford, who was groping around the internet at interesting things wherever he could find them, found my directory. Found this thing, tried it out, thought it was great, grabbed the source, doubled its size, and spread it all over the country. So when I came back from Alaska, people were playing it everywhere. End quote. That may sound kind of strange today,
Starting point is 00:14:21 but in the 1970s, the internet, or rather the ARPANET, worked a lot differently than today. The scale was totally different. In 1976, for example, there were around 60 or so computers on the entire network, and things were a lot more open. There wasn't really much security in any of the systems connected, so it made exploring the net relatively easy and rewarding. A single person could actually crawl the entire internet by hand. That's something that you couldn't even think of doing today. And one such of those explorers was a man named Don Woods, a student working at Stanford's AI lab. I've seen the story written a few ways, but somehow Woods became aware of adventure
Starting point is 00:15:05 in 1976. According to Crowther's recollection, the source code for the game was already freely available, but it's easy to find conflicting accounts. According to one tradition, Woods didn't immediately have the code or someone to contact to get more information. The program itself only had one enigmatic credit. It said, Error's Suggestions Complaints to Crowther. Obviously, that's not enough to find a contact. To quote Woods directly on how he went about trying to get in touch with this enigmatic Crowther,
Starting point is 00:15:41 quote, the version I found consisted mostly of exploring, with almost no puzzles. But I thought that it was an interesting idea for a game, and wanted to tinker with it. The game mentioned Crowther as its author, so I sent mail to crowther at xxx for all hosts xxx on the internet, which in those days was still very small. It was called the ARPANET then, funded by U.S. Department of Defense's Advanced Research Projects Agency. I got back several error messages from sites that had no person by that name, but did eventually hear from Crowther, who was by that time at Xerox. He sent me the source for the program. End quote. However it happened, by 1976 there was a new programmer working on Adventure.
Starting point is 00:16:28 It was under Woods' care that the game would evolve into its more recognizable form. He added more treasure, more puzzles, and encounters with hostile creatures. Something to note here is that unlike Crowther, Woods had never played D&D or explored caves in the real world at this point in his life. So his additions to adventure have a different feel than that of Crowther's. For instance, one of the new treasures that Woods added was a Ming Dynasty vase. That's not something that you come across in D&D, but it's valuable in the real world. But Woods did more than just expand the game, he created a way for players to actually win. That's something that Crowther's rendition was
Starting point is 00:17:11 lacking, and it really brings adventure more into the scope of a fully realized game. This change meant that you could now earn points that would be tallied up at the end of the game. Points are earned from collecting treasure, but also from traversing the cave or solving puzzles, or even killing dwarves. You then play until you either die or can find and bring all the treasures in the cave back to the house the game starts in. Adding points and a win state may seem like a small decision, but without that, adventure is a lot closer to a demonstration than an actual game. By scoring your adventure in the caverns, there is now a way to measure and improve your gameplay. It also gave a way to quantify how much of the game that a player has seen.
Starting point is 00:17:55 When you end a run of the game either by dying, quitting out, or winning, you get a message along the lines of You scored 36 out of a possible 350 using two turns. Your score qualifies you as a novice class adventurer. To achieve the next higher rating, you need 95 more points. Just with this addition, Woods changed adventure from a cave simulation to a game with a score, player levels, and a qualifiable way to win. Woods also added a second quest to the game. If you complete the game with the maximum possible score, then you unlock a new, more challenging section of the cave. Just these three features, scoring based on actions, player experience levels, and unlockable quests make up core
Starting point is 00:18:46 gameplay of nearly all action and role-playing games that would follow. Wood's modifications, while large, were done relatively quickly. By 1977, the completed version of Adventure started being passed around the ARPANET, and it turns out that it would spread like wildfire. To quote one player, when Adventure arrived at MIT, the reaction was typical. After everybody spent a lot of time doing nothing but solving the game, it's estimated that Adventure set the entire computer industry back by two weeks, the true lunatics began to think about how they could do it better. And other contemporary accounts vastly agree. Adventure wasn't just a popular time sink, but it got other programmers thinking about new ways to use a computer.
Starting point is 00:19:33 This new kind of thinking would found a whole new genre of games. Direct descendants like Zork, that was written in part by Tim Anderson later, would start appearing that served to improve the formula. But beyond that, adventure set the germ of an idea for much later innovations. But even with new adventure-like games coming out, that's not the end of adventure itself. Besides all the games it inspired, adventure would also make its way out into the larger world. When Wood released the game out into the wider ARPANET, he also released the game's source code,
Starting point is 00:20:09 and that helped to draw in a lot of new blood to look at the code. And this is where one of the original designs made by Crowther all the way back in 75 really shines. This may get a little complicated, but bear with me, and I hope that it will make some sense once I'm done. Up until now, I've been glossing over it, but I think it's time to address exactly how Adventure was programmed. I've already said how modern Adventure is conceptually, but that's also true of a lot of the game's code. You see, Adventure is the earliest game that, at least I know of, that was developed with a separate game engine and data files. This is an approach that's used almost exclusively by modern games.
Starting point is 00:20:54 You have a set of files that describe the map, items, things you can do in the game, and anything else that could happen, and then you have the game itself. The data file is used by the game program, called the engine, to play the game. The point of this approach is that you don't have to rewrite any code to modify the game world. You just change up the game's data file. Once the engine is done, you can usually completely avoid writing any more actual code. Compare that to other games like, say, Pong, where the entire game is just a blob of binary data. You can't change anything without modifying and recompiling the code. And once compiled, the program can only run on the type of computer that it was written
Starting point is 00:21:38 and compiled for. And here's why that's important for adventure. How the game actually played, the map of the cave and everything in it, was just a data file. It's actually raw text with some numbers for mapping things together. You can read through all of it and easily make out all of the messages that you see in game. So as programmers got their hands on the source code and wanted to modify it to run on another computer, they only needed to change the code for the engine. It turns out that the behavior of the engine itself is relatively simple to replicate, since most of the complex logic is stored in the game's data file. The result of this was that Adventure could be easily translated, called ported, to another
Starting point is 00:22:22 computer. More than that, your new version of Adventure that ran on, say, your Commodore 64 could still use the game's original data file, so the gameplay would be identical to Wood's version for the PDP-10 mainframe. The importance of this can't be understated. The ease of portability and the ability to port a nearly perfect copy of the game to any computer allowed Adventure to spread further than a lot of its contemporaries. But that's also where we get some strangeness.
Starting point is 00:22:53 You see, Adventure wasn't under any kind of copyright. The code was just freely shared around. You can probably see where this is going. Pretty quickly, software companies started selling versions of the game. And while there are a few we could talk about, I want to round out this episode with what I think is the strangest place that Adventure's code would show up. That's in the form of Microsoft's Adventure. So the year is 1979.
Starting point is 00:23:21 The IBM PC isn't even a dream in corporations' minds yet. At this point, Microsoft wasn't nearly as big as they would be in coming years. The company was primarily known for selling software to other companies and not really to consumers. Gates, never wanting to miss out on a market, decided that something would have to be done about that. To this end, the company started a new internal division, Microsoft Consumer Products. The goal was to launch software that could be sold by Microsoft directly to consumers, and thus increase Microsoft's dominance on the microcomputer market. One of the first proposed titles for the new division was to tackle a part of the game Adventure. The game was brought up by Gordon Letwin, a recent hire from Heathkit. The problem with getting Adventure on a microcomputer
Starting point is 00:24:12 came down to just the sheer size of the game. The data file was too large to fit into small computers' memories. Despite that challenge, Letwin convinced the company that he could find a solution. And he did. The trick that he would use is somewhat ingenious. Floppy disk drives were just starting to come out for microcomputers, so Letwin decided to take advantage of how they function. What matters here is that a floppy drive is a random access disk device. That means that any part of the disk can be read at any time by the computer. A lot of software coming out at the time was being released on cassette tapes,
Starting point is 00:24:50 which were cheap to produce but had to be read into a computer sequentially as the tape played back. By using a disk drive, Letwin was able to read in just a few relevant parts of the colossal cave to the computer as needed. That and some careful programming in more compact assembly language, and Letwin was able to create a remarkably accurate and lightweight port of adventure. In 79, the game would be released, initially for the Tandy TRS-80 line of computers. And right away, it became a big seller for Microsoft. Part of this was brand recognition. It was sold as a faithful recreation of the classic Adventure. Part of the success was just the fact that Adventure is a fun game. It was ported and released for the Apple II computer
Starting point is 00:25:39 that same year and I know the idea of Microsoft code running on Apple hardware is already strange on its own, but that's not the weirdest part of this product. In 1981, the IBM PC, possibly the most important computer of all time, was released. The PC was designed and heavily marketed to be a business oriented machine. This was also Microsoft's biggest hit to date. They were contracted by IBM to supply an operating system for the PC. That would eventually come to be known as MS-DOS, but that's a story that deserves a whole standalone episode. Besides DOS, IBM also wanted a launch lineup of software to sell alongside the PC. Well, lineup of software to sell alongside the PC. Well, Tech2A and that lineup was a part of Microsoft Adventure. That's right, the business-focused PC actually came out with a launch
Starting point is 00:26:33 game. I still can't get over how weird that is. But not everything's fun and funny here. One of the reasons that Microsoft Adventure was such a good port was because it used a copy of Crowther and Wood's original game file. It wasn't technically stolen software, but it might as well have been. Technically speaking, Colossal Cave Adventure had never been copyrighted, which made it public domain software. So, at least legally, Microsoft was in the clear. The controversy over this remains one of the key ethical issues that's pointed to in Microsoft's distant past. Alright, so I think it's time to wrap up this episode.
Starting point is 00:27:22 That's the story of Colossal Cave Adventure, how it came to be, how it was improved, and how it spread from mainframes into the home. But the story continues on into the modern day. Adventure is probably one of the most ported games out there, or if it's not then it's a close second to something like Doom. Programmers and hackers love adventure so much that almost any computer you can think of has its own version tailor-made for it. And that means one big thing. The game is very accessible and very well preserved. There are myriad ways to play and most of them can still use the 1977 game file that was written by Crowther and later expanded by Woods. So unlike a lot of early programs, adventure is still existent into the modern day. So next time you're playing a video
Starting point is 00:28:13 game, and if you level up, or you gain some experience points, or maybe you kill a goblin or two, you can thank adventure. Thanks for listening to Advent of Computing. I'll be back in two weeks time with another full episode. Until then, if you like the show, why not take a minute to share it with a friend? You can also rate and review on Apple Podcasts. If you want to be a super fan, you can now support the show by buying our hot new merch. I'll have a link to the TeePublic site in the description for the episode. our hot new merch. I'll have a link to the TeePublic site in the description for the episode.
Starting point is 00:28:50 If you have any comments or suggestions for a future episode, then go ahead and shoot me a tweet. I'm at AdventOfComp on Twitter. And as always, have a great rest of your day.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.