What IS a dungeon? Gaming skills at the office. WaveFunctionCollapse.

In order to create a dungeon, one must first understand the dungeon.

I've been keeping this secret for a while, but I no longer see any point in hiding it: The next premium generator for Here Be Taverns will be a dungeon generator.

I'm not working on the code yet, and I have no specific deadline (other than I'd like it done this year). But I know for sure that I must build a dungeon generator. I am compelled to do this, and so I must do it.

Kate Compton teaches us that, to make great generators, you must first understand what "good" looks like. You can gain that understanding by talking to experts and then building your own "Artist in a Box".

It is helpful when making a generator to sit down with someone who makes the sort of artifacts you are building, and have them walk you through the process of making something.

- Kate Compton

Unfortunately, I don't have a dungeon design expert living in my home office. What I do have is an awesome collection of expert knowledge in the form of hardcover books and digital bookmarks.

It's a start.

Seriously though, what is a dungeon?

Let's sharpen our dungeon design senses. We'll start with the obvious, concrete things then move towards the more abstract ideas.

A dungeon is a maze with stuff in it

At their core, dungeons are mazes. Twisty passages lead to dead ends or loop back on themselves (more on that later). The way to the dungeon's center is never a straightforward path.

Jamis Buck backs me up on this:

Nintendo's Legend of Zelda or id Software's Doom use mazes so seamlessly as a setting that often you don't even consciously realize you're navigating one.

- Jamis Buck, from Mazes for Programmers

The mazes have always been there, whether you noticed them or not.

So why are they mazes? It's because of the prime directive of adventure design:

A good adventure should maximize the number of meaningful player decisions.

To put this another way, a straight path from A to B to C is not fun. Finding forks in the path, confounding stairways, and shortcuts from A to C is way more fun because they add decisions.

So our design for Here Be Taverns Dungeons could start with a selection of the maze algorithms in Jamis Buck's book. What's the next step? Let's keep asking ourselves: how can we add more meaningful decisions?

We can put stuff in the maze!

Stuff is the best. Stuff gives us objects or characters to interact with. This instantly evolves physical rooms into interactable situations. Let's brainstorm some stuff:

  • Magic items
  • Rusty swords
  • Traps
  • Lizard people
  • Rune-inscribed circles with magical effects
  • Bigger lizard people
  • Tapestries with hidden alcoves behind them
  • Books with titles like The Old Man in the Astral Sea
  • GIGANTIC lizard people

Since Here Be Taverns is already great at generating stuff, I could see this design coming together pretty quickly. In fact, we could probably stop here and have something fun.

One of my favourite dungeon generators is the one by Watabou. I'd argue that it's essentially generating mazes and then putting stuff in them.

Example of one-page dungeon generator by Watabou.
A one-page dungeon by Watabou. It's great!

I have to say I love this dungeon. It embodies the Here Be Taverns philosophy of giving Dungeon Masters "just enough" to work with. But since we are in the design phase, let's keep going. I prefer to think big and then scale things back down only when a deadline suddenly appears 2 days in front of me.

A dungeon is a setting where stuff happened

To take our design further, let's focus on the stuff in the dungeon. I've got questions about that floating chalice made from fused obsidian skeletal hands.

  • Why is this chalice here?
  • Who made this thing?
  • How did they craft skeletal hands out of obsidian?
  • Where did they even find the obsidian?
  • Why this chalice in this particular dungeon?

Asking questions like this brings us beyond the physical realm of things and into the time realm of stories.

Now you might be objecting to this. The story should be the thing that happens at the table right? Who are we as dungeon designers to decide what the story should be upfront? I agree that the final story should be in the hands of the entire gaming table, but the dungeon's origin story is in the hands of the dungeon designer, and for good reason: randomly placing stuff in a dungeon breaks player immersion and is harder to do.

Randomness breaks immersion. If the players encounter the skeletal chalice in one room, followed by a puppy adoption center in the next it violates expectations and dungeon cohesion, snapping them out of the moment.

Complete randomness is harder to work with. Dungeons are filled with many things. Without even a loose story in mind, we have to start from scratch every time we want to add something. If we place a skeletal chalice, what do we place next? Shrugs. Okay, imagine this dungeon is the temporary hideout for a lich who is creating their phylactery. The chalice serves in various rituals for this ambitious wizard. Now we have ideas for what comes next.

Here are some great frameworks I've found for adding the story element to assist in dungeon design:

Ironsword: Delve and Mausritter use dungeon themes.

A theme is a single word or idea that provides a binding idea for how the dungeon will likely be structured and what kinds of things might be found within. In Ironsworn it could be something like Fortified, or Ancient. For example, a Fortified dungeon will require cunning to infiltrate due to guards, geographic features, or other barriers.

You Are The Dungeon has you write your autobiography as an actual dungeon.

In addition to asking you things like "what evil took root in your heart", and "what foul being heard the call of your curse", You Are The Dungeon introduces the element of time. As the game turns, adventurers come to you and events occur within. You develop better cohesion as time passes and events begin to layer on top of one another. Perhaps the skeletal chalice was left by the lich, but the lich no longer dwells here!

