Assemble dungeons from hand-built rooms instead of drawing every floor.
Procedural Dungeons
Hand-authored dungeons are the best-looking and the slowest to make. Procedural assembly splits the difference: you build the rooms, the engine builds the dungeon. Each run stitches your hand-made rooms into a fresh layout that still looks designed, because every tile in it was drawn by you.
Room Templates
A room template is an ordinary zone you built, tagged with the metadata the assembler needs:
| Field | What it controls |
|---|---|
| Roles | What the room can be used as: entrance, combat, connector, highlight, treasure, boss, exit, dead end |
| Size | Width and height in tiles |
| Theme tags | Which dungeons it belongs to (crypt, mine, sewer…) |
| Difficulty cost | What it spends from the run's difficulty budget |
| Rarity weight | How often it gets picked |
| Min / max depth | How deep into the dungeon it may appear |
| Max uses | Cap on repeats within one layout |
| Allowed rotations | 0°, 90°, 180°, 270° |
Sockets
Rooms connect through sockets on their edges — a direction (north/south/east/west) and a type: normal door, large door, cave opening, stairs up, stairs down, or portal. Two rooms only join where their socket types and facings match, which is what keeps a generated layout from producing a doorway into solid rock.
Rooms also carry encounter sockets (where mobs or a boss belong) and loot sockets (where chests and rewards belong), so populated content follows the layout automatically.
Generation Config
| Setting | Default | Meaning |
|---|---|---|
| Min / max rooms | 5 / 7 | Layout size range |
| Required roles | entrance, combat, boss, exit | Roles a valid layout must contain |
| Max branches / branch chance | 0 / 0 | Side passages off the main path |
| Difficulty budget | 100 | Total difficulty cost the run may spend |
| Theme tags | — | Which room pool to draw from |
| Max placement attempts | 500 | Give-up threshold before reporting a failure |
| Regenerate on reset | On | A persistent instance gets a fresh layout when it resets |
Generation is seeded and deterministic — the same seed gives the same dungeon, so a layout can be shared by a party, reproduced for debugging, or kept stable for a season. Failed generations return validation issues naming what was missing (no room with an exit role, no matching socket type) instead of producing a broken map.
Pair it with instances and portals so each group gets its own generated run.