Skip to content

t1k:designer:systems:procedural-generation

FieldValue
Modulesystems
Version1.7.2
Effortmedium
Tools

Keywords: generation, PCG, procedural generation, random

/t1k:designer:systems:procedural-generation

  • Generating maps, dungeons, or level layouts procedurally
  • Rolling procedural item stats, affixes, or loot
  • Implementing wave function collapse (WFC) or tile-based generation
  • Designing roguelike run structure (floors, rooms, shops)
  • Creating seed-based reproducible content
  • Validating procedurally-generated content for playability
  • BSP (Binary Space Partitioning): split rect recursively → rooms at leaves → corridors between
  • Drunkard’s Walk: random walk carves passages → organic cave-like layouts
  • Room-and-corridor: place N rooms (no overlap) → connect with L-shaped corridors
  • Cellular automata: random fill → smooth passes (alive if 5+ neighbors) → natural caves
  • WFC (Wave Function Collapse): tiles with adjacency rules → guaranteed valid layouts
  • Prefab stitching: pre-designed rooms + procedural connections (Dead Cells approach)
  • Validation: A* from start→exit, all rooms reachable, key items on longest path

→ See references/dungeon-generation.md for algorithm decision tree, BSP implementation, validation

  • Affix system: prefix + base + suffix (e.g. “Cruel Longsword of Fire”)
  • Pool weighting: Common 60% / Rare 25% / Epic 10% / Legendary 5%
  • Stat rolling: base_value × (1 + random(0, tier_bonus)) × rarity_multiplier
  • Smart loot: 30% bias toward player’s equipped slot type, 70% random
  • Seed formula: item_seed = hash(entity_id, encounter_index, world_seed) → reproducible

→ See references/item-generation.md for affix pools, stat ranges, anti-duplicate patterns

  • Floor template: 6-10 rooms → elite room → shop → 6-10 rooms → boss
  • Room type mix: combat 60% / treasure 15% / event/choice 15% / shop 10%
  • Difficulty scaling: enemy_hp × (1 + floor × 0.4), enemy_atk × (1 + floor × 0.25)
  • Item pacing: 1 item per 2-3 rooms, guaranteed rare per floor, shop every 8-12 rooms
  • Run length: 30-45 min (casual), 60-90 min (hardcore)
  • Meta-progression: permanent unlocks between runs (new items in pool, starting bonuses)

→ See references/roguelike-structure.md for floor templates, meta-progression, risk/reward rooms

Use CaseAlgorithm
Natural cavesCellular automata
Structured dungeonsBSP or room-and-corridor
Organic passagesDrunkard’s Walk
Tile-based valid layoutsWave Function Collapse
Handcrafted + proceduralPrefab stitching
Item statsWeighted affix pool + seed hash
#Anti-PatternProblemFix
1Pure random placementUnsolvable maps, isolated roomsValidate with A* after generation
2No seed systemNon-reproducible bugshash(entity_id, encounter, world_seed)
3Stat ranges too wideUseless low-roll itemsFloor = base_value × 0.8 minimum
4Monotonous outputFeels generated, not designedMix prefab rooms with procedural connections
5No pity in loot rollsLegendary drought → quitGuaranteed rare escalation per floor
  • rpg-game-design — Item rarity tiers, loot tables, power budgets
  • game-economy-design — Loot drop rates as economy faucets
  • engine inventory skills (auto-activated via registry) — procedural item integration
  • puzzle-game-design — Procedural puzzle generation patterns
  • engine scene skills (auto-activated via registry) — arena tile/geometry generation
FileCoverage
references/dungeon-generation.mdBSP, cellular automata, WFC, validation
references/item-generation.mdAffix pools, stat rolling, smart loot, seeds
references/roguelike-structure.mdFloor templates, room types, meta-progression
  • Seeded reproducibility is a contract — if any RNG call is unseeded, replays diverge silently.
  • Wave-function-collapse outputs need playability validators — beautiful unsolvable rooms are a worse failure than ugly playable ones.
  • Affix rolling distributions need explicit min-quality floors — without one, the bottom 10% of items are de facto trash and feel like bugs.