Dungeon Route Planner is a Blueprint-only procedural dungeon generator for Unreal Engine 5.7 and later. It plans a grid of rooms and corridors from a seed, checks the boss room can be reached, builds the dungeon on the server and replicates it to every player. Bring your own art: the pack ships with simple grey-box pieces coloured by room type.

The fastest way to see the pack working is the demo map, which opens by default.
You start in the Start hub of a freshly generated dungeon. Yellow discs mark the spawn points, and the grey boxes are traps.

| Key | Action |
|---|---|
| W A S D | Move |
| Mouse | Look |
| Space | Jump |
| F9 | Generate a new dungeon with a new seed (host only) |
| Up Arrow | Raise Danger by 0.25 and rebuild with the same seed (host only) |
| Down Arrow | Lower Danger by 0.25 and rebuild with the same seed (host only) |
The top-left HUD shows the current Seed, Danger and your Health. Touch a trap box to take damage; at 0 health you return to the Start hub.
To try multiplayer, set Number of Players to 2 and Net Mode to Play As Listen Server in the Play options, then press Play.
Everything lives in one folder, Content/DungeonRoutePlanner . No plugins or C++ are needed.
Your players won't be moved into the dungeon automatically, because that depends on your game. See Multiplayer below for the pattern the demo uses.
The Demo and Maps folders are examples only. Nothing in the core planner depends on them, so you can delete them once you've seen how they work. The demo is also the only part that uses Enhanced Input.

generation flow · 4 steps, 1 check, 3 events
If a plan fails the reachability check, the planner tries again. If every attempt up to Max Plan Attempts fails, On Plan Failed fires instead and nothing is built. On Piece Built is also called on each piece as it spawns, so pieces can set themselves up.
Select the planner in your level to see these in Details. Hover any setting for its tooltip.


