RogueForge

Talks

The Making of Rogue, by David L. Craddock

Book excerpt
June 2016
Procedural Dungeons of Doom: The Making of Rogue
David L. Craddock · Episodic Content Magazine, four parts · from Dungeon Hacks (2015)

David L. Craddock's history of Rogue, in four parts: Michael Toy's childhood in Livermore and Glenn Wichman's board games; how the two met at UC Santa Cruz and built the game on curses; Toy's move to Berkeley and Ken Arnold's work on the code; Rogue's spread with BSD; Jon Lane at Olivetti and A.I. Design's PC version; the Epyx versions for the Macintosh, Atari ST and Amiga; and the game's legacy. It draws on Craddock's own interviews with Toy, Wichman, Arnold and Lane (2012–2014) and with Robert Botch of Epyx.

See also the 2016 panel with Glenn Wichman, Michael Toy and Ken Arnold and Glenn Wichman talks to Slashie, 2007.

About this text. David L. Craddock's account, adapted by him from his book Dungeon Hacks: How NetHack, Angband, and Other Roguelikes Changed the Course of Video Games (2015) and published in four parts by Episodic Content Magazine in June 2016 (chapters 1, 2, 3, 4). The text is his, unchanged, with each chapter's bibliography; © David L. Craddock. Reproduced here with attribution so it is not lost; the book is available in paperback and electronically from Amazon. The articles' photographs are not copied here.

One date here is too late: Craddock has Toy arriving at Berkeley and meeting Ken Arnold "in 1982", but Rogue 3.4 was already built for Berkeley's 2.8BSD on 21 May 1981, and Glenn Wichman's 1984 account puts the move in "the winter of '81" (History; Wichman, 1984).

Chapter 1: A Thirst for Adventure

Precariously close to flunking out of college, Michael Toy teams up with his college buddy Glenn Wichman to create a new type of role-playing game.

Episodic Content Magazine, 3 June 2016: https://episodiccontentmag.com/2016/06/03/rogue_chapter1/

Author’s Note: This story has been adapted from chapters of Dungeon Hacks: How NetHack, Angband, and Other Roguelikes Changed the Course of Video Games, written by the author. It can be purchased in paperback and electronically from Amazon.

Michael Toy was well aware that computers were good for things besides playing games. He just didn’t care. “I grew up in Livermore, California, and in Livermore, you were either a nuclear physicist or a cowboy. My dad was the nuclear physicist type.”1

His father’s credentials came with privileges. One day a year, families were allowed to visit the laboratory. The scientists spared no expense to make the annual visitor’s day a memorable outing. Part of the appeal for Toy was getting to operate the facility’s mainframe, which was repurposed as a gaming machine for the special occasion.

The flagship title in the lab’s modest library of games was Star Trek, an adventure that consisted purely of text output. Players controlled the Enterprise, represented by an “-E-“, and maneuvered the famous ship around an eight-by-eight quadrant of dots. The goal was to hunt down Klingon ships, represented by “+K+”. A readout informed players of their remaining weapons, the health of the Enterprise, and number of Klingons still lurking in the area. Star Trek required players to think before they acted. Every action drained energy from the Enterprise, but certain actions revealed information that helped players concoct energy-efficient plans of attack. For example, performing long- and short-range scans of the quadrant uncovered the locations of stars and enemy ships.

Star Trek‘s depth spurred Toy to try his hand at programming games. “I wrote a clone of that game for every new computer system I encountered for the next 15 years.” Thanks to his father’s work, he got the opportunity to write and play computer games at home. In the late 1970s, Processor Technology Corporation released the Sol-20 microcomputer, which ran at 2 megahertz and came with a built-in video card that could connect to color-graphics monitors, a novelty for personal computers of the time. Toy wrote Star Trek and other games on the Sol-20; his passion only grew when he acquired an Atari 400 and other computers later on.

Toy’s love of computers and games reached new heights when he enrolled in college in the late 1970s. “I was theoretically attending [University of California] Santa Cruz at the time I started working on Rogue. Meaning, I was enrolled, but I was never anywhere except in the computer lab.” UC Santa Cruz had all the latest machines including a PDP-11/70, a minicomputer—one size smaller than a mainframe, but a size larger than a microcomputer, also known as a desktop—made by Digital Equipment Corporation as wide as a bookshelf and covered in vents, blinking lights, and large controls that looked like oversized light switches.

Toy didn’t get much face time with the 11/70; the massive machine was stored in a basement, flickering away in the darkness. Users in the computer lab connected to the minicomputer through a dumb terminal—a monitor and a keyboard housed in a plastic shell. Dumb terminals had no processing abilities of their own. Instead, they served as translators. Users sent commands to minicomputers or mainframes through the terminal’s keyboard, and the computer sent back results that were displayed on the terminal’s screen.

UCSC soon upgraded to a Virtual Address eXtension (VAX) 11/780, a machine positioned by Digital Equipment Corporation as a successor to its PDP-11/70. It was roughly the size of a large safe and boasted 128 kilobytes of memory. The VAX was connected to rows of terminals within the cool, dimly lit computer labs around campus. Toy spent hours tinkering with the machine, pushing and prodding to learn its capabilities. “Every time I came across a new computer, I tried to learn everything there was to it. In the modern era, you learn just enough to do what you need to do and then move on. You didn’t do it that way back then. You learned everything.”

His thirst for knowledge led him to a treasure trove of games supplied by the university’s connection to ARPANET. One of the first games he pulled from the network was Colossal Cave Adventure, a text-only game. Adventure printed out descriptions of dark and mysterious caving systems and waited for players to type in what to do next. Even more than Star Trek, Colossal Cave Adventure made an indelible impression on Toy. He experienced a sense of wonder every time the VAX filled the terminal screen with descriptions of capacious rooms where stalagmites and stalactites laced together like the teeth of some great beast, of wind keening through caverns, of strange noises off in the distance.

“Computers. Computer games. The greatest things in the world,” Toy stated simply. “The things that were really exciting to me, though, as I became competent enough to program really interesting games, were the text adventures. For me, those moments [in text adventures] were actually more emotionally affecting than even modern computer graphics. Maybe just now, the occasional game has an impact. Like the [underwater city] in BioShock—being there, in that world, changes you in a certain way.”

Toy began writing his own text adventures. Nearby, he noticed another student doing the same thing.

“We met in the computer lab at UC Santa Cruz,” Glenn Wichman recalled.2 “I was working on an adventure game that I was writing in BASIC. I was just teaching myself as I went along, and I made a big mess of it. Michael [Toy] looked over my shoulder and saw my game, and asked if he could play it. That begat a discussion.”

Wichman was impressed by Toy’s knowledge of computing. Toy had built his own desktop computer at home and had been writing games for several years. Wichman let Toy sift through his program while the two talked programming practices. “Most of what I know about programming, I know from working with him,” Wichman reminisced during our interviews.

Although Toy had a leg up on Wichman in programming, Wichman was arguably more well-informed about how the moving parts of game design fit together. He had been creating board and card games to play with friends since the age of seven, and had revamped Dungeon & Dragons to accommodate a custom campaign based on C. S. Lewis’s The Chronicles of Narnia novels. Repurposing the game had involved penning over forty pages of customized rules that subverted D&D‘s base guidelines, transforming it into a new experience.

When the time had come to select a college, Wichman had chosen UCSC deliberately. The school allowed students to create majors by cherry-picking from the course catalog. He had enrolled with the intention of inventing a major rooted in game design that he could parlay into a career as a professional board-and-card-game creator. Discovering computers changed everything. “Once I discovered that you could play games on a computer, I quickly decided that was the better way to go, which is why I started to teach myself to program.”

Toy and Wichman became fast friends. They split the cost of an apartment and spent as much time as possible writing and playing each other’s games. Their favorites were text adventures. Wichman even wrote a program that let users assemble their own interactive stories by choosing from pre-assembled modules, all without writing a single line of code.

But Toy’s interest in adventure games waned quickly. The problem was that the story and puzzles never changed; once he finished a game, there was no reason to boot it up a second time. Worse, he had no reason to play his own adventure games—he knew all the solutions. “The ideal would be to write a computer game that was fun for me to play, and that was the problem with these adventure games that I loved so much.”

Irritated, Toy synced up to other University of California mainframes connected to the network and looked for other games to play. While deep-diving through files stored at UC Berkeley, ninety minutes away from the Santa Cruz campus, he found the answer to his game-programming prayers.

Curses and Cursors

In 1973, computer engineers Ken Thompson and Dennis Ritchie attended the Symposium on Operating System Principles at Purdue University. They were there to present a paper on UNIX, the operating system they had created at AT&T’s venerable Bell Labs facility. The tenet of UNIX was to provide users with a wide array of simple programs engineered to solve specific tasks. Ritchie had invented a new programming language called C, which he used to write UNIX as well as software that ran on the operating system. He made the language extensible, which enabled UNIX to run on a large variety of computer hardware.

Professor Bob Fabry traveled from UC Berkeley to hear the talk.3 Impressed, he purchased a copy of UNIX for his school. He thought his students, especially those enrolled in his operating systems course, would enjoy experimenting with such a pliable OS. He was correct. Students who enrolled in a course grounded in studying and writing operating systems were all hardcore hackers, and Bill Joy was the most fervent among them. As soon as he got his hands on UNIX, Joy put together a small team of hackers and proceeded to modify nearly every facet of its code. In 1977, he distributed the Frankenstein OS around the campus, charging a nominal fee.4 Anyone who obtained a copy was free to root around the code and submit improvements and custom software. Joy and his team filtered the cream of the crop and plugged them into future releases of the modified OS, which became known as Berkeley Software Distribution (BSD) UNIX.

By the time Toy and Wichman started at UC Santa Cruz, BSD UNIX had entered widespread usage across UC campuses and was branching out to other schools. Each new version of BSD, released on cassette tape, included handy programs written by Joy and other hackers. One program was curses, written by Ken Arnold. Arnold had written curses according to the UNIX creed: a simple tool fashioned for a specific purpose. Wielding curses like a paintbrush, users could place text such as letters, numbers, and symbols at any location on the screen.

The moment he used curses, Toy saw its potential. In 1980, he went to Wichman and suggested they use curses to create a graphical adventure game with a twist. Unlike Colossal Cave Adventure and its derivatives, their game would construct brand new environments and challenges every time. An avid Dungeons & Dragons player, he invented a fantasy-themed setting and premise. Players would assume the identity of an adventurer who entered the Dungeons of Doom, a series of levels filled with monsters and treasure.

Wichman loved the idea and dubbed the game Rogue. “I think the name just came to me. Names needed to be short because you invoked a program by typing its name in a command line. I liked the idea of a rogue. We were coming from a Dungeons & Dragons background, but we were creating a single-player game. You weren’t going down into the dungeon with a party. The idea was that this is a person going off on his or her own. It captured the theme very succinctly.”

Apropos of UNIX, Toy chose to write Rogue in the C language. C produced fast code, while BASIC was slower and meant for smaller programs. Wichman, still a few steps behind Toy in programming prowess, learned C by watching Toy program their game. “The early alpha versions of Rogue were probably all my code, but Glenn [Wichman] made lots of contributions in terms of design,” Toy recalled. “I think it’s quite fair to say that the game was a pretty straight collaboration between Glenn [Wichman], Ken [Arnold], and me by the time it was done. I feel pretty good about that.”

Bibliography

  1. I grew up in Livermore, California: Interview with Michael Toy. All quotes from Michael Toy come from interviews conducted via phone, Skype, and email over 2012-2014.
  2. We met in the computer lab at UC Santa Cruz: Interview with Glenn Wichman. All quotes from Glenn Wichman come from interviews conducted via Skype and email over 2012-2014.
  3. Professor Bob Fabry traveled from UC Berkeley: “Twenty Years of Berkeley UNIX.” O’Reilly. http://oreilly.com/catalog/opensources/book/kirkmck.html.
  4. In 1977, he distributed the Frankenstein OS: “Berkeley Engineers: Changing Our World.” Berkeley Engineering: Lab Notes. http://coe.berkeley.edu/labnotes/history_unix.html.

Chapter 2: Where Are You @?

Working with text characters and teletype terminals, Toy and Wichman lay the foundation for Rogue.

Episodic Content Magazine, 10 June 2016: https://episodiccontentmag.com/2016/06/10/rogue_chapter2/

Author’s Note: This story has been adapted from chapters of Dungeon Hacks: How NetHack, Angband, and Other Roguelikes Changed the Course of Video Games, written by the author. It can be purchased in paperback and electronically from Amazon.

