There’s Dungeon Architect on the asset store.
Also we’re about to put out another type of generator that works with Snaprooms which is the one thing Dungeon Architect doesn’t specialize in. It’s mostly done, and the remaining work is making it more user friendly.
This generator aims to build interesting levels using artist designed rooms so it’s like a hybrid of procedural generation and human made levels. This way the levels tend to feel less bland and more like something a human would actually build by hand. These aren’t the kinds of procedural levels where you walk into a rectangular room, the doors close, and you fight off waves of enemies, and then the doors open and you go to the next rectangular room. This is more for generating large seamless worlds.
It also keeps track of how the areas are connected and allows you to add extra logic to how levels are generated or run scripted events while the game is running. For example, make sure the room with the red key is far away from the room with the red door. Or find the shortest path between two rooms and place certain enemies along the path, and put interesting items in rooms that branch off from that path to make the player explore for extras. It basically allows you to build more interesting mission objectives.
I actually have some interesting images of the results.
Prototype for level 1 of our game. Cargo bays full of crates that lead into the power plant.
](filedata/fetch?id=1844736&d=1608350620)
How you can see a room in the editor. Place marker objects to tell the generator how areas interconnect and what objects can randomly spawn within. You can define “Prefabs” using either Blueprint Actors or Levels, which ever is easier for the situation. If your prefab is based on an actor, it’ll spawn that actor. If it’s based on a Level, it’ll stream in an instance of that level at the generated location, of which, you can have infinite instances. You may want to use the level editor to create some large complex room, or you may use the blueprint editor to create a simple scenery object. Or you can make a room using the blueprint editor or make a simple scenery object out of a level, it doesn’t matter.
](filedata/fetch?id=1844741&d=1608351248)
That same room decided to spawn a bunch of white columns, some of which are cracked and spawned with a random rotation. You can have heirarchies of spawnable object types so it can be as simple as you want or as complicated as you want. A spawnable object could be just a simple room, or a column, or an entire sub heirarchy of level generator objects. It makes it easier to get creative and come up with interesting ideas while being easy to understand and build. In this case, this room chose to spawn “White Columns”. White Column was then a sub list that had a 90% chance of choosing to spawn an unbroken column prefab, or a 10 % chance of spawning a broken column prefab.
](filedata/fetch?id=1844737&d=1608351031)
Testing the generator with a few basic programmer art rooms. The 2 main generators here are “Drunken Walk” which picks rooms to arrange from available connector locations, and “Multi Floor” which can generate an area that spans multiple floors. This example is very simple, but you can have wide varieties of rooms and areas of levels with different themes interconnected. Drunken walk can work in passes so you can have one type of area, like “Starting Area”, then another type like, “Mountains”, which may lead into, “Enemy Base Entrance”, which leads to, “Enemy Bunker.” Etc… There are various parameters that can tell “Drunken Walk” to be very linear or to be super random and full of branches. It can depend on the situation and be the difference between generating completely random noise, or something completely linear, or something in between. Different passes can behave differently, so you can have linear corridors connect to complex areas. You can also add constraints to prevent certain types of areas from generating too much, and control the probabilities that areas would generate with.
Areas can interconnect at arbitrary transforms, not just 90 degree angles. They also don’t have to be rooms at all. It can be any 3D objects, so you can make a level out of caves or buildings or floating asteroids in a space void, or a combination of all of those things, etc… Each area can specify collision bounds that wrap the area as precisely as you desire so other areas don’t overlap it as they spawn.
](filedata/fetch?id=1844738&d=1608351040)
A stress test of hundreds of rooms.
](filedata/fetch?id=1844739&d=1608351052)
A visual debugger mode that can show you the steps the generator so you can figure out what may have gone wrong in a level and make it generate the levels you want. If you reuse the same seed, you’ll get the same results, so you can debug the same level over and figure out what went wrong where to track down the right parameters to tweak.
](filedata/fetch?id=1844740&d=1608351083)