I’m deciding the best way to go about building a procedural level generator which connects premade rooms together. I can think of two solutions, though one is not ideal for content creation and the other I’m just not sure how to do.
The first idea is the simplest on the programming side. Simply have each room be a blueprint which contains the room geometry, with components for things such as item spawns. I’m well aware of how to do this, but there are a few issues I see with this:
- Laying out a room in blueprint isn’t nearly as nice as doing it in the map editor
- Is it even possible to add other actors inside of a blueprint without manually spawning them in? Doing this isn’t really required, but with what I’m working on there may be a need to add things such as kill volumes or nav mesh bounds volumes.
My other idea is a bit more ideal, but might not be possible at the moment. Is it possible to load multiple maps (with each map containing a single room) into positions governed by the level generator at runtime (possibly via level streaming)? Issues I can think of with this method are:
- Moving level geometry into the correct position
- Is it even possible to stream a single map multiple times into the same world?
I have no qualms about using either blueprints or C++ (the project is about half and half). Any help would be much appreciated. Thanks!
EDIT:
To clarify, I’m not asking how to go about the generation itself. I can come up with algorithms to generate level layouts on my own. I’m asking that, given a set of premade rooms, what is the best way to represent them to the engine (separate maps, blueprints, or other) and how to spawn those in when the level loads.