Adds optional branching paths to generated levels. Creates treasure rooms, challenge corridors, shortcuts, and secrets.
Usage:
const brancher = new PathBrancher({ branchChance: 0.3, maxBranches: 4 });const { modifiedGrid, newEntities } = brancher.addBranches(level); Copy
const brancher = new PathBrancher({ branchChance: 0.3, maxBranches: 4 });const { modifiedGrid, newEntities } = brancher.addBranches(level);
Optional
Find valid branch points and carve branches into the level. Returns new entity placements (rewards at branch ends).
Find tiles adjacent to corridors where branches could start
Adds optional branching paths to generated levels. Creates treasure rooms, challenge corridors, shortcuts, and secrets.
Usage: