Procedural Dungeons of Doom: The Making of Rogue – Chapter 2

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

Procedural Dungeons of Doom: The Making of Rogue

Chapter 2: Where Are You @?

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 authorIt 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.

Rogue running on an Atari ST.

Rogue running on an Atari ST.

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.

Rogue running on an Amiga.

Rogue running on an Amiga.

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.”

Rogue for the Macintosh.

Rogue for the Macintosh.

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.”



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.”

Wichman (left) and Toy.

Wichman (left) and Toy.

 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.”


If you enjoy Episodic Content, please consider showing your support by becoming a patron or via a one-time donation through PayPal.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s