A random room selector in unreal engine 4.20.1
This map has a trigger box that will pull one of 5 random maps into the doorway, resulting in a near infinite map of random rooms. This is an map generater example, and will not include an actual game, or art, or anything except for the code to generate the rooms.
Bugs:
- After a certain distance from the center of the map, the navmesh will stop working. It has a limited range.
- Rooms may spawn over each other resulting in a blocked passageway.
- The RecastNavMesh-Default, may need to be deleted and new navigation data will need to be generated. After doing so, change the new RecastNavMesh-Default 'Settings -> Runtime -> Runtime Generation' to 'Dynamic'
TODO:
- Make more rooms. (Done)
- Spawn further ahead. Currently only spawns the next room.
- Build a list / table of rooms with other details that can control what will spawn.
- Store a room tree, and release older rooms? (Only keep loaded the nearest rooms to the player)
- Check area for space to place room before placing a room, and change room or make a dead end room to keep overlap from happening.
- Redirect or stop rooms that get too close to the navmesh boundry.