Toy and Wichman realized they wouldn’t be able to stay at school during all hours to write their game. Fortunately, they didn’t need to. As employees of the computer science division, they had special lab privileges. Setting up an ADM-3a terminal in their apartment, they could dial into the VAX 11/780 shunted off in a basement somewhere at UC Santa Cruz. The connection was established through their 300-baud modem—a device that would take several minutes to transmit the text on an average-length Wikipedia page today—enabling them to write the vast majority of Rogue from the comfort of their apartment.

Generating levels seemed the logical starting point for Rogue, so they thought about how best to display their dungeon hack. Coin-op hits such as Pong, Space Invaders, and Asteroids sported advanced graphics, but computers were still too slow and lacked the hardware to render swords and spaceships. Due to these restrictions, architecture in Rogue would be displayed from an overhead view, like looking down at a map, and the map would be drawn from text characters. Using Ken Arnold’s curses library, they used periods (“.”) for floor tiles, dashes and vertical bars (“-” and “|”) for walls, plus (“+”) signs for doors, and hash marks (“#”) for corridors that players could traverse.

The idea was to write code that functioned like a paintbrush, dipping into text characters and painting maps out of text symbols. Long corridors drawn from “#” signs would snake between rectangular rooms framed by “-” and “|” markings. The “+” doors would let users pass in and out of rooms and hallways, and onto “.” floor tiles. Each finished map resembled a rudimentary blueprint.

To create levels that turned out differently every time they played, Toy and Wichman devised algorithms that assembled environments according to numbers chosen at random. Those numbers affected every square inch of dungeon real estate, from the size and number of rooms in each level to the curvature of the hallways that linked the rooms together. The effort was known among computer scientists as procedural generation, the practice of building content algorithmically rather than following plans that manufactured the same content every time.

Writing algorithms that generated clean levels was a process that took months to refine. Some early algorithms placed the staircase, which led down to the next dungeon, in rooms that were inaccessible to players. Other algorithms produced levels that were just plain ugly. “It’s still sort of an unsolved problem: how to make interesting and complex spaces that are as engaging as something an artist designs, but able to spit out as many [pieces of content] as you need,” Toy admitted. “It’s really hard to figure out, based on the computing resources you have, how to create worlds, and then design a world that is as amazing as something you could write or draw with your own hands. It’s like trying to paint the Mona Lisa with an air cannon and a bucket of paint.”

After hammering away at their algorithms, Toy and Wichman reached an elegant solution. “In Rogue, every level is a tic-tac-toe board; it’s exactly nine rooms in a three-by-three grid,” Wichman explained. “We basically divided the screen into those nine areas, and then put a room in each area.” Level arrangements were incredibly diverse thanks to random numbers. Some rooms were long or wide; others were as poky as closets. Dungeons could have fewer than nine rooms, but never more than nine. Algorithms occasionally produced levels where rooms aligned neatly, but most dungeon configurations resembled a jigsaw puzzle with scrambled pieces.

As the algorithms for procedural generation took shape, Toy and Wichman entered their world and began to explore. The eponymous rogue was represented on the screen by an “@” sign, shorthand for “where you’re at.” Although the game was barely functional, Toy and Wichman had a blast moving their “@” avatars through empty, procedurally-generated levels.

The next step was adding monsters to fight and treasures to collect.

Procedural Creativity

For Rogue to achieve Toy’s dream of an infinitely-replayable game, every element of the game had to be procedurally generated. He and Wichman sprinkled weapons and magical items into the game’s algorithms. Potions and scrolls tantalized. “We wanted to be able to be surprised by our own game. That’s why, for example, when you find a scroll or portion, it’s got a random flavor and name, and the correlation of the name to the flavor is hidden from the player,” Wichman said. “That way, even we ourselves wouldn’t know exactly what each potion would do. You could play one time and a lemon potion would [restore] health, and the next time, a cinnamon potion would [restore] health.”

Not all effects were beneficial. Cursed items triggered negative effects such as sapping the player’s health or latching onto players permanently. For a long time, the only way to deduce an item’s effects was to use it and wait anxiously to see what happened. Later on, Toy and Wichman added identification scrolls that spelled out the properties of unidentified items.

Populating the Dungeons of Doom with monsters was easy. Lifting monsters from Dungeons & Dragons, Rogue‘s authors created kobolds, ogres, imps, bats, skeletons, leprechauns, and hordes of other enemies. Monsters were represented on the screen by capital letters, such as “B” for bat and “Z” for zombie. Aggressive enemies began to close the distance as soon as the player-character entered their line of sight, while others, such as monsters stationed by doors, waited for players to engage them. Players and monsters initiated combat by bumping into one another, but some foes inflicted harm through non-physical means. Leprechauns, for example, snatched gold, which impacted the player’s final score. The variety of enemies threatened to overwhelm, but was made manageable through Rogue‘s turn-based play, which gave players plenty of time to think encounters through.

Toy dreamed of creating monsters that came across as living, breathing entities able to adjust their behavior according to how players chose to confront them. While some monsters were infused with unique behavior, technology put down roadblocks. “I was using the biggest, fastest computer I could get my hands on, but it only had 128K of memory,” he remembered. “I had a small set of items, dungeons drawn, and some monsters with a few different behaviors. The instructions base [of the computer] was full.” Unable to ascribe more interesting characteristics to the majority of monsters, Toy and Wichman simply gave more health and stronger attacks to monsters higher up on the food chain.

Once Rogue became playable, they invited regulars in the computer labs to try their hands at the game. To their astonishment, the imaginations of their players filled in the blanks left by inadequate technology. “People would invent meaning,” Toy remembered. “They would place themselves in this situation and their creativity would express itself. They made the world more interesting and beautiful. So even though the thing I created wasn’t beautiful, people would color it with their own imagination, in the same way you do when playing a text adventure. I’d listen to someone explain how to play the game to someone else, and they’d start talking about something that was completely ridiculous and made up. They’d say, ‘Here’s how this particular monster thinks.’ And I’m thinking, That monster? He’s one of the non-thinking monsters.”

Wichman likewise observed players inventing strategies for survival. Bats, for example, moved in a zigzag pattern meant to imitate their wild fluttering. Crafty players realized they could defeat bats easily by luring them into tight corridors. With no room to weave around, bats were helpless to dodge arrows. “We didn’t design the game or bat with that strategy in mind. It’s just that bats flutter as bats do. People playing it came up with that strategy for beating them.”

Ferocious capital letters moving around on the screen sparked the interest of players who dwelled in the UCSC computer labs, and Rogue‘s high mortality rate poured kerosene on the flames. When players died in Rogue, their character was irretrievably lost. The concept became known as permadeath. “All video games, in the mind of my grumpy, curmudgeonly self, were: to win this game, just go up, up, left, right,” Toy said. “[Games were] just a series of moves with timing in between them. Execute them in the right order and you win. Permadeath was an attempt to make that go away. You’re in this instant, and you can’t make a mistake and try again. If you’re going to make a character that wins, you have to be somebody who knows when to run away, or your character is dead.”

Early versions of Rogue had to be finished in one sitting. Later, Toy and Wichman added the option for players to save their progress. After discovering that some players were save scumming, the process of making copies of their saved data so they could keep playing if their character died, Toy and Wichman changed the code so that it erased characters immediately upon death. “I do remember that, because of each interaction with monsters, if the last move you made was, ‘I swing at the monster and miss; he swings and hits,’ you could just [restore progress] and keep playing that sequence until the odds were in your favor,” Wichman said. “We wanted to make it realistic.”

With each new element Toy and Wichman wrote into Rogue, the game became more and more absorbing. Rather than reveal the entire dungeon map when players set foot in a new level, the game showed only their immediate surroundings. Moving in any direction revealed more of the map—and the creatures lying in wait. The graphics were primitive, but the thrill and apprehension of exploring uncharted terrain, combined with the pseudo-intelligent behavior of the monsters and the permanency of death, drew players deeper into the fantasy.

“We [printed] descriptions as things happened to you, and we had various monsters that we created, and potions, and things like that,” Wichman remembered. “It was interesting that we did end up having an atmosphere even though all you’re looking at is letters and symbols. We got drawn into the world, and you would imagine yourself in the world. You’d see a letter ‘T’ on the screen, and it would startle you because you knew it was a troll.”

Adventurers braved the Dungeons of Doom on the loose premise of recovering a MacGuffin called the Amulet of Yendor. Toy viewed the premise as trivial. His hope was that players would find greater enjoyment in recounting their own adventures. “The main thing I was trying to create was moments of panic and terror, and every moment [feeling] really important. Like, ‘This moment right now is really important, and I need to survive it to get to the next moment.’ That story would be something you could only tell in retrospect. You can construct a broader story afterwards, kind of like you don’t know the broader story of your life until you’ve had time to look back and say, ‘Oh, so that’s what happened.’ The Amulet was completely unimportant in any way, shape, or form. There just needed to be a reason to send you down there.”

Best of all, Rogue was having the same effect on Toy and Wichman as it was having on their growing legion of testers. They, like everyone else, fell in love with figuring out how to hit Rogue‘s curveballs. “There was no real design. We just said, ‘Let’s make the monsters progressively harder and see how it goes.'” Toy said. “Once you figured out the mechanics of the game, you could usually get down to the mid-teens [dungeon levels]. Anybody could do that. Just don’t be stupid. If you’re in trouble, run away, heal up, come back and fight things.”

Wichman agreed. “We especially liked when the game would surprise us. I can’t remember a specific [anecdote], just general recollections of, ‘Hey, did you realize that if you do this, this other thing will end up happening?’ That wasn’t something we necessarily designed. It was just some consequence of how the world we’d created ended up working that we hadn’t anticipated.”

Forked

Toy and Wichman failed to notice their transcendence from lowly students to local celebrities when Rogue began circulating around UC Santa Cruz. The game was still a work in progress. They continued writing code, brainstorming ideas, and collecting feedback from fellow students who were spending more and more of their time playing the game. According to Wichman, “Getting the feedback was fun. We were admired a lot for being the ones who were coming up with this. It was an ego boost, and it was also just a lot of fun to get feedback, to watch people play the game, and to make adjustments and see whether they were accepted or rejected.”

Realizing that the mere act of surviving in Rogue would become a badge of pride and status around campus, Toy and Wichman implemented a scoreboard in one of the earliest iterations of the game. The board recorded the top ten scores, ranking players according to how much gold they had collected and how far they had descended at the moment of their death. “Remember all that stuff I said about getting the Amulet not meaning anything?” Toy asked me. “Forget everything I said. I wanted winning the game to be an achievement. If you got the Amulet, that would be something worth telling your friends about, unlike most computer games, which you just play until you’ve put enough hours into them and then you’re done.”

Shortly after Rogue started making the rounds, Toy’s focus on computers and games caught up with him. His grades got him kicked out of UC Santa Cruz. He lined up a job in the computer labs at UC Berkeley, where he hoped that pursuing knowledge of computers in return for a paycheck instead of grades would serve him better.

Just like that, Wichman’s best friend was gone. Furthermore, Toy’s departure planted a fork in the road of Rogue‘s development. “Things weren’t set up to share source code so we could work collaboratively. I had my version of Rogue at Santa Cruz, and Michael had his version at Berkeley,” said Wichman. “Occasionally, we would send ideas to each other.”

Wichman did his best to keep up with his version of Rogue. He added the concept of armor, represented as a “]” bracket, and fiddled with a few other features. Eventually, he was forced to call it quits.

