Description
Generates a maze-like dungeon using one or more rooms. The only constraint is to give the room’s size to the algorithm and the rooms you want to spawn. It means that all rooms must have the same overall size. Objects inside the room can be spawned randomly. You can choose the amount of objects/enemies you want to spawn in a room and their type. It means that you can give your rooms different shapes by adding walls inside of each room.
For this build we use a medieval fantasy style with crates, barrels, and lanterns on the top of some of the crates. Rooms are currently separated from one another by grids that open when the player is near. Doors only spawn if 2 rooms are close from one another, otherwise a wall is created. Torches light up when the player enters a room. A “boss room” is generated to give the player a goal inside the dungeon.
You can easily customize the rooms you want to spawn, what’s inside of the rooms, and the size and shape of the dungeon. The tool can be used for 3D or 2D games, fantasy worlds, or futuristic space stations; whatever you imagine.
The specificity of the tool is the realistic maze-like look of the end result that you can find here :
https://www.youtube.com/watch?v=Oc5RYXKuAVQ
The character Countess from Paragon and the torches from Unreal Starter Content are only used for demo purposes and the project does not contain all animations and skins for the character.
Technical Details
Features:
Generation is inside BP_Procedural_Generation.
Each room needs its own Blueprint to function.
BP_My_Camera is used during generation.
Graph:
How to use it:
The tool generates a dungeon based on the rooms you are using. Rooms will then be filled with objects randomly.
You can set the size of the grid and the amount of rooms by changing the values “Size_Of_Grid” and “Number_Of_Lines” inside BP_Procedural_Generation. For a better looking dungeon those values must be close to one another. For values higher than 50 the engine may lag. We recommend that you keep those values under 30 each.
You must set the value “Size_Of_Room” inside BP_Procedural_Generation to the size of the room you want to spawn. It means that all different rooms you want to spawn must have the same size. Advice : You can change the inside of each room later to make it look like you spawned smaller rooms.
You can change the meshes inside the blueprint “BP_Room”. Automatic door creation works with colliders placed in each direction. In order to work your rooms must have colliders placed in those positions and must be named “Collider_North”, East, West and South.
You can select which objects or enemies can be spawned in each room inside the construction script of “BP_Room”.
Press N to start the procedural generation.
Supported Engine Versions
4.20 – 4.25