Dungeon (Sawyer)

Dungeon was released in December 1979, as part of the 15th edition of a magazine called CURSOR for the Commodore PET. CURSOR was distributed as a cassette accompanied by several pages of notes.

Dungeon is a top down, dungeon crawler with simple combat.

Start screen.
Start screen.

The text from the CURSOR edition 15 is included below:

DUNGEON… The evil magician Trent has transported you into the depths of a set of dungeons filled with various bloodthirsty creatures. There is a way to escape: you must find (and take) all the gold hidden there (which is protected by those beasts mentioned before). However, the magician who constructed the dungeons was particularly fiendish: some of the rooms have no way in (except through walls). Those rooms may have gold in them, too. The entire dungeons are surrounded by a completely impenetrable wall.

On the screen you will see a display of the dungeons. Your position is marked by a dot. Gold is marked by a ‘G’, and creatures by runes of various sorts. Open space that you’ve been to, is white, and walls are black. (Anyplace you haven’t been is black, too, even if it is open). The doors between rooms are marked by a grey square. (The doors have spells on them preventing creaturess from passing through them.) The impenetrable wall is shown as a checkerboard pattern. At the top of the screen is a line showing your ‘hit points’, your experience, and how much gold you’ve found.

Hit points are a measure of strength; the higher your hit points, the stronger you are. You go up in experience as you defeat the creatures that lurk about. (You die if one of them defeats you.) Equally the more experience you have, the stronger a creature you can defeat (assuming you have the necessary hit points).

To move use the number pad in the usual way: 8 means up, 3 means down and right and so on. To move through a wall (this is magic we’re talking about here, remember) hold the SHIFT key down when you press a number key. Naturally, moving through walls takes more of your strength than moving through rooms. Also, it is possible to rest, and recover your strength. Pressing ‘5’ (no movement) allows you to rest for one turn. Be careful when and where you rest: the beasts have no mercy, and will attack even if you do nothing. To throw yourself on the mercy of the evil magician, press Q (for Quit).

Gameplay Video

This video does nothing to speed up the level generation, so I’d advise skipping ahead when that begins.

Setting

The title screen for Dungeon invites the player to “Search for Gold in the Ancient ruins”. The game itself is a randomly generated maze with a top down view. The player character is represented by a circle that can be moved around the maze using the numpad. The map is revealed as the player explores it, fighting monsters and picking up gold.

In-game shot of Dungeon.
In-game shot of Dungeon.

The top two lines of the the screen are dedicated to displaying the curent values for the player’s hit points, experience and gold. The second line is used as a status line to inform the player about what’s happening in the dungeon turn to turn. The rest of the screen displays the world. This world doesn’t extend beyond a single screen and it’s fixed in place, i.e. there’s no camera following the player character.

Goal

The Casette Magazine gives you some backstory explaining that you’ve been transported to a dungeon by a magician with the unlikely name of Trent. In this dungeon you must fend off monsters until you find all the gold and take it back to Trent.

There are 11 piles of gold randomly placed throughout the dungeon if you find all these then that’s as close as you can get to winning the game, though there’s no win state acknowledged by the program itself.

Character Creation

Dungeon has no character creation. After the title screen there’s a long generation state then it’s straight into the game.

Stats

Dungeon tracks three stats:

  • Hit Points
  • Experience
  • Gold

The game also tracks how many monsters you’ve killed.

The stats are pretty standard, hit points are the amount of health you have and once it reaches zero, you die. Experience is gained by killing monsters and at certain intervals you level up and your hit point amount increases. There’s no maximum HP you just have this single counter. The gold stats tracks the amount of gold you pick up around the level.

Many games for the Apple II were written in Integer Basic which could only make use of the integer numbers i.e. 1, 2, 3 but not 0.1, 0.5 etc. Commodore Basic, by default, uses the “Real Number” type that could store fractional numbers. For Dungeon, all stats including the hit point varaible are represented by a real number and so you can lose fractional amounts of a hit point.

Input

Dungeon was written for the Commodore PET that had a keyboard with a full numpad that worked well as a set of arrow keys. An image of the PET keyboard layout is shown below and the numpad can be seen on the right.

The Commodore PET keyboard layout
The Commodore PET keyboard layout

The number keys are used for movement, including on the diagonals. Holding the shift key and pressing a move let’s the player move through walls.