“Michael transferred to Berkeley and took Rogue with him. That’s when Ken Arnold got involved. After a while, I stopped working on it. It became Michael’s and Ken’s project until a few years later when we decided to make a commercial version of it.”

Chapter 3: Arbiters

Following his departure from UC Santa Cruz, Michael Toy befriends a hacker interested in helping him carry Rogue’s torch.

Episodic Content Magazine, 17 June 2016: https://episodiccontentmag.com/2016/06/17/rogue_chapter3/

Author’s Note: This story has been adapted from chapters of Dungeon Hacks: How NetHack, Angband, and Other Roguelikes Changed the Course of Video Games, written by the author. It can be purchased in paperback and electronically from Amazon.

Ken C. R. C. Arnold grew up in a household where science and technology were as commonplace as dishware. During the early 1970s, his father worked as a programmer and scientist in charge of writing computer simulations. Arnold took an interest in his father’s work and peppered him with questions. One day, Arnold’s father stanched his son’s tide of inquiries by handing him a book on FORTRAN, a programming language designed to solve scientific computations quickly and efficiently.

Excited to dig in, Arnold studied the first lesson. The objective was to write a program that generated a Fibonacci sequence, a string of numbers where each successive number is the sum of the previous two numbers: {0, 1, 1, 2, 3, 5, 8, 13}. Generating a Fibonacci sequence had long been considered an arduous trial for burgeoning programmers, one meant to test their grasp of logic more than their command over language syntax. Most programmers needed three variables—containers for data such as numbers and text—to generate a Fibonacci sequence: two variables to hold one term apiece, and a third held their sum. The program then entered a loop, calculating sums and constructing a long sequence of Fibonacci terms by passing terms and sums between the three variables until it reached a designated stopping point or the user terminated the program.

