This Unreal Engine plugin allows you to create rich, diverse dungeon experiences that combine the best of both worlds: the creativity and precision of handmade room designs, paired with the unpredictability and excitement of procedural generation.
Rooms are handmade Unreal levels instanced in the world. You define their size and their doors as well as several other parameters. You code your own rules in blueprints or C++, with great flexibility and customization, to generate the dungeons you want.
If you have any bug or crash, please open an issue in the Github repo.
If you have suggestions, questions or need help to use the plugin you can join the Discord server dedicated to this plugin.
If you want to contribute, feel free to create a pull request (contributions to the wiki are also welcomed!).
Some hand-made rooms defined with bounds and doors:
Some extremely simple generation rules:
Possible results:
You can find an example project here too.
Follow the Getting Started guide on the wiki to start working with the plugin.
If you want more details about how it works internally, you can read the wiki.
You have also access in the wiki to all the exposed classes and nodes in Blueprint.
You can also join the Discord server dedicated to this plugin if you want to ask question or get help from the community.
Install it like any other Unreal Engine plugin.
If you have any trouble with installation, read the Installation page of the wiki.
Yes, you can generate during runtime.
If you call theGenerate
function, then the previous rooms unload, and a new dungeon generate and load new rooms.
There is no map travel during the process, the player remains in the master map, only the dungeon's rooms are loaded/unloaded.
You are only limited by the performance of the machine your game runs on.
Mostly, the performance of the dungeon depends on the complexity of your rooms/meshes, and the hardware of your computer. The more details and diversity of actors there are, the more resources will be consumed on the computer.
To be able to generate a very large map, you will need to optimize the meshes/textures for the RAM and GPU, the collisions and number of dynamic actors (enemies, etc.) for CPU, etc.
The simple occlusion culling system I provide in the plugin is one (rudimentary) way to optimize the GPU side (less drawing). It is far from perfect but a good start.
You will need to do the other optimizations yourself.
Since version 3.5 of the plugin, There are some nodes to help you easily setup a save/load of the dungeon. It'll need some works on your side but it is definitely possible to do it.
The dungeon save should be compatible with any save system you are using. In C++ you can also use some functions for archive-based save systems (StructuredArchive
compatible too).
You can have the number of room you want, there is not really a limit in the plugin.
Yes, you can design everything you want in the room. It is the purpose of the plugin: providing a generic way to generate a dungeon, without any compromise on the DA nor the game design.
If you don't want to create the rooms manually, you may use other procedural plugins (like PCG) to create the content of the rooms (I've never tested that myself though).
The room culling system built in the plugin is client side. It will show only the room where the local player is and any adjacent rooms.
You can read further details about the room culling system of this plugin from the wiki page.
You can also disable the room culling system from the plugin's settings and do it yourself in another way.
Yes, there is a seed for the dungeon generation.
I made a parameter in theDungeonGenerator
actor to have different types of seed:
- You can have a fixed seed you can set in the actor which will be always used (useful for testing and debugging purpose, or to set manually the seed in Blueprint or C++).
- You can have an incrementing seed, using the fixed seed for the first generation, then adding a value to it at each generation (useful for demonstration purpose).
- You can have a random seed generated for each generation (for released game mostly, or to test quickly a lot of dungeon generations).
Yes, you can define the flow you want for your dungeon. It is the purpose of the plugin.
There is the functionChooseNextRoomData
where you define what I call your "rules" of the dungeon.
You can, for example, check a minimum number of room before spawning a secret room, and then don't spawn it if you already have one in the dungeon.
If you need help on how to define your dungeon rules, you can check this example and get help on the Discord server dedicated to this plugin.
Of course, you can do that sort of thing! For this difficulty example, you should create a child blueprint of
RoomData
class to add new parameters like aDifficultyLevel
, which you can set a different value for each room in yourRoomData
assets.
Then for example, in yourChooseNextRoomData
function you can choose a room depending on its difficulty level compared to the difficulty level of the previous room.
This plugin is under MIT license.
This means you are free to use this plugin for personal/free/commercial projects, you are also allowed to modify the source code and/or redistribute it.
The only condition is to add the copyright notice and a copy of the license with your project and/or any redistribution of the source code, modified or not.
If you like my plugin, please consider leaving a tip, it would mean so much to me! 😊
🚧 : Experimental features ↩