Introduction to More Interesting Dungeons

Get a brief introduction to a more interesting dungeon.

We'll cover the following

It’s the hero’s twentieth descent into the dungeon in search of the mythical Amulet of Yala—not surprisingly, both you and the hero are bored. Despairingly, the hero cries out, “Surely, not every dungeon is a bunch of rectangular rooms and corridors?”

So far, our dungeons have all used the same room-based generation system that we created in Build a Dungeon Crawler. This system works, but it makes for entirely predictable, maybe even boring maps. So, how do we generate a map where the player can explore a field of underground fungal trees, a sprawling city, or a dark forest? As it turns out, there’s an entire field of game development known as the procedural generation that’s built around using algorithms to create exciting environments like these, and game developers have been using it since the 1980s.

Using different procedural generation algorithms allows us to inject variety into our game. Rooms and corridors look designed, implying a sentient builder. Other algorithms generate a more natural-looking map. Varying the map keeps the player interested.

What will we learn?

In this chapter, we’ll learn to use traits to substitute our room-based generator with other map builders easily. We’ll learn two of the more popular map generation algorithms, cellular automata and Drunkard’s Walk, as we learn how to place monsters in maps that don’t feature explicit rooms. We’ll also learn how to design parts (or all) of our map by hand, store the data in our game, and integrate our designs with computer-generated maps.

Get hands-on with 1200+ tech skills courses.