What if our dungeon generator could do this? We could potentially simulate events over time to arrive at a collection of things that have a real history to them. This is the sort of next-level procedural generation that happens in games like Caves of Qud and Dwarf Fortress.

Caves of Qud chronology example from Retroware.
Caves of Qud shows the entire chronology for your character when you die.

So now we've got a maze, with stuff in it, that is bound together by a story. But we aren't done yet. Let's look at the story element from a weirder angle. What if the physical shape of the maze was able to influence the story?

A dungeon is a physical framework for story structure

5-room dungeon layouts from nerdsonearth.com
5-room dungeon layouts from nerdsonearth.com

Johnn Four first introduced me to the concept of the 5 Room Dungeon. With this model of dungeon creation, we seek to embed the Hero's Journey (the monomyth that underpins all the best stories) into the layout of the dungeon itself.

Here's the structure at a high level, with my notes on the corresponding Hero's Journey moments in brackets:

  1. Entrance and guardian (Call to adventure and the threshold guardian)
  2. Puzzle or roleplaying challenge (First challenge and possible mentor)
  3. Trick or Setback (Big setback and another opportunity for a helper figure)
  4. Climax, Big Battle, or Conflict (Revelation! Death and rebirth!)
  5. Reward, Revelation, Plot Twist (Atonement, Return Home, and the Gift)

There is a lot to like about this framework, but let's focus on its applications to a random generator. This approach could give us an ingredient every great design needs: clear constraints.

If every dungeon we generated had 5 major rooms, and they were populated according to this structure, we could ensure a consistent design that supports single game sessions and great storytelling.

A dungeon is a dynamic opportunity for personalization

The most memorable dungeons that have ever been created have this feature in common. Great dungeons are experienced differently by every player who visits them. They are dynamic, living environments.

They should even be experienced differently on successive visits (an obvious but insightful idea I learned from Ben Robbins). Cleared out the dragon? Now beastmen have moved in. Haven't been there in a while? An earthquake has collapsed a wall and revealed a shortcut.

We can revisit the maze as an opportunity for dynamic dungeon evolution. This excellent article from The Alexandrian tells us of the expert dungeon designer Jennell Jaquays. What was her secret? Jaquay used "happy accidents" and non-linear dungeon design to increase the complexity of the space.

Here's a bullet-point summary of ideas for "jaquaying the dungeon":

  • Multiple Entrances
  • Loops
  • Multiple level connections
  • Discontinuous level connections (ie. an elevator from floor 1 down to 3)
  • Secret and unusual paths
  • Sub-levels
  • Divided levels
  • Nested dungeons (yikes!)
  • Minor elevation shifts
  • Midpoint entry
  • Non-euclidian geometry (double yikes!)
  • Extradimensional spaces (𝛴 yikes!)

If you get a chance, you should read the full article on The Alexandrian–it's awesome!

Some of these will be easier to write code for than others. Adding loops is as simple as using the algorithms for what Jamis Buck calls a "braid maze". Adding non-euclidean geometry might not be possible with JavaScript but I'll check...

Highlight: The Gamer to Change Maker Workshop

I recently learned of these workshops that help people with existing gaming skills excel in non-gaming scenarios. In other words, if you can organize a D&D game you can probably ask for that raise at work.

The workshops are run by game designers and charge on a sliding scale from AUD 10 to AUD 120 at the time of writing.

I think it's an interesting idea worth checking out. The next workshop is on May 8. You can learn more here.

Hack: WaveFunctionCollapse

The talk that introduced me to WaveFunctionCollapse

Let's wrap up with a hack that supports the Dungeon theme we've been going with. WaveFunctionCollapse is an open-source procedural generation algorithm that describes itself like this:

Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics.

Pretty cool right? Here's a visual of the algorithm at work:

Animated demo of the WaveFunctionCollapse algorithm.
GIF from the WaveFunctionCollapse GitHub repository.

What this means in practice is that you can take a very small set of inputs - a single tile - and use it to generate complex outputs. Caves of Qud is using it to create interesting dungeon maps. The talk I linked to also includes techniques for mitigating some of the downsides of this algorithm.

I'll be experimenting with this when I start working on the maps for Here Be Taverns dungeons. One approach I want to try:

  1. Use a maze algorithm from the Jamis Buck book, or this algorithm from @a327x, to form the dungeon's backbone.
  2. Make 1 or 2 of the rooms bigger.
  3. Use WaveFunctionCollapse to "paint in" some additional detail in the bigger rooms.

Haven't tried it yet, but when I do you'll be the first to know ✌️

Become a better Game Master, Worldbuilder, and Content Creator

1 Homebrew. 1 Highlight. 1 Hack. Once a month.
Adam shares original TTRPG content, cool finds, and lessons learned with 1000+ members in the Sword & Source newsletter.
jamie@example.com
Subscribe
Unsubscribe anytime. Your email will never be shared with others. Read the privacy policy.