system

Use when

A design needs replayable, generated content (levels, dungeons, decks) instead of hand-authored maps.

Procedural Generation Design

What it is. Generating content from a seed instead of authoring it by hand — so a run is a fresh, reproducible configuration of known parts. Procgen turns “an agent hand-authors forty balanced rooms” (unreliable) into “an agent calls a generator and gets forty proven rooms” (reliable). The design work is choosing the parts, the constraints, and the acceptance test — not rolling dice and hoping.

Player fantasy / why it’s fun. This run is mine. Variance means the next run surprises you; a seed means it’s fair, not arbitrary. The pull is discovery under fairness — every layout is new, but every layout is winnable (FUN.md §10).

When to use / when NOT

Use it whenAuthor by hand when
Replayability is the point (roguelike, survivors)A crafted narrative sequence — procgen dilutes intent
Content volume exceeds what you can hand-buildA handful of set-piece bosses (system-boss-design)
You want a difficulty band, not fixed levelsTutorial rooms — those teach a specific verb (system-onboarding)

Connectivity first, numbers later. The single most common procgen failure is an unreachable stair, item, or exit. Prove reachability across ~50 seeds before you tune a single difficulty value (FUN.md §10). A generator that can produce an unwinnable layout is a generator that will.

Variants

VariantGeneratesGrounded in Hayao
Cellular caveorganic open spacesgenerateCave(rng, opts) (grep docs/API.md)
Room-and-corridor dungeonconnected roomsgenerateDungeon(rng, opts)
Solver-verified puzzle setin-band winnable levelsgenerateLevels(factory, opts)
Grammar / template assemblyrooms from hand-made chunksyour factory over world.rng
Deck / drop draftreward poolspickEntry / weightedPick(rng, …)
Noise / distributionterrain, placement fieldsvalueNoise / hashNoise (stateless)

Tuning levers

LeverTurns up…Watch for
Fill % / smoothing (caves)openness vs. maze-nessover-smoothing erases variety (sandboxes/procgen-lab)
Difficulty bandwhich candidates are kepta band too narrow starves the generator (accept-rate)
Variance budgethow different runs aretoo much = incoherent; too little = same run twice
Reject hookgenre rules a candidate must passthe place to enforce “no start-adjacent goal”
Dedupe keyhow near-identical layouts collapsewithout it, two seeds ship the same map

How it wires to Hayao

Fails when…

Verify

Composes with

See also

This module rendersthe repo's markdowndirectly — edit it there, it changes here.