Diagrams
Spatial Layout
Rooms are nested inside clusters, which are nested inside the rootCluster bounding box. Each cluster has a margin zone and a fogOfWar rectangle. Rooms are connected by MST corridors with doors at intersection points. The longestOrderedPath algorithm assigns a progression order to rooms along the longest MST path.
Generation Pipeline
How ACRoomSpawner drives room generation from DataTable configuration through async computation to game-thread finalization, including room relaxation, Delaunay triangulation, MST corridor creation, and spatial cell assignment.
Data Configuration Hierarchy
How room configuration is organized across nested DataTable structs, from the top-level cluster definition down to individual room content probabilities.
Runtime Data Hierarchy
How runtime data objects are structured after room generation: the roommaker holds cluster detail data, which contains rectangulators, triangulators, MST data, and metadata objects for both clusters and rooms.
Geometry Algorithm
How room centers are connected into organic corridors: Delaunay triangulation produces all possible connections, MST selects the minimal spanning tree, and breakEdge() adds noise to create natural-looking paths.
Organic Corridor Algorithm
How MST corridor edges are transformed into organic, natural-looking paths. The corridor mode determines the initial edge shape (diagonal or L-shaped), then breakEdge() recursively applies midpoint displacement with perpendicular random offset to produce increasingly jagged polylines. The recursion depth is controlled by corridorNoiseIntensity. Algorithm inspired by Red Blob Games — Noisy Edges.
7a. Corridor Mode Selection
7b. breakEdge — Recursive Midpoint Displacement
Each iteration splits every segment at its midpoint, displacing it randomly along the perpendicular axis. After N iterations (corridorNoiseIntensity), the original straight edge becomes a jagged polyline with 2^N segments.
Overlap Sequence
How an actor entering a room triggers the overlap sequence: UCRoomBoxCollision notifies UCRoommaker, which retrieves room metadata, checks interaction eligibility, and either proceeds with quest actions or consumes a skill.