Unity-Based Algorithm For Seamless Dungeon Generation
Learn how the Labyrinth Procedural Generator works and try the demo.
This project began in 2023, when Ryan Carpenter was designing an algorithm to procedurally generate a 3D dungeon for an FPS he was working on at university. While the game itself never went anywhere, Ryan revisited the idea in 2024, continued developing it, and after two years of work, he finally presented a working demo.
Labyrinth Procedural Generator draws inspiration from the level layouts of games like The Binding of Isaac and Enter the Gungeon, as well as the interconnected worlds of Zelda games and Dark Souls. It can generate thousands of rooms instantly, including boss rooms, shops, and item rooms, while maintaining fully contiguous maps. The engine also gives developers control over the layout and progression style.
As Ryan explains, he wants this algorithm to generate dungeons that feel structured like an RPG, while still offering the randomness and replayability of a roguelike.
"Most of the algorithms the Labyrinth uses today are well known in the proc-gen community, but there's one feature I can genuinely call my own.
Back in the club days, I had little knowledge of how procedural generation actually worked, so in a way, I had to get creative. Drawing on what I knew about Drunkard's Walk and rule tiles, I came up with a feature I call 'Blueprints', individual, single-celled components on a grid that combine to form an entire map."
Ryan Carpenter
Blueprints are the backbone of the algorithm and are essential for generating any rooms. They consist of single-cell markers on a grid that tell the algorithm where a room can potentially spawn. Once the blueprints have been generated, a second pass parses them and creates rooms according to a predefined set of rules.
The algorithm was developed in Unity 3D, but can be rewritten to work with any game engine. Ryan has several more features planned for the project, including turning it into a downloadable Unity package that others can use.
For now, you can read a detailed blog post about the Labyrinth Procedural Generator and try out the web demo here.
Subscribe to our Newsletter, join our 80 Level Talent platform, Discord, and follow us on Twitter, LinkedIn, Telegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.
Are you a fan of what we do here at 80 Level? Then make sure to set us as a Preferred Source on Google to see more of our content in your feed.
Subscribe to 80 Level Newsletters
Latest news, hand-picked articles, and updates
Keep reading
You may find these articles interesting
Unity Tool For Prop Placement With Physics Simulation
Build Fake Interior Spaces Behind Flat Surfaces With This Unity Tool
Ocean Shader With Gerstner Waves In Unity
Building Procedural Node-Based Mesh Framework In Unity
Fake Tube Interior Using Classic Parallax Windows Trick
Creating Ori-Style 2D Water System In Unity