Table of Contents

Class BspLayoutAlgorithm

Namespace
GrindFest.Dungeons.Procedural.Algorithms
Assembly
GrindFest.dll

Binary-Space-Partition layout. Recursively splits a rectangular area until partitions are below maxPartitionSize, then carves a randomly-sized room inside each leaf. Rooms are connected by L-shaped corridors between siblings on the way back up the tree.

Produces predictable, rectangular rooms of varied sizes — classic Diablo crypt feel.

[CreateAssetMenu(menuName = "GrindFest/Dungeons/Layout/BSP", fileName = "BSP Layout")]
public class BspLayoutAlgorithm : ScriptableObject, IDungeonLayoutAlgorithm
Inheritance
object
BspLayoutAlgorithm
Implements

Fields

CellSize
MapSize
MaxPartitionSize
MinPartitionSize
MinRoomSize
RoomMargin
SplitRatioMax
SplitRatioMin

Methods

Generate(int, int)