If you checked my Unreal Engine Free Stuff article earlier this month, then you must have seen the Procedural Level Generator. This time I am taking a quick look at the generator and how it works. To use the level generator, you must create a new project and import the system to your project (there are instructions to put your level generator system inside an existing project).
When you open the project, the default level is your level generator sample, and it looks like this.
However, if you press play, a progress bar appears and then the level loads. While this sample level only includes a progress bar layered on top of your view (meaning you actually see the robot in the box room below the progress bar), you can replace that with a nicer-looking UI that fits your game. The image below shows the first room in the generated level (each time you play, the room will be different).
One thing I noticed is that rooms are not generated from the start. They are added on the fly as you go through doors. However, by default they don’t disappear after you’ve left the rooms. You can change this behavior in the world generator object and make rooms visible by default all the time, only when loaded but remain active, or only show active rooms (doors always remain active, though).
The default scene shows the system is not 100% perfect. For example, there is this specific part where a door was created right under the stairs.
Or this door that is not accessible because there’s no floor in front of it.
The entire level is created using an object WorldGenerator. The object has a lot of different parameters that are used to create those levels. For example, you can set the number of rooms (rooms are created in a grid, so you actually set the number of rooms per side), number of floors, seed, and also you can link data tables that include room styles.
These room styles are actually available in a library. However, when I was checking them, they are empty rooms (except for the boss room), so I assume those are also created on runtime based on door positions.
Overall, this is a pretty good system, although it has some issues here and there. One of the projects we have in line, a top-down dungeon crawler, needs procedural level generation and I was planning we could use this system. It should fit our needs just fine.
Remember you can get this, and other assets for free in the Unreal Engine Marketplace right now.