To his father’s amazement, Arnold solved the problem in record time—using only two variables. “I thought memory was precious,” Arnold explained in our interview. “So I told my dad, and he said, ‘You can’t do that with two variables.’ I said, ‘Yes, you can. Look.’ He looked at it and said, ‘You’re right.’ And I thought, My god. I might be better at this than he is. For any teenager, that is a great temptation.”

Arnold’s quick learning pushed him to seek out new challenges in computing. He spent most of his time at school sharpening his programming skills and playing the same Star Trek game that had captured Michael Toy’s imagination. When he and other students exhausted the school’s supply of games, they wrote their own. Still in high school, he learned that his community’s chapter of Eagle Scouts routinely met at a company that allowed access to their computers. Arnold suddenly became very interested in earning merit badges.

Following graduation, Arnold decided to take a year off between high school and college. He got a job at Lawrence Berkeley National Laboratory located near UC Berkeley’s campus. When he was not working alongside his colleague, Art Rosenfeld, who designed programs that calculated how much energy a building would consume in a diverse range of climates, he trawled UC Berkeley’s computer lab. Arnold was eager to jump on the lab’s PDP-11/70 minicomputers, and tutored students in exchange for an account at the lab. Up to forty students could connect to a single 11/70 via a modem, and were allotted 50 kilobytes of disk space, enough capacity for Arnold to write some interesting programs in C.

While 50K of disk space was considered plentiful for the late 1970s, UC Berkeley’s computers came up short in other ways. Every user connected to the PDP-11/70 worked at a dumb terminal, and each screen displayed information in the same way: as new text appeared on the screen, old text got pushed up and out of view. Once it was gone, it was gone for good. The cursor operated similarly: it sat at the position where the next keyboard character would appear, unable to be maneuvered around the screen so users could correct typos or expand on previous paragraphs.

The arrival of cursor-addressable terminals at UC Berkeley was a game changer. Unlike ordinary dumb terminals, cursor-addressable terminals divided the screen into a grid of rows and columns, and tracked where each character on the grid was stored in memory. In other words, savvy programmers could move the cursor to any square in the grid and modify or add text there.

Such a radical leap forward in display technology gave rise to all sorts of programming possibilities. In 1976, Bill Joy, the hacker who would lead development of BSD UNIX, wrote a text editor called vi, short for “visual,” that allowed users to move their cursor and edit text anywhere on the screen.

Other, non-academic programs took advantage of cursor-addressable terminals. In 1963, the American Standards Association created the American Standard Code for Information Interchange, or ASCII. ASCII is a collection of text characters such as letters, numbers, and symbols commonly found on keyboards. Arnold and other students realized they could use ASCII characters to create graphics. “My friends and I would write these little programs that would use the cursor library to do something visually interesting. A guy drew a little ASCII picture of a car, and you could watch it drive across the screen. I ended up writing a little impersonation of a fly that buzzed around the screen.” Animating flies and automobiles consisted of grouping individual ASCII characters together so they resembled images, then erasing the screen and re-plotting the characters to new locations over and over, simulating movement.

Cursor-addressable terminals presented one downside. Each terminal stored characters differently, so programmers had to rewrite cursor-addressable code on every type of cursor-addressable terminal they used. Tired of revising code every time a new terminal appeared in the lab, Arnold wrote a platform-agnostic library of cursor functions that worked on any cursor-addressable terminal. He called his library curses.

Keepers of the Code

When Bill Joy corralled worthy programs and packaged them in BSD UNIX in 1978, curses received a place of honor. By 1980, Rogue had spread from its home on UC Santa Cruz’s computers to other UC campuses, including UC Berkeley. Arnold took to the game right away. “People often believe that curses was written for Rogue because most people saw them at the same time. We were playing Rogue, and somebody came up to me at one point and said, ‘You know, Rogue is really, really smart. When you move on the screen, it only redraws the characters it has to redraw.’ I said, ‘Oh, they must be using curses.'”

Arnold enjoyed Rogue but grew frustrated with its interface. For as smart as other users believed the game was, it used resource-heavy methods of cleaning up the screen. The modems that connected dumb terminals to the lab’s minicomputers were 300 bauds, which meant the minicomputers could only send thirty characters to the screen per second. Rogue‘s usage of curses to reposition the cursor and redraw dungeon topography every time the screen refreshed was inefficient. Such movements cost anywhere between two and twenty characters depending on how far the cursor needed to jump around and how many characters needed to be redrawn. As a result, refreshing the screen over the 300-baud modems could be a painfully slow process.

As much as Arnold wanted to tighten up the game, his hands were tied. Rogue‘s creators, two students from UCSC named Michael Toy and Glenn Wichman, had opted not to make their code freely available. Then, in 1982, a new employee joined UC Berkeley’s lab and started asking around after Arnold. “Mike Toy transferred to Berkeley, which I didn’t know about until he came and looked me up,” Arnold explained. Toy, he found out, was aware that Arnold had written curses, and had sought him out to learn more about how the library worked. “We started exchanging ideas. Over time, we got to know each other well enough that he trusted me with the code,” Arnold said.

For Arnold, the first order of business was popping Rogue‘s hood and optimizing the code. “What it used to do every time you [opened the] inventory was clear the screen, draw the inventory, then clear the screen [when you closed the inventory] and redraw the map. One of the first things I did was display the inventory in the upper-right corner of the screen as far to the right as I could. That meant that the least amount of screen area had to be erased. I would clear out that area, draw the inventory, and when you were done, I’d only have to redraw that area [of the map].”

