hayao 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/design/00-process/README.md +49 -0
  2. package/design/00-process/composition.md +148 -0
  3. package/design/00-process/core-loop.md +146 -0
  4. package/design/00-process/intent-to-brief.md +128 -0
  5. package/design/00-process/pillars.md +139 -0
  6. package/design/00-process/refine-and-handoff.md +156 -0
  7. package/design/00-process/the-twist.md +108 -0
  8. package/design/10-anchors/README.md +99 -0
  9. package/design/10-anchors/age-of-empires.md +103 -0
  10. package/design/10-anchors/baba-is-you.md +127 -0
  11. package/design/10-anchors/balatro.md +132 -0
  12. package/design/10-anchors/celeste.md +136 -0
  13. package/design/10-anchors/civilization.md +101 -0
  14. package/design/10-anchors/dead-cells.md +125 -0
  15. package/design/10-anchors/factorio.md +100 -0
  16. package/design/10-anchors/hades.md +127 -0
  17. package/design/10-anchors/into-the-breach.md +125 -0
  18. package/design/10-anchors/it-takes-two.md +104 -0
  19. package/design/10-anchors/loop-hero.md +131 -0
  20. package/design/10-anchors/nuclear-throne.md +130 -0
  21. package/design/10-anchors/outer-wilds.md +107 -0
  22. package/design/10-anchors/overcooked.md +102 -0
  23. package/design/10-anchors/peggle.md +133 -0
  24. package/design/10-anchors/reigns.md +99 -0
  25. package/design/10-anchors/return-of-the-obra-dinn.md +108 -0
  26. package/design/10-anchors/rimworld.md +101 -0
  27. package/design/10-anchors/shadow-of-mordor.md +106 -0
  28. package/design/10-anchors/slay-the-spire.md +127 -0
  29. package/design/10-anchors/starcraft.md +98 -0
  30. package/design/10-anchors/stardew-valley.md +103 -0
  31. package/design/10-anchors/tetris.md +122 -0
  32. package/design/10-anchors/vampire-survivors.md +122 -0
  33. package/design/20-genres/README.md +62 -0
  34. package/design/20-genres/action-adventure.md +126 -0
  35. package/design/20-genres/auto-battler.md +121 -0
  36. package/design/20-genres/bullet-hell.md +123 -0
  37. package/design/20-genres/city-builder.md +124 -0
  38. package/design/20-genres/coop-chaos.md +124 -0
  39. package/design/20-genres/deckbuilder.md +122 -0
  40. package/design/20-genres/exploration.md +131 -0
  41. package/design/20-genres/farming-sim.md +122 -0
  42. package/design/20-genres/grid-puzzle.md +126 -0
  43. package/design/20-genres/horde-survival.md +128 -0
  44. package/design/20-genres/incremental.md +120 -0
  45. package/design/20-genres/match3.md +120 -0
  46. package/design/20-genres/metroidvania.md +132 -0
  47. package/design/20-genres/narrative-decisions.md +122 -0
  48. package/design/20-genres/physics-arcade.md +124 -0
  49. package/design/20-genres/precision-platformer.md +127 -0
  50. package/design/20-genres/racing.md +126 -0
  51. package/design/20-genres/rhythm.md +125 -0
  52. package/design/20-genres/roguelike.md +122 -0
  53. package/design/20-genres/rts.md +169 -0
  54. package/design/20-genres/stealth.md +125 -0
  55. package/design/20-genres/survival-horror.md +124 -0
  56. package/design/20-genres/tactics.md +123 -0
  57. package/design/20-genres/tower-defense.md +120 -0
  58. package/design/30-systems/README.md +69 -0
  59. package/design/30-systems/accessibility.md +110 -0
  60. package/design/30-systems/boss-design.md +126 -0
  61. package/design/30-systems/build-diversity.md +120 -0
  62. package/design/30-systems/collectibles.md +108 -0
  63. package/design/30-systems/combat-model.md +113 -0
  64. package/design/30-systems/coop-and-competition.md +118 -0
  65. package/design/30-systems/counter-systems.md +115 -0
  66. package/design/30-systems/crafting.md +115 -0
  67. package/design/30-systems/difficulty-and-dda.md +114 -0
  68. package/design/30-systems/economy.md +117 -0
  69. package/design/30-systems/emergent-systems.md +114 -0
  70. package/design/30-systems/encounter-design.md +107 -0
  71. package/design/30-systems/enemy-ai.md +121 -0
  72. package/design/30-systems/enemy-archetypes.md +117 -0
  73. package/design/30-systems/faction-asymmetry.md +144 -0
  74. package/design/30-systems/grace.md +124 -0
  75. package/design/30-systems/mastery-curve.md +116 -0
  76. package/design/30-systems/meta-progression.md +114 -0
  77. package/design/30-systems/onboarding.md +115 -0
  78. package/design/30-systems/procgen-design.md +118 -0
  79. package/design/30-systems/progression.md +120 -0
  80. package/design/30-systems/resource-loops.md +112 -0
  81. package/design/30-systems/reward-schedules.md +124 -0
  82. package/design/30-systems/save-and-checkpoint.md +113 -0
  83. package/design/30-systems/session-structure.md +113 -0
  84. package/design/30-systems/skill-trees.md +111 -0
  85. package/design/30-systems/status-effects.md +111 -0
  86. package/design/30-systems/tech-tree.md +112 -0
  87. package/design/30-systems/telegraphs.md +106 -0
  88. package/design/30-systems/unit-rosters.md +123 -0
  89. package/design/40-worldbuilding/README.md +49 -0
  90. package/design/40-worldbuilding/aesthetic-direction.md +155 -0
  91. package/design/40-worldbuilding/faction-identity.md +136 -0
  92. package/design/40-worldbuilding/naming-and-tone.md +130 -0
  93. package/design/40-worldbuilding/narrative-delivery.md +129 -0
  94. package/design/40-worldbuilding/theme-vectors.md +134 -0
  95. package/design/40-worldbuilding/worldbuilding-scaffold.md +132 -0
  96. package/design/50-patterns/README.md +54 -0
  97. package/design/50-patterns/anti-frustration.md +121 -0
  98. package/design/50-patterns/emergence.md +121 -0
  99. package/design/50-patterns/feedback-loops.md +121 -0
  100. package/design/50-patterns/juice-choreography.md +124 -0
  101. package/design/50-patterns/mastery-and-flow.md +121 -0
  102. package/design/50-patterns/pacing-and-tension.md +120 -0
  103. package/design/50-patterns/readability.md +121 -0
  104. package/design/50-patterns/risk-reward.md +120 -0
  105. package/design/CONTRIBUTING.md +183 -0
  106. package/design/INDEX.md +133 -0
  107. package/design/README.md +86 -0
  108. package/design/_TEMPLATE.md +69 -0
  109. package/design/index.json +2720 -0
  110. package/package.json +2 -1
