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!).
- Handcrafted rooms, giving full control of their design by the level designers.
- Generation rules defined in blueprint or C++, allowing flexible and powerful procedural generation.
- A new editor mode to ease the creation and edition of the rooms.
- Several interfaces and components for your actors (RoomVisitor, RoomObserver, DeterministicRandom, etc.)
- Different door types, allowing more complex dungeons.
- Optional room culling system, allowing to render only the relevant rooms to the player.
- Ready for multiplayer games (push model and subobject lists are implemented).
- π§1 Save/Load nodes for the dungeon, easy to use with any game save system (blueprint or C++)
Some hand-made rooms defined with bounds and doors:
Some extremely 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.
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.
Can I generate levels during runtime? What I mean is if I can generate a new dungeon while the player is in it.
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.
How large can I make the map?
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.
Can I save and load dungeons?
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).
How many different rooms can I have?
You can have the number of room you want, there is not really a limit in the plugin.
It is pretty much up to my creativity to design whatever I want, right? If I want rooms to have enemies or anything like that, I can just create it in the level, right?
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).
How does the room culling work for multiplayer?
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.
Is there a seed?
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).
Can I have some sort of flow to the dungeon? Like have a secret room spawn only once and have boss rooms only spawn 4 rooms?
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.
Can I increase the difficulty of the dungeon? Lets say room level 1 is easy and room level 5 is hard, can I tell the dungeon to not go from level 1 to level 5?
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! π
Footnotes
-
π§ : Experimental features β©