Skip to main content
Version: 3.5

Procedural Dungeon Plugin

Overview

This is an Unreal Engine plugin that let you create dungeons procedurally like "The Binding of Isaac" or "Rogue Legacy" but in 3D.
With this plugin you create rooms by hand and you define your generation rules with blueprint.
The plugin then generate a dungeon that can be random or deterministic following what rules you've programmed.

Example

Some hand-made rooms defined with bounds and doors:

RoomSpawn RoomA RoomB RoomC RoomD RoomExit

Some very simple generation rules:

  • A special room (red) used to spawn the player.
  • Then 10 rooms chosen randomly in a list (blue, green, yellow, cyan).
  • Then a special room (purple) used as an end goal for the player.
  • Finally 10 other rooms chosen randomly.

Possible results:

Result1 Result2

What you need to do

First, install and configure the plugin.
Then, read and follow the instructions to create rooms and a setup a dungeon generator.
This will give you a minimal working dungeon.
You can then read the Advanced Features section to know what the plugin has to offer on top of the basics.

An example project is available if you want to try a minimal working project.

You can also join the Discord server dedicated to this plugin if you want to ask question or get help from the community.

Tips

The generation takes a certain duration to complete (the generation itself is done in one frame, but the loading of each room level takes some times proportional to their number and complexity).
So, if you have the player character spawned at start, it will fall into the void of the universe before the end of the dungeon generation.

To manage this situation, you have multiple solutions:

  • The easy and ugly way is to place a little plane somewhere with the player start on it, and disable the inputs from the player to prevent him to fall from this plane, then when the generation is complete you teleport the player into the first room and unlock the inputs;
  • The better and cleaner way is to spawn the player as spectator until the end of the generation, and then you spawn the player character at a player start. (I've added a Spectate blueprint node to ease this solution)

Both solutions are using the Post Generation Event to know when the generation is done. You will also want to show or keep a loading screen when you start your game map, and you hide it on this event too.