Overlaps¶
Overlap occurs when the area intended for a new room's entrance overlaps with an existing entity, such as another room, a corridor, or a manually placed BlockRoom used for overlap testing.
Testing Overlaps¶
To test for overlaps, follow these steps:
- In the ProGen actor's debugging section, specify two room actors in
Debug Room Sequence. For this walkthrough, useRoom23andRoom22in that order.- The second room must be in the opposite direction of the first room's exit socket direction. For example, if
Room23's exit direction isVertical Down, the entrance direction of the second room must beVertical Up.
- The second room must be in the opposite direction of the first room's exit socket direction. For example, if
- Set the
Number of Roomsto2to limit the spawn to only these two rooms. - Specify classes for
Straight Corr Class,Turn Corridor Class, andBlockCube. - For manual blocking, place a
Block Roomin the overlap area. Use runtime observations to identify potential overlap locations. - In runtime observe the location of the Second Spawned room. Copy it's location and place the location at
Block Room Locations.
For the given configurations for the ProGen actor, the following results will be given
Handling Overlaps¶
When an overlap is detected:
- The room identifies the tiles it will occupy.
- If any tile is already marked as blocked, the algorithm triggers an overlap resolution process.
- The algorithm searches outward in a rectangular pattern to find a suitable spawning tile, subject to several conditions:
- The intended tiles for room occupation must not be previously occupied.
- The room's
End Socketsmust not overlap with any entity. For details, see End Sockets for Overlap.
If these conditions are not met, the algorithm triggers an overlap, relocating the room to the nearest available location.
For successful relocation, the following must hold:
- The intended occupancy tiles must be unoccupied. (There's no object or room in the intended location)
- The
End Socketsmust not trigger overlaps. Refer to End Sockets for Overlap for more information. - The Buffer size must not collide with existing rooms or corridors.
- There must be sufficient space for corridor path construction, as shown below:
In this example, even though the room appears to be successfully spawned without any overlap, the lack of space for a corridor path prevents final confirmation of the spawn.
End Socket Overlap¶
A room may spawn without overlaps, but if it's too close to a blocking object, making corridor path construction impossible, this is considered an end socket overlap. See the example below:
In this scenario, the first room spawns correctly, but when the second room attempts to spawn at its end socket, it overlaps with a blocking cube. This prevents corridor path construction, as there's insufficient space for the path.
Further examples demonstrate the issue:
To mitigate this, refer to the exit socket check in the Room Actor's details panel and use Command Prompts to assign appropriate exit sockets. (An editor tool for this operation is currently under development.)