@@ -0,0 +1,126 @@
1
+ ---
2
+ id: genre-grid-puzzle
3
+ title: Grid Puzzle (Sokoban-like)
4
+ kind: genre
5
+ tags: [puzzle, sokoban, grid, solver, deterministic, turn-based, knot]
6
+ summary: The solvable knot — a grid of pieces where the obvious move is a trap and the real line is a small proof you feel yourself find.
7
+ use-when: Designing a turn-based, perfect-information puzzle whose fun is out-thinking a hand-authored or generated board.
8
+ composes-with: [system-onboarding, system-difficulty-and-dda, system-procgen-design, system-save-and-checkpoint, system-mastery-curve]
9
+ anchors: [anchor-baba-is-you, anchor-into-the-breach]
10
+ verify-with: docs/FUN.md#1--grid-puzzle-sokoban
11
+ ---
12
+
13
+ # Grid Puzzle (Sokoban-like)
14
+
15
+ **What it is.** A finite grid, a handful of pieces, and one legal-move rulebook.
16
+ Every board is a **knot**: a state you must untie in a fixed number of reversible
17
+ moves. No timer, no dexterity, no hidden information — only the gap between the
18
+ move that looks right and the move that is.
19
+
20
+ **Player fantasy / why it's fun.** *"I saw it."* The click of a solution
21
+ resolving in your head one beat before your hands move. The puzzle never lies to
22
+ you; when you lose you were wrong, and being wrong is the whole pleasure.
23
+
24
+ ## Pillars
25
+
26
+ 1. **Perfect information, imperfect intuition.** Everything is on the board. The
27
+ difficulty is entirely in the player's head — the trap is a *plausible* wrong
28
+ line, not a hidden fact.
29
+ 2. **Reversibility.** Undo and restart are free and instant. The player
30
+ experiments *toward* the answer; punishment is boredom, never lost progress.
31
+ 3. **The mechanic is the content.** One clean rule, milked for every
32
+ consequence. New pieces teach; they don't clutter. (Baba Is You is the
33
+ extreme: the *rules themselves* are pushable blocks.)
34
+
35
+ ## The loop stack
36
+
37
+ | Scale | The loop |
38
+ |---|---|
39
+ | **Moment** | Push a block one tile. Read the new board. Feel the knot loosen or tighten. |
40
+ | **Encounter** | One level: form a hypothesis → test a line → hit a dead end → *see* the real line → execute. The "aha" is the encounter payload. |
41
+ | **Session** | A ramp of 8–15 levels that each introduce or recombine one idea; the last is the boss knot. |
42
+ | **Meta** | Level packs, star ratings for move-optimality, optional "hard mode" variants of solved boards. |
43
+
44
+ ## Essential systems
45
+
46
+ | System | Why it's needed |
47
+ |---|---|
48
+ | [[system-onboarding]] | Teach each mechanic by *forcing* its use in a trivially-solvable board before it appears in a hard one. No text tutorials. |
49
+ | [[system-difficulty-and-dda]] | The pack is a difficulty curve; sequence levels so each isolates one new idea, then combines. |
50
+ | [[system-save-and-checkpoint]] | Undo + restart are the genre's grace (FUN.md law 5); per-level completion + best-move-count persist. |
51
+ | [[system-procgen-design]] | Optional: generate-and-solve to mass-produce boards; every generated board must be solver-proven winnable. |
52
+ | [[system-mastery-curve]] | Move-optimal solutions and hidden variant boards give experts a ceiling above "just solved it." |
53
+
54
+ ## Content & difficulty model
55
+
56
+ - **One idea per level, then combine.** Introduce piece X in a board where *only*
57
+ X matters. Two levels later, cross X with Y. The boss is X × Y × Z.
58
+ - **Difficulty = branching factor × depth of the trap.** A hard board isn't a
59
+ bigger board; it's a board where the greedy first move is *wrong* and the real
60
+ line is 3 moves deeper than it looks.
61
+ - **Machine-proven winnable, always.** Every level ships with a solver
62
+ (BFS/A* over `Puzzle<State, Move>`) proof. An unwinnable board is unshippable —
63
+ see FUN.md §1. Generated boards are filtered by the same solver; tune the
64
+ generator's *difficulty* on solver depth, not by eye.
65
+ - **Author dead-ends on purpose.** The best boards let the player reach a
66
+ *stuck-but-not-lost* state — reachable, un-winnable, obvious in hindsight. That
67
+ near-miss is where the lesson lands.
68
+
69
+ Reference wiring: [`examples/sokoban`](../../examples/sokoban) — the canonical
70
+ logic/view split, a pure `logic.ts` `Puzzle` module driving a scene-tree view;
71
+ [`examples/gravewell`](../../examples/gravewell) and
72
+ [`examples/seamfold`](../../examples/seamfold) for two more grid-logic variants.
73
+
74
+ ## Signature-mechanic seeds
75
+
76
+ Each is an "X but Y" ([[process-the-twist]]) — bend the *rule*, since the rule is
77
+ the content.
78
+
79
+ - **Sokoban but the boxes are you** — push a block and *your* avatar is what
80
+ moves; you shove yourself around the knot. (mechanic-swap)
81
+ - **Sokoban but gravity picks a direction each turn** — every move re-drops the
82
+ board; you plan the settle, not just the push. (mechanic-swap)
83
+ - **Sokoban but two avatars share one input** — every arrow moves both; the level
84
+ is solved only when their mirrored paths both land. (constraint)
85
+ - **Sokoban but the goal tiles move when you do** — the target is a second puzzle
86
+ chasing the first. (structure)
87
+ - **Sokoban but undo is a piece you place** — a finite pool of rewinds becomes a
88
+ resource you spend inside the puzzle, not a free safety net. (constraint)
89
+
90
+ ## Common pitfalls
91
+
92
+ - **Trial-and-error instead of insight.** If brute-forcing every push beats
93
+ thinking, the board is a search, not a puzzle. Keep boards small enough that the
94
+ *thinking* is faster than the flailing.
95
+ - **Read-the-designer's-mind moves.** A required move with no on-board reason is
96
+ unfair. Every step of the real line must be *justifiable from the board alone*.
97
+ - **Undo that costs.** Punishing experimentation kills the loop. Undo/restart are
98
+ free, instant, and unlimited — pillar 2.
99
+ - **Difficulty by fiddliness.** A 40×40 board isn't hard, it's tedious. Depth
100
+ comes from the trap, not the tile count.
101
+ - **Skipping the solver.** Hand-authoring "I'm pretty sure this is solvable" ships
102
+ dead levels. Prove every one — FUN.md §1.
103
+
104
+ ## Anchors
105
+
106
+ - [[anchor-baba-is-you]] — the mechanic *is* the content, pushed to its limit.
107
+ - [[anchor-into-the-breach]] — perfect-information reasoning; a telegraphed board
108
+ you solve, not react to.
109
+
110
+ ## Verify
111
+
112
+ Prove it with **[FUN.md §1 · Grid puzzle](../../docs/FUN.md#1--grid-puzzle-sokoban)** —
113
+ solver over `Puzzle<State,Move>` for every level; replay determinism; undo/restart
114
+ as grace. Design the knot here; prove it solvable there.
115
+
116
+ ## Composes with
117
+
118
+ - [[system-onboarding]] — the pack *is* the tutorial; teach by forced use.
119
+ - [[system-procgen-design]] — generate-and-solve for volume; solver-gated.
120
+ - [[pattern-mastery-and-flow]] — the ramp must keep challenge just above intuition.
121
+
122
+ ## See also
123
+
124
+ - [`examples/sokoban`](../../examples/sokoban) — the reference logic/view split.
125
+ - [`docs/FUN.md §1`](../../docs/FUN.md#1--grid-puzzle-sokoban) — the proof playbook.
126
+ - [[process-the-twist]] — bend the rule; the rule is the game.
@@ -0,0 +1,128 @@
1
+ ---
2
+ id: genre-horde-survival
3
+ title: Twin-stick Horde Survival (Vampire Survivors-like)
4
+ kind: genre
5
+ tags: [horde, survivors, twin-stick, auto-attack, build, wave, roguelite, orbit]
6
+ summary: The rising tide vs your rising build — minimal input, auto-attacks, and a level-up draft that races a superlinear swarm you must out-scale.
7
+ use-when: Designing a survive-the-timer game where the skill is positioning and build-drafting against an escalating horde.
8
+ composes-with: [system-build-diversity, system-meta-progression, system-reward-schedules, system-difficulty-and-dda, system-procgen-design, system-session-structure]
9
+ anchors: [anchor-vampire-survivors, anchor-nuclear-throne]
10
+ verify-with: docs/FUN.md#6--twin-stick-horde-survival-vampire-survivors-like
11
+ ---
12
+
13
+ # Twin-stick Horde Survival (Vampire Survivors-like)
14
+
15
+ **What it is.** You move; you don't aim. Weapons fire automatically. The screen
16
+ fills with enemies at a rising rate, and every few seconds you pick one upgrade
17
+ from a draft. The run is a race between the **swarm's growth** and your **build's
18
+ growth** — survive the timer, or drown.
19
+
20
+ **Player fantasy / why it's fun.** *"My build came online."* The turn from
21
+ scraping by to mowing hundreds — the multiplicative moment when three upgrades
22
+ click and the horde that was killing you becomes XP confetti. Minimal input,
23
+ maximal escalation.
24
+
25
+ ## Pillars
26
+
27
+ 1. **Positioning is the only input.** No aiming, no reloading — the skill is
28
+ *orbiting* the horde so your auto-attacks sweep them, herding density into your
29
+ fire. (Kiting bots corner themselves; the skill is the orbit — FUN.md §6.)
30
+ 2. **Build growth is multiplicative.** Upgrades compound — +area × +count ×
31
+ +damage — so the power fantasy accelerates. This is why the tide must be
32
+ superlinear to keep pace ([[system-build-diversity]]).
33
+ 3. **The tide always rises.** Spawn pressure climbs relentlessly (quadratic ramp)
34
+ so the run is always tightening; the peak-alive count is a designed target, not
35
+ an accident.
36
+
37
+ ## The loop stack
38
+
39
+ | Scale | The loop |
40
+ |---|---|
41
+ | **Moment** | Orbit; sweep a cluster; scoop the XP gems it drops. |
42
+ | **Encounter** | A wave / minute band: survive its density, then the level-up draft that answers it. |
43
+ | **Session** | One ~10–20 min run: draft a build, out-scale the tide, reach the timer or die. |
44
+ | **Meta** | Between-run persistent unlocks (new characters, weapons, permanent perks) that change *what you can draft*. |
45
+
46
+ ## Essential systems
47
+
48
+ | System | Why it's needed |
49
+ |---|---|
50
+ | [[system-build-diversity]] | The draft is the game; many upgrades × real synergies make each run a different build story. Pillar 2. |
51
+ | [[system-meta-progression]] | Persistent between-run unlocks that add *options* (not just power) — the reason to run again. Pillar of retention. |
52
+ | [[system-reward-schedules]] | XP gems, chests, level-up timing — the drip that paces the power fantasy; keep it ethical (no dark patterns). |
53
+ | [[system-difficulty-and-dda]] | The tide curve; the quadratic spawn ramp is the difficulty. Assist = slower ramp or a revive. |
54
+ | [[system-procgen-design]] | Enemy composition and pickup placement varied per run within provable pressure bounds. |
55
+ | [[system-session-structure]] | A run is a fixed-length timer; define the band structure (minute → boss-minute → finale). |
56
+
57
+ ## Content & difficulty model
58
+
59
+ - **Spawn pressure must be superlinear.** Multiplicative build growth out-runs a
60
+ linear tide by minute three; the horde needs a *quadratic* ramp to stay a threat
61
+ through the finale (FUN.md §6). Derive the ramp from expected build DPS, not by
62
+ feel.
63
+ - **Level-up picks pause the sim, and are input actions.** The draft freezes time;
64
+ each pick is a replayable input, never a direct mutation (FUN.md §6, law 6).
65
+ - **Assert `peak alive ≥ N`.** Lock in the horde feel so it can't silently regress
66
+ — a build that trivialises the swarm should still face a wall of bodies at the
67
+ peak (FUN.md §6).
68
+ - **Synergies over stat sticks.** A weapon that *combines* with another (garlic +
69
+ knockback = a grinder) beats a flat +10% damage. Build the upgrade pool so 3–4
70
+ archetypes each have a payoff spike.
71
+
72
+ Reference wiring: [`examples/emberwake`](../../examples/emberwake) — the horde sim
73
+ in `world.state` with a *pooled-sprite* view (the cosmetic-view rule under load);
74
+ the orbit-bot survival proof and `peak alive` assertion pattern. Grep
75
+ [`docs/API.md`](../../docs/API.md) for the pooling and particle primitives.
76
+
77
+ ## Signature-mechanic seeds
78
+
79
+ "X but Y" ([[process-the-twist]]) — bend the *input*, the *tide*, or the *draft*.
80
+
81
+ - **Survivors but you draw your attack path** — one gesture per few seconds aims
82
+ the sweep; positioning *plus* one deliberate stroke. (mechanic-swap)
83
+ - **Survivors but the horde is your XP economy AND your clock** — kills you don't
84
+ scoop become the enemies of the next minute. (structure)
85
+ - **Survivors but you draft the enemies too** — pick your upgrade *and* what the
86
+ tide sends next; risk-reward push-your-luck. (mechanic-swap — pairs with [[pattern-risk-reward]])
87
+ - **Survivors but two players share one XP pool and one screen** — coop where you
88
+ fight over the draft. (perspective — pairs with [[genre-coop-chaos]])
89
+ - **Survivors but the map shrinks each minute** — the arena, not just the spawn
90
+ rate, is the rising tide. (constraint)
91
+
92
+ ## Common pitfalls
93
+
94
+ - **Linear tide, exponential build.** By minute three the player is a god and
95
+ bored. The ramp must be superlinear (FUN.md §6). This is the #1 failure.
96
+ - **Aiming.** Adding a manual aim verb breaks the minimal-input fantasy and the
97
+ orbit skill. Keep the hands quiet; the mind does the building.
98
+ - **Flat upgrade pool.** All-stat-sticks, no synergies → every run is the same
99
+ build. Author payoff spikes ([[system-build-diversity]]).
100
+ - **Meta that only adds raw power.** If unlocks just make you stronger, runs
101
+ homogenise. Add *options* that change the draft ([[system-meta-progression]]).
102
+ - **A draft that doesn't pause.** Picking under fire is stress, not strategy —
103
+ freeze the sim for the choice.
104
+
105
+ ## Anchors
106
+
107
+ - [[anchor-vampire-survivors]] — the minimal-input horde loop; build-growth vs
108
+ rising tide; the auto-attack fantasy.
109
+ - [[anchor-nuclear-throne]] — arcade twin-stick roguelite tightness; steal the
110
+ run-based mastery and moment-to-moment feel.
111
+
112
+ ## Verify
113
+
114
+ Prove it with **[FUN.md §6 · Horde survival](../../docs/FUN.md#6--twin-stick-horde-survival-vampire-survivors-like)** —
115
+ orbit-bot survives with an hp floor; `peak alive ≥ N` asserted so the horde can't
116
+ regress; the superlinear spawn ramp checked against build DPS; sim ms/step budget
117
+ under load. Design the tide-vs-build here; prove the race there.
118
+
119
+ ## Composes with
120
+
121
+ - [[system-build-diversity]] — the draft is the game; synergies over stat sticks.
122
+ - [[system-meta-progression]] — between-run options are the retention loop.
123
+ - [[pattern-feedback-loops]] — the build's positive loop must stay just behind the tide.
124
+
125
+ ## See also
126
+
127
+ - [`examples/emberwake`](../../examples/emberwake) — the reference horde sim + pooled view.
128
+ - [`docs/FUN.md §6`](../../docs/FUN.md#6--twin-stick-horde-survival-vampire-survivors-like) — the proof playbook.
@@ -0,0 +1,120 @@
1
+ ---
2
+ id: genre-incremental
3
+ title: Incremental / Idle
4
+ kind: genre
5
+ tags: [incremental, idle, clicker, prestige, economy, pacing, payback, ramp]
6
+ summary: Number-goes-up economy where the design IS the pacing curve — first-buy times and era gaps tuned so there are no deserts.
7
+ use-when: Designing a clicker/idle/prestige game whose fun is a smooth ramp of unlocks with no dead stretches waiting for a wall.
8
+ composes-with: [system-economy, system-progression, pattern-feedback-loops, system-reward-schedules]
9
+ anchors: [anchor-balatro, anchor-factorio]
10
+ verify-with: docs/FUN.md#14--incrementalidle
11
+ ---
12
+
13
+ # Incremental / Idle
14
+
15
+ **What it is.** An economy that grows itself. You buy producers, producers make
16
+ currency, currency buys more producers; periodically a **prestige** reset trades
17
+ progress for a permanent multiplier. The number goes up — the question is only
18
+ *how fast, and toward what next unlock*.
19
+
20
+ **Player fantasy / why it's fun.** *"I keep crossing thresholds I couldn't afford a
21
+ minute ago."* The pull is a horizon that keeps arriving: every purchase is close, the
22
+ next tier is visible, and a reset makes the whole climb feel faster. Fun is the
23
+ **pacing curve with no deserts** — the moment you're bored, the game has failed.
24
+
25
+ ## Pillars
26
+
27
+ 1. **The curve is the game.** First-buy times and the gaps between eras *are* the
28
+ design surface. You are authoring a rhythm of "soon", not a set of numbers.
29
+ 2. **Every tier pays back on schedule.** Cost-over-production per tier stays roughly
30
+ flat (a ~15–25s payback). A rising payback silently strangles the late game.
31
+ 3. **Intent is an action, never a mutation.** A click is `input.press`, not a direct
32
+ state write — or the replay lies and the balance-sim can't trust the arc.
33
+
34
+ ## The loop stack
35
+
36
+ | Layer | The beat |
37
+ |---|---|
38
+ | **Moment** | Afford the next thing → buy it → watch the rate tick up. |
39
+ | **Encounter** | Reach a tier / unlock / milestone that changes what you optimise. |
40
+ | **Session** | Climb toward a prestige; decide when to reset. |
41
+ | **Meta** | Prestige multipliers, permanent upgrades, new mechanic layers per reset. |
42
+
43
+ ## Essential systems
44
+
45
+ | System | Why this genre needs it |
46
+ |---|---|
47
+ | [[system-economy]] | Faucets, sinks, and currencies are the entire object; inflation control keeps late tiers meaningful. |
48
+ | [[system-progression]] | The power curve *is* the content; pacing power gain is pacing the game. |
49
+ | [[pattern-feedback-loops]] | Production→currency→production is a runaway positive loop; prestige is the negative-loop reset that re-paces it. |
50
+ | [[system-reward-schedules]] | Milestone unlocks and offline-earnings payouts are the variable, anticipated rewards. |
51
+ | [[system-meta-progression]] | Prestige currency + permanent buffs are cross-run meta; power vs. new options is the tuning axis. |
52
+ | [[system-onboarding]] | The first three buys must land in under a minute or the ramp never catches. |
53
+
54
+ ## Content & difficulty model
55
+
56
+ - **Balance-sim the whole arc.** Run the economy headless from zero to endgame; assert
57
+ the pacing windows (first-buy times, era-to-era gaps), **monotone production**, and
58
+ **no unlock deserts** — no stretch where nothing new is affordable for too long.
59
+ - **Flat payback per tier.** State the inequality: `cost_n / production_n ≈ const`
60
+ (~15–25s) across tiers. A tier whose payback balloons is a wall; assert it against
61
+ the actual config, don't vibe it.
62
+ - **No click-softlock.** Prove the player can always progress without a required
63
+ manual click storm — an idle game must idle.
64
+ - **Difficulty = slope, not spikes.** You never "make it harder"; you shape how long
65
+ each threshold takes. A desert is the only real failure state.
66
+ - **New layer per prestige.** Each reset should unlock a *mechanic*, not just a bigger
67
+ multiplier, or the late loop flattens into staring.
68
+
69
+ ## Signature-mechanic seeds
70
+
71
+ - **Incremental but the producers are a factory graph** — outputs feed inputs, and
72
+ the bottleneck moves (mechanic-swap toward [[anchor-factorio]]; the curve becomes a
73
+ logistics puzzle).
74
+ - **Incremental but every prestige is a poker deck** — reset trades score for jokers
75
+ that reshape the next run's multipliers (mechanic-swap toward [[anchor-balatro]]).
76
+ - **Incremental but it's a tended garden** — production is crops maturing on a
77
+ calendar; the tonal bend swaps grind-anxiety for [[genre-farming-sim]] calm.
78
+ - **Incremental but one hard constraint: one currency, one screen** — no menus, the
79
+ whole ramp legible at once (constraint; forces ruthless curve design).
80
+ - **Incremental but the number going up is a story meter** — thresholds unlock
81
+ narrative, not just power (tonal; pairs with [[genre-narrative-decisions]]).
82
+
83
+ ## Common pitfalls
84
+
85
+ - **Rising payback ratios.** The classic strangler: late tiers cost far more than they
86
+ return, the ramp stalls, the player quits. The flat-payback inequality exists to
87
+ catch exactly this.
88
+ - **Unlock deserts.** Any dead stretch waiting on a wall is the genre's cardinal sin;
89
+ the balance-sim asserts against them.
90
+ - **Direct-mutation UI.** Buttons that write state instead of pressing an input make
91
+ replay and the balance-sim untrustworthy — the arc can't be proven.
92
+ - **Prestige-as-only-content.** Resets that add a multiplier and nothing else flatten
93
+ the meta; each should open a new mechanical layer.
94
+ - **Punishing idle.** If afk means you fall behind, it isn't idle. Offline earnings and
95
+ a click-free path are load-bearing.
96
+
97
+ ## Anchors
98
+
99
+ - [[anchor-balatro]] — the "number goes up" surge and the reset-for-multipliers loop;
100
+ the direct reference for the prestige-as-deck seed.
101
+ - [[anchor-factorio]] — production feeding production, complexity scaling with the
102
+ curve; the reference for the factory-graph bend.
103
+
104
+ ## Verify
105
+
106
+ Balance-sim the arc; assert pacing windows, monotone production, no unlock deserts,
107
+ no click-softlock → **[docs/FUN.md §14 · Incremental/idle](../../docs/FUN.md#14--incrementalidle)**.
108
+ Author the curve here; prove its windows there.
109
+
110
+ ## Composes with
111
+
112
+ - [[system-economy]] — the faucet/sink model the whole ramp rides on.
113
+ - [[system-progression]] — the power curve you are literally pacing.
114
+ - [[pattern-feedback-loops]] — the runaway production loop and the prestige brake.
115
+
116
+ ## See also
117
+
118
+ - [docs/FUN.md §14](../../docs/FUN.md#14--incrementalidle) — mechanical truth + verify recipe.
119
+ - [`sandboxes/`](../../sandboxes/) — the procgen/economy lab to prototype a payback
120
+ curve headless before wiring UI.
@@ -0,0 +1,120 @@
1
+ ---
2
+ id: genre-match3
3
+ title: Match-3
4
+ kind: genre
5
+ tags: [match3, cascade, tile-swap, puzzle, board, combo, casual, choreography]
6
+ summary: Swap-adjacent tile matcher where the fun is the cascade you triggered — one swap, a chain reaction the board runs for you.
7
+ use-when: Designing a tile-swap/board-clear game where a single legal move should bloom into a satisfying, deterministic chain.
8
+ composes-with: [system-reward-schedules, system-difficulty-and-dda, pattern-juice-choreography, pattern-feedback-loops]
9
+ anchors: [anchor-peggle, anchor-balatro]
10
+ verify-with: docs/FUN.md#13--match-3
11
+ ---
12
+
13
+ # Match-3
14
+
15
+ **What it is.** A grid of coloured tiles. You **swap two adjacent tiles**; any line
16
+ of 3+ clears, tiles above fall, and new clears may form — a **cascade** the board
17
+ resolves on its own. One input, a bloom of consequence.
18
+
19
+ **Player fantasy / why it's fun.** *"I found the one move that made the whole board
20
+ go off."* The pull is authored luck: you set up the domino, the game topples it in a
21
+ shower of pops. Fun is the **cascade you triggered**, not the cascade you watched.
22
+
23
+ ## Pillars
24
+
25
+ 1. **The swap is the whole decision.** Everything downstream — cascade, combo,
26
+ special tiles — is *consequence*, not input. Depth lives in reading the board,
27
+ not in dexterity.
28
+ 2. **The board is always fair and always alive.** No pre-made matches at deal, a
29
+ legal move always exists, and a dead board reshuffles. The player never loses to
30
+ the deal.
31
+ 3. **Consequence is choreographed.** The sim resolves instantly and deterministically
32
+ to a *script*; the view animates that script (the purest form of the cosmetic
33
+ rule). The juice is earned by the move, timed to the chain.
34
+
35
+ ## The loop stack
36
+
37
+ | Layer | The beat |
38
+ |---|---|
39
+ | **Moment** | Pick a swap → watch the cascade the board runs. |
40
+ | **Encounter** | A board/level: hit a goal (score, clear jelly, drop an anchor) within a move or time budget. |
41
+ | **Session** | A run of boards; difficulty ramps via goal, not rule change. |
42
+ | **Meta** | Level map, stars, boosters/unlocks, daily board. |
43
+
44
+ ## Essential systems
45
+
46
+ | System | Why this genre needs it |
47
+ |---|---|
48
+ | [[system-reward-schedules]] | Cascades and special-tile creation are variable-ratio payoffs; the "number goes up" surge is the retention engine. |
49
+ | [[system-difficulty-and-dda]] | Difficulty is the *goal* tuned to measured bot win-rate — a distribution, not a rule tweak (see Content model). |
50
+ | [[pattern-juice-choreography]] | The pop/fall/combo chain is the product; feel is timed to the deterministic script. |
51
+ | [[pattern-feedback-loops]] | Cascades that spawn special tiles that trigger cascades — bounded so a lucky board doesn't auto-win. |
52
+ | [[system-onboarding]] | Teach swap → match → cascade → special tile by doing, one mechanic per early board. |
53
+ | [[system-collectibles]] | Stars, level completion, cosmetic boards — the optional pull past "cleared". |
54
+
55
+ ## Content & difficulty model
56
+
57
+ - **Winnability is a distribution, not a switch.** Run a greedy matcher bot over N
58
+ seeds; read its win-rate; **tune the GOAL to the bot**, never the mechanics to a
59
+ fixed goal. A level is "hard" because the target sits high on the bot's curve.
60
+ - **Board fairness is a connectivity proof.** Deal with no existing matches; assert a
61
+ legal move exists every turn; reshuffle when none does. This is the genre's
62
+ mechanical truth — prove it, don't eyeball it.
63
+ - **Score accounting is an invariant.** `score === Σ (cleared × base × combo)`. One
64
+ pure scorer feeds sim, bot, tests, and the on-screen counter — same seam as the
65
+ city-builder's exposed score ([[genre-city-builder]]).
66
+ - **Ramp by objective family:** score → clear-the-jelly → drop-the-anchor → limited
67
+ moves → blockers. New *constraint*, same swap.
68
+
69
+ ## Signature-mechanic seeds
70
+
71
+ - **Match-3 but the board is a poker hand** — clears score as hands, jokers modify
72
+ multipliers (mechanic-swap toward [[anchor-balatro]]; the cascade *builds* the hand).
73
+ - **Match-3 but gravity rotates** — swap the fall direction as a move; setups you
74
+ hold across a turn (mechanic-swap; the board becomes 4-directional).
75
+ - **Match-3 but every clear is a step in a duel** — cascades power attacks against a
76
+ telegraphing foe; it's a rhythm-of-turns fight over a board (structure; pairs with
77
+ [[genre-rhythm]]'s "input-legality filter over a turn-based game").
78
+ - **Match-3 but you place, not swap** — deal tiles onto the grid Tetris-style; the
79
+ bend moves the decision from finding a match to *engineering* one (mechanic-swap).
80
+ - **Match-3 but tiles are a garden** — matched crops mature instead of vanishing; a
81
+ tonal + theme bend toward [[genre-farming-sim]]'s gentle solvency.
82
+
83
+ ## Common pitfalls
84
+
85
+ - **Dealing pre-matches.** Free clears at deal cheapen the swap and desync score;
86
+ the fairness proof exists to forbid this.
87
+ - **Tuning mechanics to a fixed goal.** Leads to unwinnable or trivial boards. Tune
88
+ the goal to the bot's measured curve instead.
89
+ - **View drives sim.** Animating the cascade as it "decides" makes replay lie and
90
+ breaks `world.hash()`. Sim resolves to a script; view is a `cosmetic` observer.
91
+ - **Runaway cascades.** Unbounded chain-of-specials means a lucky board auto-wins.
92
+ Cap combo scaling so skill still separates from luck.
93
+ - **Special-tile soup.** Too many special types muddies the read. Introduce one per
94
+ objective family via [[system-onboarding]].
95
+
96
+ ## Anchors
97
+
98
+ - [[anchor-peggle]] — maximal juice on a single trivial input; variable-ratio reward;
99
+ the "one shot, watch it pay off" fantasy the cascade shares.
100
+ - [[anchor-balatro]] — the score-multiplier "number goes up" surge; the direct
101
+ reference for the poker-hand and joker seeds above.
102
+
103
+ ## Verify
104
+
105
+ Board fairness sweep, score-accounting invariant, greedy-matcher hit-rate, golden
106
+ session → **[docs/FUN.md §13 · Match-3](../../docs/FUN.md#13--match-3)**. Design the
107
+ cascade here; prove fairness and the score invariant there.
108
+
109
+ ## Composes with
110
+
111
+ - [[system-reward-schedules]] — the cascade payoff schedule that keeps a session pulling.
112
+ - [[pattern-juice-choreography]] — the pop/fall/combo choreography timed to the script.
113
+ - [[genre-rhythm]] · [[genre-farming-sim]] — natural blend targets for the seeds above.
114
+
115
+ ## See also
116
+
117
+ - [docs/FUN.md §13](../../docs/FUN.md#13--match-3) — mechanical truth + verify recipe.
118
+ - [docs/JUICE.md](../../docs/JUICE.md) — feel gates for the cascade choreography.
119
+ - [`sandboxes/`](../../sandboxes/) — reach for the particles/tweens lab to wire the
120
+ pop-and-fall feel in isolation before building a whole board.
@@ -0,0 +1,132 @@
1
+ ---
2
+ id: genre-metroidvania
3
+ title: Metroidvania
4
+ kind: genre
5
+ tags: [metroidvania, exploration, gating, ability, map, backtrack, locked-door]
6
+ summary: The locked-door promise kept — a single connected world where every ability you earn retroactively unlocks a place you already saw and couldn't reach.
7
+ use-when: Designing an interconnected exploration game whose progression is spatial — abilities as keys, the map as the meta-puzzle.
8
+ composes-with: [system-progression, system-skill-trees, system-save-and-checkpoint, system-onboarding, system-boss-design, system-collectibles]
9
+ anchors: [anchor-dead-cells, anchor-celeste]
10
+ verify-with: docs/FUN.md#3--metroidvania
11
+ ---
12
+
13
+ # Metroidvania
14
+
15
+ **What it is.** One continuous world, not a level list. You explore, hit a
16
+ **locked door** (a wall too high, a gap too wide, a gate keyed to an ability you
17
+ don't have), and file it away. Later you earn the key — and the world you already
18
+ walked opens up beneath you. The map is the real progression bar.
19
+
20
+ **Player fantasy / why it's fun.** *"I remember this place."* The double-jump you
21
+ just earned is a memory of a dozen ledges you eyed and left. Power is measured in
22
+ *where you can now go*, and the world rewarding your growth feels like the world
23
+ was waiting for you.
24
+
25
+ ## Pillars
26
+
27
+ 1. **The locked-door promise.** Every gate you can't pass is a promise the game
28
+ *will* let you pass it later — and keeps. Gates really gate; abilities really
29
+ open. A gate you can cheese breaks the contract (FUN.md §3 demands *negative*
30
+ proofs).
31
+ 2. **One connected world.** Not levels — a place. Shortcuts fold back, biomes
32
+ interlock, and the joy is holding the whole map in your head.
33
+ 3. **Ability as key and as verb.** Each unlock changes both *where* you go and
34
+ *how* you move/fight — a double-jump is a key to high ledges and a new combat
35
+ option at once. (Celeste's abilities do exactly this to its movement envelope.)
36
+
37
+ ## The loop stack
38
+
39
+ | Scale | The loop |
40
+ |---|---|
41
+ | **Moment** | Traverse a room; test a gap; note "can't yet." |
42
+ | **Encounter** | Reach an ability (often behind a boss/miniboss) → the room that teaches it → the first gate it opens. |
43
+ | **Session** | Sweep a biome: open its gates, find its shortcuts, beat its guardian, leave with one new key. |
44
+ | **Meta** | The whole map fills in; optional collectibles and sequence-breaks reward mastery of the geography. |
45
+
46
+ ## Essential systems
47
+
48
+ | System | Why it's needed |
49
+ |---|---|
50
+ | [[system-progression]] | Abilities are the power curve; each is a discrete, world-changing unlock, not a stat bump. |
51
+ | [[system-boss-design]] | Guardians gate abilities; the fight *is* the ceremony of earning the key. |
52
+ | [[system-save-and-checkpoint]] | The world is persistent; save/load must round-trip the full map + unlock state (FUN.md §3 asserts the hash round-trip). |
53
+ | [[system-onboarding]] | The room right after each ability must *force* its use — teach the verb before the world demands it. |
54
+ | [[system-skill-trees]] | Optional: layer optional upgrades over the mandatory ability spine for build texture. |
55
+ | [[system-collectibles]] | Off-the-critical-path secrets give the fully-powered player reasons to re-sweep the map. |
56
+
57
+ ## Content & difficulty model
58
+
59
+ - **Gates need negative proofs.** The movement envelope is only a *lower* bound.
60
+ For every "you can't pass yet," simulate the best ungated maneuver against the
61
+ real geometry and show it falls short — otherwise a skilled player sequence-
62
+ breaks by accident and the promise means nothing (FUN.md §3).
63
+ - **Design the map as a lock-and-key graph.** Author the ability order first, then
64
+ place gates so each new key opens exactly the doors that route the player
65
+ forward *and* backward into old regions. A progression-as-graph spine keeps it
66
+ provable.
67
+ - **Room transitions must be clean.** Trigger inside the border, land past the far
68
+ threshold — no ping-pong at the seam (FUN.md §3).
69
+ - **Backtracking must pay.** A revisited region should offer new reachability, a
70
+ shortcut, or a secret — never an empty walk. Fast-travel or folded shortcuts
71
+ respect the player's time once the geography is learned.
72
+
73
+ Reference wiring: [`examples/sproutveil`](../../examples/sproutveil) — the
74
+ room-connected exploration structure and the waypoint-bot pattern extended across
75
+ rooms; [`examples/kintsugi`](../../examples/kintsugi) — the flagship whose five
76
+ abilities each extend the movement envelope (the metroidvania spine).
77
+
78
+ ## Signature-mechanic seeds
79
+
80
+ "X but Y" ([[process-the-twist]]) — bend the *key*, the *map*, or *who holds it*.
81
+
82
+ - **Metroidvania but the map rearranges when you gain an ability** — new powers
83
+ re-lay the world, so backtracking is always into somewhere new. (structure)
84
+ - **Metroidvania but abilities are spent, not kept** — a key opens one door then
85
+ is consumed; routing the map is a resource puzzle. (constraint)
86
+ - **Metroidvania but the locked doors are in time, not space** — a "key" lets you
87
+ visit an earlier state of the same room. (perspective)
88
+ - **Metroidvania but you play the world, not the hero** — you *place* the gates and
89
+ route an AI explorer. (perspective)
90
+ - **Metroidvania but every gate is a promise you make to an NPC** — social access,
91
+ not physical, opens the map. (theme)
92
+
93
+ ## Common pitfalls
94
+
95
+ - **Cheesable gates.** A gate the movement envelope can clear ungated is a broken
96
+ promise. Prove every gate *both ways* (ungated fails, gated passes) — FUN.md §3.
97
+ - **Levels wearing a map costume.** Disconnected rooms with a fast-travel menu
98
+ aren't a metroidvania; the *interconnection* is the fun. Fold the world back on
99
+ itself.
100
+ - **Empty backtracking.** Sending the player through cleared rooms with nothing new
101
+ is padding. Every revisit pays.
102
+ - **Ability that's only a key.** If a new power opens doors but doesn't change how
103
+ you move or fight, it's a keycard, not a verb. Make it both (pillar 3).
104
+ - **Save that loses the map.** Unlock/exploration state must survive save/load
105
+ exactly — assert the hash round-trip.
106
+
107
+ ## Anchors
108
+
109
+ - [[anchor-dead-cells]] — metroidvania × roguelite; permanent unlocks over
110
+ impermanent runs (steal the unlock-as-key spine, drop the run structure if you
111
+ want the classic form).
112
+ - [[anchor-celeste]] — abilities as movement-envelope changers; the traversal feel
113
+ a metroidvania needs under its map.
114
+
115
+ ## Verify
116
+
117
+ Prove it with **[FUN.md §3 · Metroidvania](../../docs/FUN.md#3--metroidvania)** —
118
+ bot full-run with abilities; both-ways gate proofs (best ungated maneuver fails,
119
+ gated passes); save/load hash round-trip; clean room-transition triggers. Design
120
+ the lock-and-key world here; prove the doors there.
121
+
122
+ ## Composes with
123
+
124
+ - [[system-progression]] — abilities *are* the curve; pace their power.
125
+ - [[system-boss-design]] — guardians as the gate ceremony.
126
+ - [[genre-precision-platformer]] — the traversal feel under the exploration.
127
+
128
+ ## See also
129
+
130
+ - [`examples/kintsugi`](../../examples/kintsugi) — the flagship metroidvania spine.
131
+ - [`examples/sproutveil`](../../examples/sproutveil) — room-connected structure.
132
+ - [`docs/FUN.md §3`](../../docs/FUN.md#3--metroidvania) — the proof playbook.