Procedural Dungeon Generator [WIP]
Editor Tool
2025 - present
Building a 2D Dungeon generator tool for Unity Engine. My goal with this is to understand desiger workflows when it comes to creating 2D worlds, and build a dungeon generator PCG tool which improves the level design workflows. It uses Random Walk and Binary Space Partitioning to generate dungeon layouts and structure. For wall placement, I used adjacency rules using NESW bitmask integers to detect wall types and generate 8 directional walls around the floors. Once I have gotten familiar with these two algorithms with each iteration, I plan to dabble with other PCG algorithms. To populate dungeons with assets procedurally, I am thinking to use Cellular Automaton and Perlin Noise.



At the moment, I am running into issues like black spots within the floor tiles after a pass of wall generator. It's likely due to adjacency errors with bitmasks. Figured this method is a little cumbersome and error prone. Designers and programmers need to manually set tile rules and tile references based on edge cases. A possible solution I have in mind at the moment is running another check with floor tiles to detect missing floor tile i.e `black spot` and fill it up. For wall generator, I am attempting to leverage custom rule tile implementations provided by Unity so designers can author dungeon rules without touching code and easily update the dungeon's art as well for different biomes.


