A Tool Designed For Developers to Create Procedurally Generated Dungeons in Unity Using Custom Prefabs
A versatile, general-purpose dungeon generation tool for developers of any discipline. This project provides a solid foundation for dungeon-crawler games allowing developers to expand and customise dungeons to suit the game's needs.
Gallery to be filled
The dungeon is generated one floor at a time. Each layer stores its walkable tiles as a
HashSet<Vector2Int>, which ensures extremely fast lookups when placing walls
or identifying ladder positions. Parent objects are created for each layer to keep the Unity
hierarchy structured and readable.
The dungeon begins as one large region which is recursively split into smaller sections using a Binary Space Partition (BSP) tree. Each leaf of the tree becomes a room, with size and offset randomised inside that region.
This method ensures rooms never overlap and creates naturally spaced layouts.
Rooms are connected using simple corridors. The generator chooses whether to carve horizontally or vertically first, based on a “straightness” parameter, allowing both structured and more organic layouts depending on the configuration.
After floors and corridors are carved, walls are automatically generated by checking each tile for missing neighbours. Adjacent floors are compared to detect shared walkable tiles, which become valid ladder placement points to connect multiple layers.
Still in Active Development, Visit the Itch Page Below