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.

Spatial overview of rooms within clusters within rootCluster Spatial overview of rooms within clusters within rootCluster

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.

Generation pipeline from ACRoomSpawner init through async room creation to game-thread finalization Generation pipeline from ACRoomSpawner init through async room creation to game-thread finalization

Data Configuration Hierarchy

How room configuration is organized across nested DataTable structs, from the top-level cluster definition down to individual room content probabilities.

Data configuration hierarchy from FCRoomClusterStruct to FCRoomContentProbaStruct Data configuration hierarchy from FCRoomClusterStruct to FCRoomContentProbaStruct

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.

Runtime data hierarchy from UCRoommaker through FCClusterDetailData to metadata objects Runtime data hierarchy from UCRoommaker through FCClusterDetailData to metadata objects

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.

Geometry algorithm from room centers through Delaunay triangulation and MST to organic corridors Geometry algorithm from room centers through Delaunay triangulation and MST to organic corridors

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

Corridor mode selection: straightCorridor config determines STRAIGHT L-shape or FLEX diagonal before breakEdge Corridor mode selection: straightCorridor config determines STRAIGHT L-shape or FLEX diagonal before breakEdge

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.

breakEdge recursive midpoint displacement iterations breakEdge recursive midpoint displacement iterations

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.

Overlap sequence: actor enters room, collision cast checks, metadata retrieval, quest or skill interaction Overlap sequence: actor enters room, collision cast checks, metadata retrieval, quest or skill interaction