Pressing the 5 key in the center of the numpad waits a turn and increases your hit points a little.

The Q is used to quit but also to declare you’re ending the game to show Trent how much gold much you found and at that point you’ll find out if he’s satisfied with your efforts.

Exploration

Once you press RETURN to begin a game, you’re taken to a loading screen that shows for around a minute until the dungeon level is generated. You can see this holding screen below, where it shows the text “SETTING UP…”.

Level Generation.
Level Generation.

In a review for Ultima 1, an Apple II RPG released a few years later in 1981, the reviewer laments that the dungeons only have corridors and no rooms which “may seem really trivial, but to a dedicated fantasy role-player, it’s a moderate drawback”. The reviewer would have been please to know Dungeon’s dungeon generator included both rooms and corridors. Unfortunately the rooms are not guaranteed to be joined by corridors which necessitates the player’s ability to pass through wall tiles.

Moving through walls in Dungeon
Moving through walls in Dungeon

You explore the world a tile at a time and features of the dungeon are reveal in a tile radius of the character’s position. This acts a little like an early fog of war.

Exploration in Dungeon.

Movement costs hitpoints! The cost 0.15 hit points per normal step, if you’re holding SHIFT then the cost is 0.3.

Inventory

There’s no inventory in the game apart from tracking how much gold you’ve found. There’s no concept of weapons, armor, potions or anything like that. To collect gold you move on top of it.

Combat

Players and monsters in Dungeon attack at the same time. Therefore it’s not strictly turn or round based combat, if you’re in combat you both are going to give and take some damage. The attack power for the player is the player’s hit points plus their experience. In the code this is stored as PW. The character gets a base attack of PW*0.25 and then a random bonus on top of that from 0-100% of PW*0.5. This means at most you can hit PW*0.75.

This cannot work exactly the same way for the enemy as monsters don’t have experience, so it uses only the monster HP but otherwise works in the same way.

An enemy.
An enemy.

Monsters may also negotiate; if the monster’s HP is more than 2x the HP of the player, then the monster will offer to leave for half the player’s gold.

Negotiating with Dungeon monsters

There’s no magic system.

Advancement

If you defeat an enemy, you gain it’s maximum hit points as experience. If your experience points are greater than twice the value of a hidden variable PX then you level up and your current hit points are tripled.

Levelling up in Dungeon
Levelling up in Dungeon

PX is set to 0 at the start of the game. Then when you first level up it’s set to your experience at that time. So if you kill a mosnter and get 5 exp, then PX becomes 5 and you need 10 exp to get to the next level.

Legacy

Dungeon introduced little that hadn’t already been done before. It predates Rogue yet has several of it’s characteristics but Beneath Apple Manor had done all that and more, earlier. Earlier still than Beneath Apple Manor, Games on the more powerful PLATO system had much more sophisticated dungeon delvers.

Here’s a comment from Brian regarding the fog of war:

I originally coded the game so you’d see the whole map from the start, but then it seemed to give it all away, so I changed it to just show your immediate surroundings so you sort of discover it as you go which is more fun– and only involves drawing 8 characters so was fast. I haven’t seen rogue but it’s possible they thought the same thing– was that later or earlier? And yes I wrote those books–you’re one of the few people who ever bought them! I didn’t do any more games but drifted to AI stuff, but it was AI of the 1980s and didn’t really do much compared to todays AI which amazes me.

The bounds of the map are displayed as a checkered tiles that cannot be passed. This boundary isn’t displayed by default but the player has to bump into it. That’s somewhat novel. Games like Swords and Sorcery had an explicit boundary but it’s always shown, not something that’s discovered.

Influences

Suprisingly Zork is one of the major influences for this game as can seen by Brian’s comment below. Dungeon has a “Grue” enemy which also appears in the interactive fiction game Zork. The line from Zork: “You have been eaten by a Grue” appears if you try to wander in dark places without a light source. However the name Grue does not originate with Zork but from one of Jack Vance’s Dying Earth Novels: Eyes of the Overworld. The same Dying Earth series that inspired the Dungeons and Dragons tabletop roleplaying game.

❖ Zork, 1977
No [ed: Brian saying he had not played Beneath Apple Manor] -- I'd played Zork which was text-based so Dungeon was my attempt at making a zork-like game that was visual. Nice to hear you still remember it!
Further Reading

Here are a selection of resources used in the article and for further reading.