Arnold and Toy put their heads together and made dozens of other improvements. Long, winding corridors connected Rogue‘s tic-tac-toe arrangement of rooms, but were tedious to navigate. Players had to hold down a movement key in one direction, wait until they hit a wall, then move in another direction, and so on until they finally came to a room. Arnold rewrote the code so the “@” avatar raced through hallways automatically, halting only if it encountered a treasure or monster in the passage. Arnold modified the interface further, cutting down on the verbs used to describe battles. When he finished, the game output “You hit” or “Monster hit,” where monster was a specific creature such as a kobold or zombie. Although the output was less interesting, Arnold reasoned that players wanted to spend less time reading text outputs to find relevant data and more time exploring the Dungeons of Doom.

Level generation, while inexpensive in terms of hardware resources, received an overhaul. “When you went up [the stairs], you appeared in a different level. You didn’t return to the same place,” Arnold explained. Adding a dose of realism, he modified the code so that going back up staircases returned players to dungeons they had cleared. Other new content proved more substantial. The code Toy had carried to UC Berkeley included thirty possible names for scrolls. Arnold added syllables that the game selected randomly for even greater variety. The two friends also added rings and amulets that could be worn to add beneficial effects—provided they weren’t cursed—as well as magical staffs for players who preferred spells over steel.

As the game’s content base grew richer, Arnold and Toy knew that prestige for conquering the dungeons would swell in turn. “There was a score file, so we tried really hard to make it that if you didn’t at least have root [administrative] privileges, you couldn’t cheat the score file,” Arnold explained. “I didn’t mind if you cheated, but you can’t record that score and have other people play against it. That was my attitude about it.”

Widespread Distribution

When Bill Joy and the other members of the BSD UNIX committee gathered programs for the release of version 4.2 of their operating system, they rounded out the package by asking others what programs they would like to see included. Besides the usual assortment of productivity tools, BSD UNIX shipped with a games folder that contained the likes of chess and a few quizzes. Rogue made the cut, and was distributed as part of 4.2BSD in 1984.1

As the number of computers tethered to ARPANET and other networks grew, BSD UNIX became ubiquitous, finding a home in computer labs all over the world. Arnold and Toy occasionally received letters from professionals and students who were enjoying Rogue‘s addictive and danger-laden levels. Every so often, fans contacted them from the most unlikely of places. “There was somebody who worked at a nuclear bomb laboratory in Nevada, and you think, Shouldn’t they be doing something besides playing games when nuclear weapons are at stake?” Arnold remembered. “To a certain extent, it also felt like, if Rogue was interfering with weapon development, maybe that’s a good thing. Maybe it’s good that we were slowing all that down.”

As pleasantly bewildering as it was to hear from technicians at nuclear labs, Toy and Arnold were utterly bowled over when they learned that their computing heroes enjoyed Rogue. Ken Thompson, a computer scientist at Bell Labs who co-created UNIX alongside Dennis Ritchie, apparently played the game so much that he had taken time out of his schedule to hack the encryption scheme Arnold had written. “When it really hit me was, somebody who worked in Bell Labs said, ‘Ken Thompson does the following thing to cheat,'” Arnold remembered. “I was like, ‘Oh. I had no idea Ken Thompson enjoyed the game. This is a really big thing.'”

In 1984, Arnold graduated from UC Berkeley and took a job at UC San Francisco as a developer. He and Toy, who had already landed a job at Italian typewriter manufacturer Olivetti, took Rogue‘s source code with them. They envisioned turning the game into a commercial product. Looking back, Arnold regrets their attitude. “Unfortunately, since we took the source with us, other people weren’t able to take it and do something with it.”

Time passed, and Arnold and Toy lost track of Rogue‘s code. The dream of converting Rogue into a commercial product was lost.

Bibliography

  1. Rogue made the cut: “History and Timeline.” UNIX.org. http://www.unix.org/what_is_unix/history_timeline.html.

Chapter 4: Typewriters and Mainframes

Michael Toy, Glenn Wichman, and new friends come together to port Rogue to new generations of computing platforms.

Episodic Content Magazine, 24 June 2016: https://episodiccontentmag.com/2016/06/24/procedural-dungeons-of-doom-the-making-of-rogue-chapter-4/

Author’s Note: This story has been adapted from chapters of Dungeon Hacks: How NetHack, Angband, and Other Roguelikes Changed the Course of Video Games, written by the author. It can be purchased in paperback and electronically from Amazon.

Olivetti was founded in 1908 as a typewriter manufacturer by Camillo Olivetti, an electrical engineer residing in Italy. By 1930, Olivetti’s son Adriano had taken charge, and steered the company in new direction. The company produced and sold an electric calculator, the Divisumma, in 1948, and built Italy’s first mainframe computer, the Elea 9003, in 1959. In 1965, Olivetti broke new ground when the company released the Programma 101, the world’s first desktop computer, which looked like a typewriter-sized adding machine.2

Even though the Programma 101 was small enough to sit on a desk, mainframes still ran Olivetti’s offices and laboratories, and BSD UNIX was the company’s operating system of choice. One of the chief administrators at Olivetti’s United States location was Jon Lane. “This was my second job after college and during the UNIX days,” Lane told me. “UNIX was just getting out into the real world, and of course, people from universities had more experience [using UNIX] than people in the industry, so I was able to do whatever I wanted if it involved UNIX.”

Just like on UC campuses, BSD UNIX ran on mainframes and supported dozens of users who dialed in through dumb terminals. BSD UNIX supported multiple users by way of time-sharing, the process of carving up a mainframe’s cycles of operation among all the users dialed in to it. More users logged on meant fewer cycles for each user, which meant more waiting between actions. Part of Lane’s job entailed monitoring cycles to see which programs ate up the most time. A few months into his tenure, a new program appeared in his reports. “There was a group of people running Olivetti’s network, and Rogue came up as the number-one used [program] on the network. More CPU cycles went to Rogue than anything else.”

Lane saw no harm in Rogue since the game ate up a very small percentage of cycles during Olivetti’s hours of operation. After work, most of the engineers would stay over to play. Lane joined in happily, caught up in Rogue‘s risk-reward design. When business took him to Olivetti headquarters in Italy, he had a fortuitous encounter. “I went to Italy to install some stuff, and Michael [Toy] was also working for Olivetti as a consultant. Michael and I became fast friends. I said, ‘Hey, your game is unbelievable. We should get that running on the PC that just came out.'”

