Table of Contents

Namespace GrindFest.Dungeons.Procedural

Classes

Corridor

A corridor is a list of grid cells forming a path between two rooms. Width is always 1 cell in v1. Cells are listed start-to-end.

Direction4Ext
Door

A door cuts through one wall segment of a room. The door cell is the room's interior cell adjacent to the wall; Facing points outward from the room toward the neighbouring space.

DungeonLayout

Pure data result of a layout algorithm. No Unity objects, no geometry. Subsequent passes (geometry, dressing) consume this.

Coordinate system: XZ grid cells. CellSize meters per cell. Cell (0,0) covers world XZ in [0, CellSize) x [0, CellSize).

Room

Axis-aligned rectangular room expressed in grid cells (XZ plane, Y is level index).

Bounds.min is inclusive, Bounds.max is exclusive (standard Unity RectInt convention). A 3x2 room at origin has Bounds = (0,0,3,2) and contains cells (0,0)..(2,1).

Walls live on the OUTER edges between cells. Corners live at the four outer vertices.

Interfaces

IDungeonLayoutAlgorithm

Pluggable layout algorithm. Produces a DungeonLayout from a seed. Implementations are typically ScriptableObjects so they can be configured in inspector.

Enums

Direction4

Cardinal direction on the XZ plane. North = +Z, East = +X, South = -Z, West = -X. Used for wall edges, door facings, corridor headings.