| Category | Setting | What it does |
|---|---|---|
| Generation | Seed | The number that decides the layout. The same seed always gives the same dungeon. -1 picks a random seed each time. |
| Generation | Auto Generate On Begin Play | Builds a dungeon as soon as the level starts. Untick it to call Generate yourself, for example after a lobby. |
| Generation | Max Plan Attempts | How many times the planner retries a layout that fails validation before giving up (default 10). |
| Difficulty | Danger | 0 to 1. Scales how dangerous the dungeon is, including how many traps it places and how many dead ends. Passed to every piece through On Piece Built. |
| Pieces | Corridor Pieces | One list of Blueprints per corridor shape: DeadEnds, Straights, Corners, TJunctions and Crossroads. Put your own corridor pieces here. |
| Pieces | Special Pieces | The same five shape lists, for special rooms. The pack fills DeadEnds and Straights; leave a list empty if you have no special version of that shape. |
| Pieces | Start Piece Class | The Start hub Blueprint (default BP_DRP_Hub_Start). The demo places players at its EntryPoint arrow. |
| Pieces | Boss Piece Class | The Boss hub Blueprint (default BP_DRP_Hub_Boss). |
| Pieces | Door Plug Class | The Blueprint that seals openings leading nowhere (default BP_DRP_DoorPlug). |
| Pieces | Trap Classes | The traps that can be placed (default BP_DRP_Trap_Box). Add your own trap Blueprints here. |
| Debug | Show Debug Plan | Draws the plan as lines and prints progress messages. Off by default. |
| Generation | Build Rooms | Untick to plan without spawning any pieces, which is handy for testing seeds quickly with the debug lines. |
| Debug | Enable Regenerate Key | Lets the host press a key to build a new dungeon. |
| Debug | Regenerate Key | The key for the above. Default F9. |
Most Generation settings come in pairs. Danger blends between them: at Danger 0 the planner uses the Easy value, at Danger 1 the Max value, and anything in between is mixed proportionally. Raise a Max value to make high-Danger dungeons harder without changing easy ones.
| Setting | Easy → Max (default) | What it controls |
|---|---|---|
| Cell Size | 1000 | Width of one grid cell in Unreal units. Every piece must fit one cell. |
| Grid Size | 20 → 24 | Number of cells along each side of the grid. |
| Boss Distance | 0.5 → 0.85 | How far from the start the boss room sits, as a fraction of the grid. |
| Boss Doors | 3 → 4 | How many entrances the boss room has. Each one gets its own route. |
| Wander | 0.3 → 0.5 | How much routes wander instead of heading straight for the boss. |
| Detour Chance | 0.3 → 0.6 | Chance a route takes a detour. |
| Route Gap | 2 → 4 | Minimum spacing between routes, in cells. |
| Extra Loops | 3 → 6 | Extra links that turn branches into loops. |
| Connectors | 2 → 5 | Passages joining one route to another. |
| Connector Max Len | 6 | Longest connector, in cells. |
| Dead Ends | 4 → 12 | Number of dead-end branches. |
| Dead End Min Len / Max Len | 3 / 6 | Shortest and longest dead end, in cells. |
| Dead End Turn Chance | 0.3 | Chance a dead end turns as it grows. |
| Dead End Treasure Chance | 0.25 | Chance a dead end is marked as a treasure spot. |
| Special Chance | 0.1 → 0.15 | Chance a corridor becomes a special room. |
| Trap Chance | 0.15 → 0.45 | Chance a corridor cell gets a trap. |
| Min Traps Per Route | 2 → 3 | Fewest traps on each route. |
| No Adjacent Traps | On | Stops traps being placed on neighbouring cells. |
| Safe Radius | 3 | Cells around the Start hub kept free of traps. |
| Start Tries | 50 | Attempts to find a valid start position. |
| Passage Tries | 30 | Attempts to fit each passage before skipping it. |
Internal variables (eye closed) are read-only from outside. You can still read Seed, Danger, Is Built, Start Piece and Boss Piece from your own Blueprints.
The tables above say what each setting is. This section says what you'll see in the dungeon when you change it. For settings with an Easy and a Max value, change both to move the whole range, or change only Max to affect high-Danger dungeons only.
| Setting | What you'll see | Turn it up | Turn it down |
|---|---|---|---|
| Seed | Picks one exact layout. Same seed + same Danger + same settings = same dungeon, on every machine. | A different number gives a different layout (see Choosing seeds below). | -1 picks a new random seed each time. |
| Danger | Moves every Easy/Max setting at once, from Easy (0) to Max (1). | Bigger grid, boss further away, more doors, routes, loops, dead ends and traps. | Smaller, more direct dungeon with fewer traps. |
| Setting | What you'll see | Turn it up | Turn it down |
|---|---|---|---|
| Cell Size | How big each grid square is in the world. Must match your pieces. | Bigger, more spread-out dungeon (only if your pieces are bigger too). | Smaller dungeon (only with smaller pieces). |
| Grid Size | The area the dungeon can fill. | More room: longer routes and more space for branches. | Tighter, more compact dungeon. |
| Boss Distance | How far the boss room is from the start. | Longer walk to the boss. | Boss is closer to the start. |
| Boss Doors | Number of ways into the boss room, each with its own route. | More routes and more choice for players. | Fewer routes; at 1, one main path. |
| Route Gap | How far apart routes must stay. | Routes spread out across the map. | Routes can run side by side. |
| Wander | How much each route snakes about. | Winding, maze-like routes. | Straighter routes towards the boss. |
| Detour Chance | How often a route takes a detour. | More detours, longer journeys. | More direct routes. |
| Setting | What you'll see | Turn it up | Turn it down |
|---|---|---|---|
| Extra Loops | Links that turn branches into loops. | More circular paths; players can go round instead of backtracking. | More tree-like layout with more backtracking. |
| Connectors | Passages from one route to another. | Routes cross over more; easier to switch paths. | Routes stay separate. |
| Connector Max Len | Longest a connector can be. | Connectors can join routes that are further apart. | Only short links between nearby routes. |
| Passage Tries | How hard the planner tries to fit each passage. | More passages succeed in crowded grids (slightly slower). | Some passages are skipped. |
| Setting | What you'll see | Turn it up | Turn it down |
|---|---|---|---|
| Dead Ends | Number of side branches that lead nowhere. | More side paths to explore (and to hide loot in). | Cleaner layout with fewer branches. |
| Dead End Min Len / Max Len | How long each dead end is. | Longer side branches. | Short stubs. |
| Dead End Turn Chance | How often a dead end bends. | Twisty side branches. | Straight side branches. |
| Dead End Treasure Chance | How many dead ends are marked as treasure spots. | More rewards at the end of side paths. | Fewer treasure spots. |
| Setting | What you'll see | Turn it up | Turn it down |
|---|---|---|---|
| Special Chance | How many corridors become special rooms (yellow in the demo). | More special rooms. | Mostly plain corridors. |
| Trap Chance | How many corridor cells get a trap. | More traps. | Fewer traps. |
| Min Traps Per Route | The fewest traps on each route, whatever Trap Chance rolls. | Every route is guaranteed to be dangerous. | Some routes can be quiet. |
| No Adjacent Traps | Stops traps sitting next to each other. | (On) Traps are spaced out. | (Off) Traps can cluster. |
| Safe Radius | Cells around the Start hub with no traps. | Players get a longer safe start. | Traps can appear close to the start. |
| Setting | What you'll see | Turn it up | Turn it down |
|---|---|---|---|
| Start Tries | Attempts to find a valid start position. | Fewer failed plans on crowded settings. | Faster, but more plans may fail. |
| Max Plan Attempts | Retries of a whole layout before On Plan Failed fires. | Fewer failures with extreme settings. | Gives up sooner. |
| Build Rooms | Whether pieces are spawned. | (On) Builds the dungeon. | (Off) Plans only; use with Show Debug Plan to test seeds quickly. |
| Auto Generate On Begin Play | Whether the dungeon builds when the level starts. | (On) Builds straight away. | (Off) Call Generate yourself, for example after a lobby. |
If plans start failing (On Plan Failed fires, or the red message appears), the settings are asking for more than the grid can hold. Raise Grid Size, or lower Boss Doors, Route Gap, Dead Ends or Connectors.
Small seeds that are close together, such as 1, 2 and 3, can give layouts that look alike. For dungeons that are drastically different from each other, use big seed numbers (six digits or more) and make big jumps between them, for example 104729, then 583127, then 921053. Leaving Seed at -1 already does this: it picks a large random seed each time, and the demo HUD shows which one so you can note down layouts you like.
Call these on the planner from any Blueprint. Get the planner with Get Actor Of Class (BP_DRP_Planner) or a reference placed in the level.
| Function | Inputs | What it does |
|---|---|---|
| Generate | New Seed (Integer), New Danger (Float) | Clears any current dungeon, then plans and builds a new one. -1 for a random seed. Danger is clamped to 0–1. Server only. |
| Clear Dungeon | none | Destroys every piece, door plug and trap the planner spawned. Server only. |
| Get All Spawn Points | none | Returns an array of Transforms, one for every spawn-point arrow in every built piece. |
Bind to these with Bind Event to … on the planner. They fire on the server.
| Event | Gives you | Fires when |
|---|---|---|
| On Plan Complete | Seed | A valid plan is found, before anything is spawned. |
| On Piece Spawned | Piece, Cell, Cell Type | Each piece is spawned. Good for per-room setup. |
| On Dungeon Built | Start Piece, Boss Piece, Seed | Everything is spawned. This is the main hook for placing players, enemies and loot. |
| On Plan Failed | Seed | No valid layout was found within Max Plan Attempts. Call Generate again with another seed. |
A player or actor that starts after the dungeon is built will miss On Dungeon Built. Check Is Built right after binding, as the demo character does.
Every piece implements this through BP_DRP_PieceBase.
| Interface function | What it's for |
|---|---|
| Get Spawn Points | Returns the world transforms of the Arrow components under the piece's SpawnPoints component. |
| On Piece Built (Cell Type, Danger) | Called on each piece after it spawns. Override it in your pieces to add props, lights or variation based on room type and Danger. |
The grey-box pieces are placeholders. Each one is a child of BP_DRP_PieceBase, so you replace the art and keep the logic.
| Folder | Pieces |
|---|---|
| Pieces/Corridor | Corner, Cross, DeadEnd, Straight, TJunction |
| Pieces/Hubs | Hub_Start, Hub_Boss |
| Pieces/Special | Special_DeadEnd_01, Special_Straight_01 |
| Pieces | DoorPlug (seals openings that lead nowhere), PieceBase (parent of all of them) |
One cell is 1000 × 1000 units at the default Cell Size (the example floor is the engine Cube scaled 10 × 10 × 1). Build each piece in the Blueprint editor at rotation 0, with its openings facing as below. +X is the red arrow (north) and +Y is the green arrow (east). The planner turns pieces in 90° steps to fit each cell.
| Shape | Open sides at rotation 0 |
|---|---|
| DeadEnd | +X (north) |
| Straight | +X and −X (north and south) |
| Corner | +X and +Y (north and east) |
| TJunction | +X, +Y and −X (north, east and south); closed on −Y (west) |
| Cross | All four sides |
Replace BP_DRP_DoorPlug's mesh with your own wall or closed door.
The colours come from M_DRP_Grid and its instances (MI_DRP_Grid_Start, _Boss, _Corridor, _Special, _Trap, _DoorPlug). They're there to make room types easy to tell apart while you build.
BP_DRP_DemoSpawner (in Demo/Blueprints ) is a complete, commented example. It places a marker on every spawn point; replace the marker class with your own enemies or pickups.
The pattern, all on the server:
The pack includes one example trap, BP_DRP_Trap_Box: a box that damages whatever touches it. Higher Danger places more traps.
BP_DRP_TrapBase has a DamageBox collision component set to overlap. When something overlaps it, the trap checks it's on the server and calls Apply Damage with its Trap Damage value. Damage happens once each time something starts touching it.
The trap uses Unreal's standard damage system, so anything with an Event AnyDamage receives it. BP_DRP_DemoCharacter shows a simple health setup. The actor being hit needs a collision component that generates overlap events; a Character's capsule does by default.
The server plans and builds the dungeon, and clients receive the result. Clients never generate anything themselves.
The demo character shows one way to do it. On the server, each character binds to On Dungeon Built and moves itself to the Start hub's EntryPoint arrow, with a small random offset so players don't overlap. It also checks Is Built when it spawns, which covers late joiners. Look at Go To Start in BP_DRP_DemoCharacter.
The pack was tested with a listen server and two players in Play In Editor.
Always Relevant keeps every piece updated on every client. That's simplest and is fine for most dungeon sizes. For very large dungeons, you can untick it on your pieces and let Unreal's normal distance-based relevancy decide what each client receives.
Version 1.0 is deliberately focused. Knowing the limits up front saves time.
This is an advanced change to BP_DRP_Planner. The Boss hub already does everything a large room needs (reserving cells, exposing doors, being reached by routes, spawning once), so the method is to copy how the planner handles the Boss hub. Make a backup or commit before you start.
| Problem | Likely cause and fix |
|---|---|
| Nothing builds | The planner isn't in the level, Auto Generate On Begin Play is unticked, or Generate is being called on a client. |
| The dungeon appears off to one side | Expected: the planner is the grid's corner, and the dungeon grows in +X and +Y. Move the planner. |
| Red "plan failed" message | No valid layout within Max Plan Attempts. Try another seed or raise Max Plan Attempts, and check every piece slot in Pieces is filled. |
| Pieces overlap or leave gaps | A custom piece isn't centred on 0, 0, 0, or its footprint differs from the example piece. |
| Openings don't line up | A custom piece's openings aren't in the same place as the example piece of that shape. |
| Clients can't see the dungeon | Replicates was unticked on a custom piece. |
| Get All Spawn Points returns nothing | Your pieces have no Arrow components under SpawnPoints, or it was called before On Dungeon Built. |
| Enemies pile up after regenerating | Your spawner isn't destroying what it spawned last time. Clear Dungeon only removes the planner's own actors. |
| Traps don't hurt | The hit actor has no Event AnyDamage, its collision doesn't generate overlap events, or Trap Damage is 0. |
| F9 does nothing | You pressed it in a client window, or Enable Regenerate Key is unticked. |
| Version | 1.0 |
| Engine | Unreal Engine 5.7 and later |
| Type | Blueprint only, no C++, no plugins |
| Networking | Server-authoritative, replicated; tested with a listen server |
| Platform tested | Windows |
| Support | allen@follysedge.co.uk |
Blueprints/
Core/ BP_DRP_Planner
Interfaces/ BPI_DRP_Piece
Pieces/ BP_DRP_PieceBase, BP_DRP_DoorPlug
Corridor/ Corner, Cross, DeadEnd, Straight, TJunction
Hubs/ Hub_Start, Hub_Boss
Special/ Special_DeadEnd_01, Special_Straight_01
Traps/ BP_DRP_TrapBase, BP_DRP_Trap_Box
Data/
Enums/ E_DRP_CellType, E_DRP_Direction, E_DRP_PieceShape
Structs/ S_DRP_Cell, S_DRP_PieceChoice, S_DRP_PieceSet
Materials/ M_DRP_Grid and six room-colour instances
Demo/ Character, game mode, controller, spawner, marker, input, HUD
Maps/ L_DRP_Demo| Version | Changes |
|---|---|
| 1.0 | First release |