PROCEDURAL DUNGEON

A dungeon-crawling puzzle game where the dungeon is different every time you play. Rooms are laid out, connected and validated at runtime; you explore, solve what you find, collect key items and carry them back to a central well to finish the run.
The problem
Procedural layouts fail in two directions: they generate something unreachable, or they generate something so uniform it may as well have been hand-placed once. A generated dungeon has to be provably connected and worth walking through.
What I built
- A 30×30 grid system backed by a 2D array, with rooms placed as prefabs against that data.
- Binary-tree connectivity to decide which rooms link to which, giving the layout a spine rather than a uniform mesh of connections.
- A custom greedy best-first pathfinder for carving hallways — it measures Manhattan distance, steps toward the nearest neighbour, and tracks visited cells so corridors never loop back on themselves.
- Hallway merging, letting corridors converge so the dungeon does not read as a set of identical one-in-one-out rooms.
- A validation pass that detects isolated or unreachable areas and regenerates. This is the guarantee that you can never spawn into an unwinnable dungeon.
- Six hand-authored puzzle rooms — Chess, Garden, Maze, Library, Hub, and a Little Red Riding Hood room — designed around a deliberately limited asset set.
Tech
Unity 2022.3.10f1, C#, Unity AI Navigation, TextMeshPro. Windows and macOS builds.