Don Worth taps his love of D&D and aptitude for programming to create a dungeon crawl for the Apple II.
The BAM-like: Exploring Beneath Apple Manor
Chapter 1: Environmental Conditions
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.
In biology, convergent evolution is the process by which unrelated organisms develop similar traits as a result of adapting to similar environmental conditions. Convergent evolution occurs frequently in nature. Bats, birds, insects, and pterosaurs all developed wings because they were forced to acclimatize to similar environments, even though none of the species are closely related.
Convergent evolution has been known to occur in video games as well.
Rogue is popularly credited as the progenitor of the roguelike, a subgenre of computer role-playing games (CRPGs) known for randomly generated levels, turn-based gameplay, items bearing randomly assigned properties, and irreversible death. While the genre bears its name, Rogue was not the first of its kind. Don Worth got there first.
Worth discovered computers when he enrolled at University of California San Diego as an undergrad in 1967. He became entranced by the colossal mainframes that took up whole rooms and stored data on punch cards instead of hard drives. One of his first pet projects was learning DITRAN (Diagnostic FORmula TRANslating System), a programming language created for the express purpose of crunching advanced physics computations.
In 1968, Worth transferred to University of California Los Angeles (UCLA) and got a job in the university’s computer center, then known as Campus Computing Network. His job was to write software in assembly language that ran on the university’s IBM System 360, a mainframe connected to the Department of Defense’s Advanced Research Projects Agency Network (ARPANET). Heralded as the precursor to the Internet, ARPANET was built so scientists and military personnel could share information. The growing web of connected mainframes included most University of California campuses, and Worth’s code facilitated communication between UCLA and other mainframes on the network.
As one of the first individuals to explore cyberspace while its virtual galaxies were still forming, Worth put his programming skills and network access to good use. “A couple of us had written a space game called FRON on the mainframe,” he told me.1 “You’d enter in moves for your ships, and then overnight, there’d be a turnover, and you’d get back a map of all the ship movements and figure out what you were going to do for the next move. It was all partial information—meaning, the computer knew where all the ships were, but you only knew where your ships were and maybe [you knew the contents of] a square or two around them.”
Outside the computer lab and away from their homemade space-faring game, Worth and his buddies played Dungeons & Dragons. They immersed themselves in the fantasy of exploring strange places, unearthing fantastic treasures, and rolling dice to determine whether their intrepid party of programmers-turned-adventurers lived or perished.
In 1978, Worth and a friend split the cost of an Apple II computer. Hashing out a deal analogous to a custody agreement, Worth got to keep the computer for two weeks before turning it over to his friend for another fortnight. Worth spent his computing time learning Integer BASIC, a language crafted by Apple engineer Steve Wozniak and a staple available on all Apple II machines. Naturally, his inclination was to write a computer simulation of Dungeons & Dragons.
The concept Worth laid out for his game was simple. Players would create an adventurer and explore dungeons inhabited by fearsome creatures that guarded magical artifacts. In RPG parlance, the game would be a dungeon hack, an adventure focused purely on fighting and plundering.
Like his space game, Worth’s dungeon hack forced adventurers to go into new environments blind. Players started on a single square. Only adjacent squares were viewable; the rest of the dungeon was cloaked in darkness. Step by step, the darkness peeled back to uncover chambers and winding passageways. The goal of the game was to delve deep beneath stately Apple Manor and recover the fabled golden apple. Worth called his game Beneath Apple Manor, or BAM for short. “I figured since I was writing it for the Apple, I needed to have ‘Apple’ in the name, and then I just invented the back-story about a manor house with a dungeon under it.”
In the initial, low-resolution version of Beneath Apple Manor, color-coding game elements gave the illusion of movement. All floor tiles were gray, and a blue square represented the player-character. When the player pressed the N, S, E, or W keys to move in a cardinal direction, Worth lit the adjacent square blue to show the player’s new location, and painted his previous location floor-tile gray.
With the premise set, Worth began adding meat to Beneath Apple Manor‘s bones. He imported abilities and rules that he and his friends employed in their D&D campaigns—listening at doors to detect noise and movement within, breaking down a door, and casting an x-ray spell to reveal the level map. Play proceeded according to turns: first players moved, and then the monsters took a turn, and so on, affording players limitless time to mull over each action.
Worth also tried his hand at writing algorithms that drew brand new levels every time players sat down to the game. To Worth and his friends, part of the fun of Dungeons & Dragons was coming across strange new places. They never knew what dangers might lie in wait around the next turn, which blanketed BAM in suspense and trepidation. One cocksure or poorly calculated move and their avatars could be killed off.
One of Worth’s references for generating levels was Dragon Maze, an Apple II game that drew random mazes. “I set the dimensions, the X and Y coordinates of the far corners [of the level], and just plopped them randomly on the screen. So rooms tended to overlap sometimes or sit right next to each other. I kind of copied Dragon Maze and had the program do a random walk from the upper-left hand corner of a room until it hit open space in another room. Those turns were the corridors connecting each room to the others. I had to write some code to make sure I didn’t have a room sitting out by itself someplace.”
Once a level was generated, Worth populated it with colored blocks representing doors (brown), a single treasure (yellow), and monsters. The strength of the monsters roaming each level depended on how deep beneath the manor players had descended, as well as their experience level. Like the game’s rules, its bestiary came from D&D: green slimes, purple worms, ghosts, trolls, and dragons.
Each player-character started with strength, intelligence, dexterity, and body, an attribute that represented health. In D&D, higher stats equaled greater strength. BAM treated stats like pools. Bashing doors and monsters drained strength, casting spells lowered intelligence, moving exhausted dexterity, and taking damage lowered body. In effect, players grew fatigued from performing actions. Standing still slowly refilled each attribute, which added to tension: players could find a hiding spot from monsters when their stats ran low. Despite the risk of exhaustion, players were encouraged to kill monsters to earn experience points. At the end of each level, they could trade experience points to deepen their pools of stats, and spend gold on weapons.
Slaying monsters was easier said than done. Bumping into a monster initiated an attack, and gave monsters the chance to retaliate. Higher stats translated to greater accuracy in battle; many low-level monsters missed much more often than they hit, but players could suffer the same misfortune. If a monster gained the upper hand, players could break away and attempt to regroup.
Monster vulnerabilities and level layout added other layers of strategy. Doors automatically locked behind players after they passed through thresholds, allowing players to barricade themselves inside rooms simply by walking through the doorway. Many level layouts included secret passageways that players could find by bashing walls or casting the x-ray spell.
Worth coded ingenious workarounds that flew in the face of the Apple II’s hardware limitations. “Originally, I wrote it all in BASIC, and it was just too slow to update the screen, so I wrote an assembler language subroutine to do screen updates. Also, I wanted sounds. I had the Apple Talker product and had recorded a couple of sounds: door bash, sword clash. Then I reverse-engineered the playback part of Apple Talker and rewrote it in assembler [to speed up processing].”
Don Worth brought friends and family into the Beneath Apple Manor fold. His brother, Steve, was 11 years younger than Don, and an art major at UCLA during the time Don was developing BAM. “He did all the illustrations for the original version of Beneath Apple Manor,” Worth confirmed, pleased that Steve could illustrate the monsters that the Apple II’s limited hardware represented only as colored blocks or text characters.
The siblings bonded over Dungeons & Dragons as well. Every night, Don guided Steve and his friends as the group’s Dungeon Master. “I remember thinking it was kind of interesting that the people I was used to playing with at UCLA, all the programmers, were really careful when they’d go into a room. They’d scout it out and try to take it without any blood loss on their part. Steve and his friends, on the other hand, would charge in willy-nilly and lots of them got killed because I had scaled the room to be a challenge for the UCLA folks.”
As a result of Steve’s party’s kill-or-be-killed play style, resurrections were cast nearly as often as fireballs. “There were all these resurrections going on, and I just thought it was fun. They enjoyed the game so much, and all the side effects they were experiencing from resurrecting were a hoot. It opened my eyes to a different play style.”
If you enjoy Episodic Content, please consider showing your support by becoming a patron or via a one-time donation through PayPal.
- A couple of us had written a space game: Interview with Don Worth. All quotes from Don Worth come from interviews conducted via phone and email over 2012-2014.