We’ve linked to TheZZAZZGlitch’s videos before, their obsession with the Pokémon and Pokémon Mystery Dungeon games is both admirable and somewhat worrying.
The video I’d like to point out today is this one on the dungeon generation in the first Pokémon Mystery Dungeon game (19 minutes), which basically lays bare the entire scheme by which nearly all Mystery Dungeons construct their procedural death labyrinths.
I’ve played quite a few Mystery Dungeon games, including nearly all of the many versions of Shiren the Wanderer (Rainbow Labyrinth is the only one I’m missing), and these dungeon level types keep coming up again and again. I’d be very surprised if essentially the same code, or close to it, wasn’t used in all of them. The beginning of the dungeon generation explainer is at 5:03.
One interesting thing is that the dungeons generated by the various routines often create maps that can be seen as variations upon the dungeons from the original roguelike, Rogue itself. Rogue used a distinctive 3×3 grid of rooms. Sometimes a “room” might be a winding corridor, a dead-end or a dark maze, but it doesn’t take much playing to see the patterns used, and the Mystery Dungeon games obviously use a similar system for most of its floors, using differently-sized grids. Sometimes extra dead-ends are generated, and there are a few extra styles, but in its overall plan it’s Rogue-standard. It’s what the video calls the “standard generator.”
This isn’t all that the video explains, for just one example it goes over the details of how the game’s random number generators work, and also how they can be abused (the dungeon RNG is seeded to 1 at boot, which can be used to ensure dungeons generate the same way). I think it’s essential viewing for any Mystery Dungeon enthusiast.