Toy saw potential in Lane’s pitch. More powerful than competing hardware such as the Apple II, the PC was becoming the platform of choice for businesses looking to adopt word processors and spreadsheets. Game developers found merit in the PC as well. Toy and Lane founded a company called Artificial Intelligence Design. Toy had salvaged Rogue‘s source code from UC Berkeley, but it amounted to a sketch on a cocktail napkin instead of a fully realized blueprint. “Michael [Toy] had the source code, but I definitely had to rewrite [a lot of the game],” Lane recalled. “We didn’t have curses, so I had to rewrite all the [text output] libraries.”

Functionally, the PC version of Rogue—titled Rogue: The Adventure Game—behaved like the original version. Aesthetically, it exhibited several changes. DOS, the dominant operating system on the PC, supported a set of characters called Code page 437, or CP437 for short. On top of the familiar array of letters, numbers, and symbols, CP437 featured special characters such as the diamond, heart, spade, and club playing-card iconography.

Thanks to CP437’s plethora of special characters, the PC version of Rogue was a visually impressive game, though still primitive. Uppercase letters once again stood for trolls and other monsters, but symbols replaced other previously text-based representations. Instead of an “@,” players controlled a smiley face. Dungeon walls were made up of solid brown bars, and meandering stretches of white-and-black squares stood for corridors that connected rooms. A yellow asterisk symbolized gold coins. The Amulet of Yendor, the object of every Rogue player’s desire, appeared as a golden ankh.

Since Toy and Lane intended to sell Rogue, they made several changes to stay out from under the watchful eyes of the lawyers who represented Dungeons & Dragons publisher TSR. Kobolds and Xorns, two of the many monsters that Rogue lifted straight from the pages of the Dungeons & Dragons Monster Manual, were replaced by generic yet powerful monsters like the kestrel, a falcon-like bird of prey.

Friendly Rivalry

When the game was finished, Lane and Toy paid out of their own pockets to advertise to PC owners. Rogue sold more copies each time they stepped up advertising, but they still barely broke even. They lacked the deep pockets necessary to secure shelf space dominated by big distributors such as Merisel. To their surprise, developers at Epyx wanted to help Rogue carve out a spot on store shelves. Based in San Francisco, Epyx published action and role-playing games for a wide range of desktop computers. A few of the developers had tried Rogue for PC, loved it, and urged Robert Botch, vice president of marketing, to license the game for other platforms.

Botch took a look at the game and raised an eyebrow. “Rogue was a concern to many people on my staff due to its apparent niche appeal and lack of graphics,” he explained to me. Still, Botch decided to trust the taste of Epyx’s engineers and contracted A.I. Design to bring Rogue to the Apple Macintosh and Commodore Amiga. “If we focused on more core gamers and limited our costs, we thought it might be profitable. And I would imagine, as usually happened in the business, we had a title or two that was behind schedule [leaving room in the lineup for Rogue].”

Toy and Lane divvied up the work. Since Lane had done most of the heavy lifting on the PC version, Toy, who was eager to put his new Macintosh through its paces, handled development of the Apple version. The Mac had several advantages over the PC. Apple’s operating system featured a graphical user interface (GUI) where users got around by clicking on icons, whereas DOS required users to type in commands. The Mac also sported more memory and a faster processor. A.I. Design could distinguish the Mac version of Rogue by including graphics that resembled characters and monsters. This raised a new issue: neither Toy nor Lane had art skills decent enough to be featured in a commercial product.

To give the Mac version the treatment it deserved, Toy reached out to an old friend. “The PC version still used character graphics, but for the Mac version, I drew all the characters,” Glenn Wichman said. “That was me. That was my contribution: I did all the graphics for that version. They were black-and-white, 25-by-25 pixels.”

Despite his interest in working on the game again, Wichman returned to the Rogue fold warily. After dropping development of the original incarnation of the game at UC Santa Cruz, Wichman had missed out on the exposure Rogue had given Toy, Arnold, and Lane. It was a sore spot for Wichman that he had been given a perfunctory mention in the credits of the PC version, which read The game of Rogue was originated by Michael C. Toy and Kenneth C.R.C. Arnold – Adapted for the IBM PC by Jon Lane – Significant Contributions by Glenn Wichman and scores of others. In effect, Wichman took exception at being lumped in with the nameless college kids who had suggested changes to the game during its development at UC campuses.

When a snowstorm buried Lake Tahoe under a blanket of cold, Toy and Wichman got a chance to bond. Lane and Toy had season passes at Squaw Valley. Renting a cabin, they hit the slopes while Wichman, who had no interest in skiing, remained behind in the warmth of the cabin and drew walls, doors, monsters, weapons, and quivers of arrows. At night, they wrote code for the Mac and discussed design ideas with Wichman, whose trepidation at reuniting with Toy thawed in the face of the excitement and challenge of engineering a new version of Rogue.

“The next big change came with the Macintosh version, where we embraced the Mac idea of a windowed GUI, with separate windows for inventory, map, status, and overhead view, also mouse-based point-and-click movement,” Wichman explained. A greater use of graphical elements made Rogue appear more modern. The player’s remaining life was displayed as a graphical bar that drained as the player-character—now represented by a small knight—took damage.

Snow began to fall over Squaw Valley, first at a serene trickle and then in a torrent. Inside, the A.I. Design trio fell into a cozy pattern of exploring the snow-covered mountains by day and working through the night. When they ran up against technical barriers like the Mac’s paltry amount of memory, they leafed through stacks of computing magazines in search of optimization techniques. “It was a funny time when software engineers were doing things on their own,” Lane reminisced. “The software industry hadn’t gelled yet, the way it did when Microsoft started taking out all the private citizens like us who were trying to make some kind of dent in the software world.”

The contract between A.I. Design and Epyx afforded Toy and Lane a modest sum for each version of Rogue they produced. As payment for the artwork used in the Macintosh version, Wichman was given the Mac he had used to create artwork, a payment he felt was commensurate to his contributions.3 Around the same time, Epyx offered to let Wichman helm the adaptation of the game to the Atari ST. Wichman accepted the offer and got to work on an Atari ST provided by Epyx. The computer sported a dual floppy-disk drive; no hard drive was available. One disk drive held the C compiler on which Wichman wrote code, and the other held the game that took shape over several weeks.

