design-procedural-generation
Installation
SKILL.md
Design Procedural Generation
Architect deterministic, replayable procedural generation pipelines that combine isolated PRNG seed streams, coherent noise fields, cellular automata smoothing, and validated dungeon graph topologies.
Core Rules
- Strict Seed & Stream Isolation: Never call global unseeded random functions (
Math.random(), globalrand()). Instantiate isolated deterministic PRNG streams (PCG32,SplitMix64,Xoshiro256**) per subsystem (e.g.terrain_rng,dungeon_rng,loot_rng) derived from a master seed so cosmetic particle rolls never alter level layout. - Playability & Connectivity Guarantees: Every generated map or dungeon must pass an automated flood-fill or
A*reachability check verifying that entrances, key objectives, and exits form a fully connected, traversable graph. - Zero Main-Thread Stalls: Execute heavy procedural generation, mesh synthesis, and tilemap baking on background worker threads or across time-sliced coroutines during loading transitions.
- Contract Adherence: Emit
contracts/schemas/implementation-result.jsonupon completing procedural generation implementations.
Suggested Process
1. Hierarchical Seed Derivation
Hash the user-facing master seed string into subsystem sub-seeds (seed_layout, seed_biomes, seed_encounters, seed_loot). Record the master seed and generator version in save files and replay logs for instant reproduction of edge-case layouts.