Is it possible to make a bunch of smaller chunks of a level then piece them together at run time?

So if you look at games like Diablo 3 or Warframe they are built in small sections as separate levels then later pieced together when loading a new level.

Is something like this possible in UE4 without having to do it in C++? What methods would you employ to do something like this?

Yes, I believe what you are looking for is Level Streaming. It’s supported using Blueprints.
You can check it out here:

or Procedural Level Generation.

Yes, many ways to do it. You can level stream, or you can make building block actors that your levelscript chooses from and assembles on level load.

The method that I would like to do most would be to have a bunch of basic rooms and hallways that have doors. I want it to pick one of the available doors, choose a correspond room or hallway, check if there is enough room, then place that room or hallway in that location.

I’ll then decide how many of each type of room or hall I want to appear ect.

And that’s really it. So all I do as a level designer is build interesting rooms and hallways with doors on them and have the game string them together in a logical way. With that said each of these areas need to have a lot of objects, static meshes spawn points ect. Its for a first person shooter template I am working on so the levels should expect to be pretty detailed with static light maps and everything.

So which method would be the most effective for this scenario? Will streaming allow me to grab maps and then place them where I want them to be ect?

Streaming Levels, or creating Blueprint Actors that are chunks will both work. You will need to try both and see which is best for your game. It is just opinion which method is best as there are tradeoffs in both. I use a system of having a level with no geometry in it, but it has environment light and navigation bounds. The level script then chooses Blueprint actors randomly and loads them in. On those Actors, they in turn have marker nodes that are selected from and more Actors spawned on them. It’s all chunked, it’s all setup by the designer by placing markers on the chunk blueprints that I made. It is appropriate for the type of game, but it’s more arcade like, not a FPS.

Hmm interesting thanks :slight_smile:

I have one question left, I cant seem to find a tutorial or example of someone streaming a level at a selected location in the world. Most examples seem to assume the level location never changes and the only reason to stream something is to toggle it on or off.

I don’t see anyone streaming 3 or 4 of the same hallway or room and connecting them for example.

I can’t help with that as I don’t stream them in, I spawn bp actors in and set their locations. My bp’s all extend the same base with same size square so I can load them in a grid pattern.

My only worry about doing it that way is a single tile may have hundreds possibly thousands of objects. The vast majority will likely be light mapped meshes I imagine. But spawn points and loot locations will likely add up too.

Oh another thing as I am reading, this is meant to be multiplayer compatible. Reading over some of the streaming features indicates that can be a problem.

I really like the idea of making the level fit on a grid though. hmm

There was a tutorial series on 3DBuzz a few years ago about making an MMO in Unity. They made a level tool that packaged up the terrain into grids. You could make a separate UE4 project to make the level in, sculpt out the landscape etc. but then cut it into a grid and save it into a folder structure of tiles, with markers etc. for all the objects. Your game could then have a loader that grabbed out the tiles from their folders. Just an idea.

Just make a stepwise spawn function for your room loader. Stagger object loads by frame to make generating the room from a blueprint class smoother and with less frame stuttering. Like load the structures in one (or over a few) frame(s), then furniture, then clutter. This would make even large rooms load much more smoothly.

You can even “faux bake” rooms/meshes you know youll be using repeatedly by having an instanced mesh converter funtion which swaps your dynamic actors into static instanced meshes for max performance.

I am looking for the most dirt simple variation of this. Literally just builds the entire thing when the level loads and lets the clients sort it out at their own discretion. I want to hand build a bunch of neat areas and just have them connect to each other but not be limited because some of the areas end up being fairly detailed.

Hey, youre the one that said you were worried about performance issues if you were to spawn them the quick and easy way. I merely offered a suggestion on how to circumvent that.

Dirt simple, quick and easy.

  1. Hand make your rooms/halls/level segments. Store each segment inside its own blueprint class. (Obviously each segment has normalized sizes. Quick and easy right?)
  2. Make your level spawn algorithm. (Simplest iteration: spawn a random hall with a random number of “room spawn slots” and at least one hall slot. Loop this as many times as you want/need).
  3. ???
  4. Profit.

ill have to do some testing but I really wonder if placing a couple thousand objects in a blueprint class is even remotely feasible.

edit: I think that the only 2 things I need to know how to do is, stream a level in any location I want to stream it. So rather than stream the level where I built it I can sort of spawn it in wherever I want.

Then figure out a way to do a test to see if spawning the level in that location would collide with another part of the level.

I think once I figure these two things out I will have all I really need.