Since neither Toy nor Lane were interested in working on an Atari ST, Wichman had carte blanche over his adaptation of Rogue. He turned all artistic contributions over to Michael Kosaka, an in-house artist at Epyx whom Wichman felt was better suited to harness the ST’s deeper color palette, and focused on design. Rogue‘s core gameplay remained the same, although Wichman did add in new secrets for players to discover such as the centaur’s ability to curse the player’s armor and items.

For Wichman, the opportunity to leave an indelible mark on Rogue was the final board he needed to mend old fences. “Michael [Toy] was doing the Amiga version. We worked side by side and had a friendly rivalry going to see who could come up with the better version. That started to remind people that a lot of Rogue‘s ideas were mine, and that I was a bigger part of [the game] than I got credit for. Once the Atari ST version was out, I could say, ‘I did this version. Rogue is just as much mine as it is anybody’s.’ I no longer felt bad about being left out.”

Legacy

Robert Botch and his marketing team took a different tack when the time came to market the handful of Rogue ports published by Epyx. “We felt the game would not sell well through our main distribution channels which were Toys R Us, K-B Toys, Kmart, Target, and other mass merchants. Action games with high graphic content were the type of titles these retailers wanted to sell because that is what their customers were buying.” Knowing that the average consumer judged a game by flipping the box over to check out the screenshots on the back, Botch played it safe and distributed Rogue through software catalogs.

Rogue enjoyed a transitory stay in the upper ranks of Merisel’s catalog, then dropped off and faded away. Everyone put forth their reasoning for why the game failed to catch on in the mass market. Robert Botch said he found the game tricky to market. Magazine advertisements were out of the question. Those demographics consisted of casual gamers who put stock in flashy graphics and shied away from gameplay mechanics like permadeath.

Wichman’s gut reaction was to blame software pirates, but years of reflection caused him to come to terms with tough truths. Unlike many games of the era, Rogue had no sound, no animations, and no distinct character classes such as paladins and archers, which gave players access to unique play styles and strategies. In Rogue, every player-character was more or less the same. Plus, he, Toy, and Arnold had set a precedent years ago while at university. “The people who made it the most popular game on campuses in the early ’80s were used to playing it for free. The idea was we would give them that same experience on their home computer, but charge them money for it. I think that wasn’t the audience that was looking for games in software stores.”

For Ken Arnold, Rogue worked better as a conversation starter that afforded him the opportunity to have interesting conversations. “Michael [Toy] and I gave a talk in Boston on Rogue, and on the value of games in a work environment. It was a packed talk. Everybody was there to see it, and I really enjoyed it. You enjoy people liking what you did, and hearing, ‘Oh, your idea gave me the idea to do this.’ I really enjoy that.”

Wichman waved off Rogue‘s commercial failure and the modest payments he received. To him, the game means something more. “The total income I made from Rogue is $15,000—advances on royalties for the Atari ST version. But Rogue also gave me a career; Rogue was my diploma, Rogue was my resume. And somehow Rogue just kept hanging in there, year after year; people kept playing it, kept porting it, kept adding on and improving it. We didn’t set out to invent a genre, but that’s what ended up happening, and I feel so blessed to have been a seminal part of that.”

Jon Lane simply appreciates that he was able to go along for the ride. “PC World put Rogue for the PC as the sixth best game of all time.4 I get to say that’s my version, but not really. Michael [Toy], Glenn [Wichman], and Ken [Arnold] were the geniuses behind the game, and Michael put together the idea that random numbers would make the game different every time. That one little thing made Rogue one of the most important games ever. Every once in a while, and even now, I hear people talking about Rogue and how great it was. I never jump into those conversations, but I do hear them, and I kind of laugh.”

The Michael Toy

Michael Toy, curmudgeonly by his own admission, feels twangs of regret when he looks back on Rogue. He marveled at the imagination and beauty that players injected into the game, but lamented that most monsters were simple automatons differentiated only by how hard they hit. “Moria is probably the closest to what I wanted to do when I made Rogue. It’s got shops, and all the monsters are really different. When I played Moria, I felt more like, yeah, this is what I wanted to get Rogue to do.”

Ironically, Rogue‘s failure to attract notice from mainstream gamers did not keep the game from leaving an impression on gaming culture and mainstream technology. So complex was Rogue, with so many moving parts, that a professor at UC Santa Cruz used the source code as an illustration of how complex programs work.

Even so, it was a chance meeting at USENIX, an annual conference where technology professionals gather to discuss trends in computing, that allowed Rogue to take on greater personal significance for Toy, as well as attain a profound level of historical significance for the computing industry. Toy, attending with Lane, hobnobbed with pioneers such as Bill Joy, Ken Thompson—and Toy’s idol, Dennis Ritchie, co-creator of UNIX and the author of the C programming language. Lane recounted the story of Ritchie’s and Toy’s meeting. “Dennis Ritchie was talking to us, and someone said, ‘Dennis, this is Michael Toy,’. And Dennis Ritchie is the god of UNIX, right? So Dennis looks at Michael and says, ‘The Michael Toy?’ Michael looked at him and said, ‘I can die and go to heaven.'”

As the conversation went on, Ritchie jocularly accused Rogue of being responsible for the single greatest waste of CPU cycles in history.5 Toy was thrilled. “Dennis Ritchie, one of the administrators, had his own system. We talked to him about Rogue once, and he said he figured out how to get around the copy-protection system. One of the early alphas of Rogue that was posted up on UC Santa Cruz was discovered, and I still don’t know exactly how. Someone hacked our labs. They renamed the binary from ‘Rogue’ to ‘UBL’ for Under Bell Labs. It had quite a big following at Bell Labs as UBL, and I didn’t even know about it. All of those people were my heroes. They made UNIX, and they were playing Rogue.”

Bibliography

  1. In 1965, Olivetti broke new ground: “Desk-Top Size Computer Is Being Sold by Olivetti For First Time in U.S.” Wall Street Journal. http://bit.ly/1w43xyB.
  2. As payment for the artwork used in the Macintosh version: “A Brief History of ‘Rogue‘.” Wichman.org. http://www.wichman.org/roguehistory.html.
  3. PC World put Rogue for the PC as the sixth best game: “The Ten Greatest PC Games Ever.” PC World. http://www.pcworld.com/article/158850/best_pc_games.html#slide6.
  4. Ritchie jocularly accused Rogue: “The Making of: Rogue.” Edge. http://www.edge-online.com/features/making-rogue/.