# Rogue-Lite-Style Procedural Map Loading & Unloading

**URL:** <https://forums.unrealengine.com/t/rogue-lite-style-procedural-map-loading-unloading/788351>\
**Category:** Programming & Scripting\
**Tags:** Level-Streaming, unreal-engine, Blueprint\
**Created:** [March 11, 2023, 5:50am UTC](https://forums.unrealengine.com/t/rogue-lite-style-procedural-map-loading-unloading/788351 "2023-03-11T05:50:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TwoMenArmyGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TwoMenArmyGames](https://forums.unrealengine.com/u/TwoMenArmyGames)\
**Post date:** [March 11, 2023, 5:50am UTC](https://forums.unrealengine.com/t/rogue-lite-style-procedural-map-loading-unloading/788351/1 "2023-03-11T05:50:22Z")

</div>

Hello,  
I’m trying to build a procedural map generation tool like from a rogue-lite game and am unsure how to realize this.  
The Idea is that the player progresses through different rooms, every room has some exit doors and when the user opens an exit door, a transition level (a hallway) is spawned and at the end of the hallway is another door behind which a new room is.

Now I was thinking the best way to develop the different rooms is that each room should be its own map. And which room gets spawned behind which door upon opening should be random (in classic rogue-lite fashion).

The problem I’m facing is how to load in a random room when the player walks through a door and unload the previous room. As far as I can tell, I can’t use the normal level streaming system with sublevels, because I don’t know in advance where the different rooms need to be placed since they have a random - not a static - order and a room might have different exit doors between which the player can choose.

Do you know how one could tackle this problem using unreal engine?

---

<div class="post-metadata">

**Author:** ![aVisDidenko](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/avisdidenko/32/1194516_2.png) [@aVisDidenko](https://forums.unrealengine.com/u/aVisDidenko)\
**Post date:** [March 11, 2023, 12:57pm UTC](https://forums.unrealengine.com/t/rogue-lite-style-procedural-map-loading-unloading/788351/2 "2023-03-11T12:57:23Z")

</div>

I think you first need to just read articles on the Internet about how game companies build level generation. What principles and laws do they use. There are many such articles. I am sure you will find many useful solutions and get new ideas.

> [@Procedurally Generated Corridors](https://forums.unrealengine.com/t/procedurally-generated-corridors/649714/2):
>
> There are several articles about procedural level generation by indie developer Pierre Viguiere. In February 2020, Ilio-Cosmin Oniscu, Senior Level Designer at MachineGames, published a text on his blog on the Medium platform about the criteria to consider when determining the degree of freedom in a level. Developer Billy Brandstetter in his blog described the process of creating a level generator for his own game: the algorithm sequentially generates new rooms and connects them to the rest. …

If you have been registered in the Epic family for a long time and keep track of the set of assets that they give away every month, then look at your library, maybe you have a “ **Procedural Level Generator** ”.

> **[Procedural Level Generator](https://www.fab.com/listings/adc749f7-be93-4eea-bcbc-a05b5c207105)**
>
> TrailerDocumentation (Please read before purchase. Do you understand everything? Some things in the asset are not intuitive.)1. Save/Load system. You can save generated world, player position, teleports.2. Teleportation system. Teleporters allow you...

\*it was given away for free a year ago. You can also write to the seller and ask how he implemented and came up with it. Here is his mail [zegi.diablo@gmail.com](mailto:zegi.diablo@gmail.com)

---

<div class="post-metadata">

**Author:** ![TwoMenArmyGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TwoMenArmyGames](https://forums.unrealengine.com/u/TwoMenArmyGames)\
**Post date:** [March 11, 2023, 3:39pm UTC](https://forums.unrealengine.com/t/rogue-lite-style-procedural-map-loading-unloading/788351/3 "2023-03-11T15:39:00Z")

</div>

Thanks for the recommendations, I’ve already read quite a lot and looked at tutorials. But I haven’t found something that really matches what I’m trying to do:

Some use completely procedurally generated rooms, where I only want prebuilt rooms to be arranged in a random order. Others work with blueprints in the sense that each prebuilt room is its own blueprint actor.

I’ve already built a prototoype using the latter approach but the problem here is that building a level-part in a single blueprint is suboptimal because, for example, you can’t use brushes inside a blueprint. Working around such limitations is possible but introduces more complexity into the development workflow.

This is why I’m currently looking into using level streaming so each prebuilt room can be its own map file.

I sadly don’t have that generator asset but I’ll try to get in touch with the creator like you suggested and see if he has some advice for me. Thanks for your help!
