hayao 0.4.0 → 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 (131) 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/dist/anim/blend.d.ts +68 -0
  111. package/dist/anim/clip.d.ts +87 -0
  112. package/dist/anim/ik.d.ts +40 -0
  113. package/dist/anim/skeleton.d.ts +64 -0
  114. package/dist/hayao.global.js +12 -12
  115. package/dist/index.d.ts +11 -1
  116. package/dist/index.js +1683 -516
  117. package/dist/index.js.map +4 -4
  118. package/dist/index.min.js +12 -12
  119. package/dist/render/canvas2d-core.d.ts +4 -0
  120. package/dist/render/commands.d.ts +19 -0
  121. package/dist/render/lightRun.d.ts +35 -0
  122. package/dist/render/svgString.d.ts +8 -3
  123. package/dist/scene/clipPlayer.d.ts +58 -0
  124. package/dist/scene/ikTarget.d.ts +25 -0
  125. package/dist/scene/light.d.ts +80 -0
  126. package/dist/scene/shadow2d.d.ts +25 -0
  127. package/dist/scene/skeletonDebug.d.ts +28 -0
  128. package/dist/verify/gates.d.ts +25 -0
  129. package/docs/API.md +66 -8
  130. package/docs/CONVENTIONS.md +56 -0
  131. package/package.json +2 -1
@@ -0,0 +1,122 @@
1
+ ---
2
+ id: anchor-vampire-survivors
3
+ title: Vampire Survivors
4
+ kind: anchor
5
+ tags: [horde-survival, auto-attack, build-growth, rising-tide, minimal-input, power-fantasy]
6
+ summary: One-stick horde survival where you only move — weapons fire themselves — and the whole game is your multiplying build racing an escalating swarm.
7
+ use-when: Designing a low-input game whose fun is watching a snowballing build outrun a superlinear threat curve.
8
+ composes-with: [genre-horde-survival, system-build-diversity, system-reward-schedules, system-progression]
9
+ anchors: [anchor-vampire-survivors]
10
+ verify-with: docs/FUN.md#6-·-twin-stick-horde-survival-vampire-survivors-like
11
+ ---
12
+
13
+ # Vampire Survivors
14
+
15
+ **What it is.** You steer a character with one stick; every weapon auto-fires.
16
+ Kill enemies, collect gems, level up, pick one of three upgrades, and repeat
17
+ until you're a screen-clearing storm of projectiles — or the swarm finally
18
+ catches you.
19
+
20
+ **Player fantasy / why it's fun.** *I started weak and now I am a walking
21
+ apocalypse.* The pull is the **power-curve crossover**: for the first minutes
22
+ you barely survive; then your build tips over a threshold and the same enemies
23
+ that terrified you become confetti. Minimal input, maximal escalation.
24
+
25
+ ## Design DNA
26
+
27
+ Strip combat down to **positioning only** — remove aiming, remove firing — so
28
+ the entire skill expression is *where you stand* and *what you build*. Then
29
+ run two exponentials against each other: a **multiplicatively growing build**
30
+ vs a **superlinearly rising tide** of enemies. Fun is the race between those
31
+ curves, and the drama is whether your build tips over before the swarm does.
32
+
33
+ The whole design lives or dies on the **crossover point**. Set it too early
34
+ and the run is a boring victory lap; too late and it's a frustrating grind
35
+ that never pays off. The spawn curve must be *superlinear* (quadratic ramp)
36
+ precisely because the build is *multiplicative* — a linear threat can't stay
37
+ ahead of a build that stacks area × count × cooldown, so the upgrades would
38
+ trivialise the night. Two matched exponentials is what keeps the tension taut
39
+ for the full timer.
40
+
41
+ The upgrade draft is the whole game's decision surface. Everything else is a
42
+ treadmill you're outrunning — which is why the draft cadence (frequent,
43
+ low-stakes, one-of-three) matters more than any single weapon's numbers.
44
+
45
+ ## Load-bearing structures
46
+
47
+ | Structure | Why it works |
48
+ |---|---|
49
+ | **Auto-attack; you only move** | Removes execution skill, foregrounds build + positioning. Radically low input, high legibility. |
50
+ | **Superlinear spawn pressure** | Enemy density ramps quadratically so it can stay ahead of a multiplicative build — or upgrades trivialise the run. FUN.md truth. [[system-difficulty-and-dda]]. |
51
+ | **Level-up draft-of-3, sim paused** | The one decision that matters, delivered as a frequent, low-stakes pick. Picks are *input actions* so runs replay. [[system-reward-schedules]]. |
52
+ | **Multiplicative build growth** | Weapons + passives stack multiplicatively (area × count × cooldown), so builds *tip over* rather than climb linearly. [[system-build-diversity]]. |
53
+ | **Evolution recipes** | Weapon + matching passive fuses into a super-weapon — a hidden combinatorial goal that rewards knowledge. [[system-crafting]]. |
54
+ | **Orbiting is the skill** | The safe play is circling the horde, not fleeing (kiting corners you). The map teaches this by shape. |
55
+ | **Session = a fixed timer** | ~15–30 min "survive the clock" gives a clean win condition and a legible arc. [[system-session-structure]]. |
56
+
57
+ ## What to steal
58
+
59
+ - **Auto-fire so the only inputs are move + draft.** The lowest-input action
60
+ loop that still feels like combat. Instant onboarding.
61
+ - **Two racing curves.** Multiplicative build vs superlinear swarm. Tune the
62
+ crossover point — that's the whole difficulty design. Assert `peak alive ≥
63
+ N` so the horde feel can't regress (FUN.md).
64
+ - **Frequent low-stakes draft-of-3.** Many small choices beat few big ones for
65
+ flow; keep the sim paused during the pick and log it as input.
66
+ - **Hidden fusion recipes** as a knowledge-reward layer over the visible
67
+ draft.
68
+ - **A survive-the-timer session frame** for a clean, repeatable arc — a fixed
69
+ clock gives a legible win, a natural finale spike, and a stable unit for
70
+ balancing the two curves.
71
+ - **Foreground positioning by making the safe play *circling*.** Design the
72
+ arena and enemy speeds so orbiting the horde beats fleeing it; a kiting-bot
73
+ that corners itself proves the map teaches the right instinct (FUN.md §6).
74
+
75
+ ## What's just theme (drop it)
76
+
77
+ - **Gothic/vampire skin.** Pure paint — the same loop ships as bugs, robots,
78
+ or emoji.
79
+ - **The specific weapon roster.** The *categories* (orbit, projectile, aura,
80
+ melee) are structural; garlic vs holy-water is flavour — see
81
+ [[system-build-diversity]].
82
+ - **Meta gold shop.** A common bolt-on ([[system-meta-progression]]) but not
83
+ essential; the in-run curve carries the fun alone.
84
+ - **The pixel-swarm look.** Aesthetic. The tide only needs to *read* as
85
+ overwhelming.
86
+
87
+ ## Composes into
88
+
89
+ - [[genre-horde-survival]] — its canonical anchor; the rising-tide-vs-build
90
+ loop lives there.
91
+ - [[system-build-diversity]] — the multiplicative-stack draft is the exemplar.
92
+ - [[system-reward-schedules]] — the paced level-up draft.
93
+ - [[system-progression]] — in-run power pacing.
94
+ - [[system-difficulty-and-dda]] — the superlinear spawn curve as the
95
+ difficulty engine.
96
+
97
+ ## Twist seams
98
+
99
+ - **Vampire Survivors but you place the build before the run and only watch**
100
+ *(structure)* — pushes it toward [[genre-auto-battler]]: the draft moves to
101
+ a prep phase, positioning becomes formation. Bends who decides when.
102
+ - **Vampire Survivors but one weapon, and the draft upgrades the *map***
103
+ *(mechanic-swap)* — instead of stacking weapons you reshape the arena
104
+ (walls, funnels, hazards); the tide stays, the build becomes level design.
105
+ - **Vampire Survivors but the tide is time itself** *(constraint)* — no
106
+ enemies; the "swarm" is a rising flood or dark you outbuild by
107
+ lighting/pumping. Same crossover drama, no combat. Pairs with
108
+ [[genre-survival-horror]].
109
+ - **Vampire Survivors but tonally serene — you're growing a garden the weeds
110
+ are racing** *(tonal)* — the swarm becomes encroaching overgrowth, the build
111
+ becomes cultivation; the same two-exponential race, recolored from panic to
112
+ tending. Pairs with [[genre-farming-sim]].
113
+
114
+ ## See also
115
+
116
+ - [[genre-horde-survival]] · [[system-build-diversity]] ·
117
+ [[system-reward-schedules]]
118
+ - `docs/FUN.md#6-·-twin-stick-horde-survival-vampire-survivors-like` —
119
+ orbit-bot + peak-alive verify.
120
+ - `sandboxes/particle-studio/` — pooled, cosmetic swarm rendering (deletable
121
+ per law 6).
122
+ - `docs/JUICE.md` — the level-up / crit / clear feedback choreography.
@@ -0,0 +1,62 @@
1
+ # 20-genres/ — the creative genre templates
2
+
3
+ Each module here is the **design** counterpart to a section of
4
+ [`docs/FUN.md`](../../docs/FUN.md). FUN.md answers *"how do I PROVE this genre is
5
+ fair?"* — solvers, bot runs, pacing windows, both-ways affordance proofs. These
6
+ modules answer the front-half question FUN.md can't: *"how do I DESIGN a great
7
+ one?"* — the pillars, the loop stack, the systems it needs, the twist seams, and
8
+ the traps that kill it.
9
+
10
+ **They pair, they don't overlap.** Every genre module sets `verify-with:` to its
11
+ matching FUN.md section and *links* it rather than restating a single verify
12
+ recipe. Design here; prove there. When your design blends genres, satisfy **every
13
+ parent's** verify pattern (rhythm = roguelike + input legality; Peggle = physics +
14
+ aim search — FUN.md Part 3).
15
+
16
+ Reach for one when the [pipeline](../README.md) hits **COMPOSE**: you've named the
17
+ [[anchor]] the game *is*, and you need the genre's design skeleton — pillars, loop
18
+ stack, and the `[[system-*]]` parts to bolt on — before you [twist](../00-process/the-twist.md)
19
+ it into something worth building.
20
+
21
+ ## The 24 genre modules
22
+
23
+ The first 21 map 1:1 to FUN.md §1–§21. The last three are **extensions** beyond
24
+ FUN.md's corpus — genres the campaign didn't cover but the Codex designs for.
25
+
26
+ | id | title | one-line pillar |
27
+ |---|---|---|
28
+ | [[genre-grid-puzzle]] | Grid Puzzle (Sokoban) | The solvable knot: obvious move is the trap. |
29
+ | [[genre-precision-platformer]] | Precision Platformer (Celeste) | Trust in inputs; every death is your own. |
30
+ | [[genre-metroidvania]] | Metroidvania | The locked-door promise, always kept. |
31
+ | [[genre-action-adventure]] | Action-Adventure (Zelda) | Readable combat; telegraphs make reaction fair. |
32
+ | [[genre-stealth]] | Stealth | Plannable danger you can read and route. |
33
+ | [[genre-horde-survival]] | Horde Survival (Vampire Survivors) | The rising tide vs your rising build. |
34
+ | [[genre-bullet-hell]] | Bullet Hell | Density that reads; uptime, not dodging, is the skill. |
35
+ | [[genre-tower-defense]] | Tower Defense | Build decisions that matter; coverage is geometry. |
36
+ | [[genre-rts]] | RTS-lite | Mass under command; asymmetry that balances. |
37
+ | [[genre-roguelike]] | Traditional Roguelike | Fair discovery; procgen that always connects. |
38
+ | [[genre-deckbuilder]] | Roguelike Deckbuilder | Drafts with teeth; a win-rate window. |
39
+ | [[genre-tactics]] | Turn-based Tactics (Into the Breach) | Rewriting the telegraphed future. |
40
+ | [[genre-match3]] | Match-3 | Cascades you triggered; instant sim, animated view. |
41
+ | [[genre-incremental]] | Incremental / Idle | A pacing curve with no deserts. |
42
+ | [[genre-farming-sim]] | Farming / Life Sim | Gentle solvency; plans that can come true. |
43
+ | [[genre-survival-horror]] | Survival Horror | Dread you can budget in resource arithmetic. |
44
+ | [[genre-city-builder]] | City / Colony Builder | The exposed score; negative synergies. |
45
+ | [[genre-rhythm]] | Rhythm | Tight but fair; the beat is sim time. |
46
+ | [[genre-physics-arcade]] | Physics Arcade (Peggle) | Trustworthy flight; swept collision. |
47
+ | [[genre-racing]] | Top-down Racing | The speed/line tradeoff made physically real. |
48
+ | [[genre-narrative-decisions]] | Narrative Decisions (Reigns) | Impossible stewardship between two ditches. |
49
+ | [[genre-coop-chaos]] | Co-op Chaos (Overcooked) | *Extension* — communication under time pressure. |
50
+ | [[genre-auto-battler]] | Auto-battler | *Extension* — prep then watch; economy + positioning + synergy. |
51
+ | [[genre-exploration]] | Exploration / Immersive-sim-lite | *Extension* — curiosity and knowledge as the reward. |
52
+
53
+ ## Authoring one
54
+
55
+ Follow [`../CONTRIBUTING.md`](../CONTRIBUTING.md): the **genre** skeleton is
56
+ Pillars (exactly 3) · The loop stack (moment/encounter/session/meta) · Essential
57
+ systems (a table linking `[[system-*]]` ids + why each) · Content & difficulty
58
+ model · Signature-mechanic seeds (3–5 "X but Y" bends) · Common pitfalls · Anchors
59
+ · Verify (link the FUN.md section) · See also. Keep it 120–260 lines, tables over
60
+ prose, the [`docs/FUN.md`](../../docs/FUN.md) voice. Never invent a Hayao API —
61
+ point at a [`sandboxes/`](../../sandboxes/) lab or [`examples/`](../../examples/)
62
+ slug that already wires it.
@@ -0,0 +1,126 @@
1
+ ---
2
+ id: genre-action-adventure
3
+ title: Top-down Action-Adventure (Zelda-like)
4
+ kind: genre
5
+ tags: [action-adventure, zelda, top-down, combat, telegraph, dungeon, readable]
6
+ summary: Readable combat and gated dungeons — enemies that tell you what they'll do, a hit that feels like it landed, and keys that turn the map into a lock.
7
+ use-when: Designing a top-down game of reactive melee combat woven with light puzzle-gating and exploration.
8
+ composes-with: [system-telegraphs, system-combat-model, system-enemy-archetypes, system-encounter-design, system-boss-design, system-grace]
9
+ anchors: [anchor-shadow-of-mordor, anchor-dead-cells]
10
+ verify-with: docs/FUN.md#4--top-down-action-adventure-zelda-like
11
+ ---
12
+
13
+ # Top-down Action-Adventure (Zelda-like)
14
+
15
+ **What it is.** A top-down world of rooms and dungeons. You fight readable
16
+ enemies with a small verb set (attack, dodge, a tool or two), collect keys and
17
+ items that open the map, and best set-piece bosses. Combat is *reactive*: the
18
+ enemy shows its intent, you answer.
19
+
20
+ **Player fantasy / why it's fun.** *"I read that and beat it."* The satisfaction
21
+ of watching a wind-up, recognising it, and punishing it — plus the steady drip of
22
+ a new tool that reframes every room you've seen.
23
+
24
+ ## Pillars
25
+
26
+ 1. **Readable threat.** Every attack telegraphs — a flash, a wind-up, a
27
+ ~0.45s tell — long enough to react. Reactive play is only possible if the
28
+ threat is *legible* (FUN.md §4). [[system-telegraphs]].
29
+ 2. **The hit has weight.** Hit-stop, i-frames, knockback — a landed blow *feels*
30
+ landed. But hit-stop must buffer inputs through its freeze or attacks
31
+ "randomly" vanish ([[system-combat-model]], FUN.md law 5/§4).
32
+ 3. **The map is a lock.** Keys, switches, and items gate progress; a dungeon is a
33
+ spatial puzzle whose solution is the tool you find inside it.
34
+
35
+ ## The loop stack
36
+
37
+ | Scale | The loop |
38
+ |---|---|
39
+ | **Moment** | Read a wind-up → dodge or block → punish in the recovery window. Sub-second. |
40
+ | **Encounter** | A room of mixed [[system-enemy-archetypes]] — clear it by exploiting each one's tell. |
41
+ | **Session** | A dungeon: rooms + a keyed lock puzzle + the tool that solves it + the boss that tests the tool. |
42
+ | **Meta** | New tools reopen the overworld; hearts/upgrades and secrets reward exploration. |
43
+
44
+ ## Essential systems
45
+
46
+ | System | Why it's needed |
47
+ |---|---|
48
+ | [[system-telegraphs]] | Pillar 1. The wind-up window is the entire fairness contract of reactive combat. |
49
+ | [[system-combat-model]] | Defines the hit — damage, hit-stop, i-frames, knockback — and the input-buffer-through-freeze rule. |
50
+ | [[system-enemy-archetypes]] | A legible alphabet (skirmisher/artillery/tank/swarm) so rooms compose meaning, not noise. |
51
+ | [[system-encounter-design]] | Rooms as compositions of archetypes; pressure and pockets, clear exit lanes. |
52
+ | [[system-boss-design]] | The dungeon's set-piece; phases and telegraphs that test the dungeon's tool. |
53
+ | [[system-grace]] | I-frames on dodge, hit-stop buffering, wound-before-death — the reactive-combat grace canon. |
54
+
55
+ ## Content & difficulty model
56
+
57
+ - **Telegraph budget first.** Fix the tell duration (~0.45s baseline) and derive
58
+ enemy density from it — enough space to read every threat that's live at once.
59
+ Overlapping unreadable tells are the genre's core unfairness.
60
+ - **Keep exit lanes clear.** Cover or pillars in a door row/column is a softlock —
61
+ the containment/exit-lane rule (FUN.md §4). Author door lanes obstacle-free.
62
+ - **Escalate by combining archetypes, not by inflating stats.** A skirmisher +
63
+ artillery pair is harder — and more interesting — than a bigger-HP skirmisher.
64
+ See [[system-encounter-design]].
65
+ - **Gate honestly.** Dungeon locks should be solvable with the tools available
66
+ inside; the item you find is the intended key. Prove door gates open only when
67
+ their key is held (both ways).
68
+
69
+ Reference wiring: [`examples/gleamvale`](../../examples/gleamvale) — the top-down
70
+ steering + hunt-and-slash combat bot (walk, fight, telemetry: win time, hp floor,
71
+ 0 deaths). Grep [`docs/API.md`](../../docs/API.md) for the hit-stop / i-frame /
72
+ particle primitives before citing them.
73
+
74
+ ## Signature-mechanic seeds
75
+
76
+ "X but Y" ([[process-the-twist]]) — bend the *tool*, the *enemy memory*, or *time*.
77
+
78
+ - **Zelda but every enemy remembers your last fight** — the nemesis bend: a foe
79
+ you fled comes back scarred and cocky. (mechanic-swap — see [[anchor-shadow-of-mordor]])
80
+ - **Zelda but your weapon is also your key** — the sword that opens the door is the
81
+ one you fight with; upgrading it re-gates the map. (mechanic-swap)
82
+ - **Zelda but time only moves when you do** — a Superhot dungeon; telegraphs freeze
83
+ between your steps. (constraint)
84
+ - **Zelda but you can only hold one tool at a time** — the loadout swap *is* the
85
+ dungeon puzzle. (constraint)
86
+ - **Zelda but the dungeon is a single boss's body** — rooms are organs; the tool
87
+ you find disables one. (theme + structure)
88
+
89
+ ## Common pitfalls
90
+
91
+ - **Unreadable combat.** Too many simultaneous tells, tells too short, or no tell
92
+ at all → the player can't play reactively, only spam. Budget telegraphs first.
93
+ - **Weightless hits.** No hit-stop/knockback/i-frames → combat feels like poking
94
+ fog. And hit-stop *without* input buffering eats attacks — buffer through the
95
+ freeze (FUN.md §4).
96
+ - **Softlocking door lanes.** Cover in an exit row can trap the player with a live
97
+ enemy. Keep lanes clear.
98
+ - **Dungeons that are combat corridors.** Without the lock-and-key layer it's a
99
+ beat-'em-up wearing a map. The *puzzle* of the dungeon is half the genre.
100
+ - **Stat-inflation difficulty.** Bigger numbers aren't harder, they're slower.
101
+ Combine archetypes instead.
102
+
103
+ ## Anchors
104
+
105
+ - [[anchor-shadow-of-mordor]] — the nemesis system; systemic enemy memory that
106
+ personalises the overworld's threats.
107
+ - [[anchor-dead-cells]] — tight, weighty top-down/side melee feel and the
108
+ tool-as-key unlock loop.
109
+
110
+ ## Verify
111
+
112
+ Prove it with **[FUN.md §4 · Action-adventure](../../docs/FUN.md#4--top-down-action-adventure-zelda-like)** —
113
+ kiting-bot telemetry (win time, hp floor comfortable, 0 deaths); door gate proven
114
+ both ways; containment every frame; hit-stop buffers inputs through the freeze.
115
+ Design the readable fight here; prove it fair there.
116
+
117
+ ## Composes with
118
+
119
+ - [[system-telegraphs]] — the readability pillar made mechanical.
120
+ - [[system-combat-model]] — the shape and weight of a hit.
121
+ - [[system-emergent-systems]] — nemesis-style memory turns fights into rivalries.
122
+
123
+ ## See also
124
+
125
+ - [`examples/gleamvale`](../../examples/gleamvale) — the top-down combat bot + feel.
126
+ - [`docs/FUN.md §4`](../../docs/FUN.md#4--top-down-action-adventure-zelda-like) — the proof playbook.
@@ -0,0 +1,121 @@
1
+ ---
2
+ id: genre-auto-battler
3
+ title: Auto-Battler
4
+ kind: genre
5
+ tags: [auto-battler, autochess, prep-then-watch, economy, synergy, positioning, rounds, shared-pool]
6
+ summary: Prep-then-watch — spend an economy on units, position and synergise them, then watch the round resolve itself.
7
+ use-when: The design is a prep-phase-then-auto-combat game (autochess-like): economy + positioning + synergy across rounds.
8
+ composes-with: [system-economy, system-build-diversity, system-unit-rosters, system-counter-systems, system-reward-schedules]
9
+ anchors: [anchor-loop-hero]
10
+ verify-with: docs/FUN.md#12-·-turn-based-tactics
11
+ ---
12
+
13
+ # Auto-Battler
14
+
15
+ **What it is.** In a prep phase you buy units from a shared pool, arrange them, and
16
+ stack synergies; then combat resolves *without your input* and you watch your build
17
+ prove itself. Win or lose the round, adjust, and buy again. **Extension** beyond
18
+ FUN.md's 21 genres.
19
+
20
+ **Player fantasy.** *"I built the machine; now I watch it work."* The pleasure of
21
+ composition — of finding the synergy that snowballs — plus the tension of a fight
22
+ you set up but can no longer touch.
23
+
24
+ ## Pillars
25
+
26
+ 1. **Prep is the game; combat is the reveal.** All agency lives in the shop and the
27
+ board. The auto-resolved fight is *feedback on a decision*, choreographed, not a
28
+ thing you play. (This is law 6 taken literally: the sim resolves, the view replays.)
29
+ 2. **Economy is the spine.** Gold, interest, roll-vs-save, level-vs-power — the
30
+ push-your-luck of the shop is where skill lives. Faucets and sinks must breathe.
31
+ 3. **Synergy over stats.** Power comes from combinations (traits, tiers, positions),
32
+ so many builds stay viable and no single unit is a solve.
33
+
34
+ ## The loop stack
35
+
36
+ | Scale | The beat |
37
+ |---|---|
38
+ | **Moment** | Buy / sell / reroll / reposition one unit; a shop decision. |
39
+ | **Encounter** | One round: prep, then the auto-fight resolves and scores the build. |
40
+ | **Session** | A match: survive rounds vs a ladder/opponents until one economy wins. |
41
+ | **Meta** | Unlocked rosters/traits/heroes; MMR; the meta-of-comps players learn. |
42
+
43
+ ## Essential systems
44
+
45
+ | System | Why it's load-bearing |
46
+ |---|---|
47
+ | [[system-economy]] | Gold, interest, and the roll-vs-save tension are the primary decision layer. |
48
+ | [[system-build-diversity]] | Many viable comps is the replay engine; synergy makes builds, not stats. |
49
+ | [[system-unit-rosters]] | A legible roster of roles/tiers is what players draft and read. |
50
+ | [[system-counter-systems]] | Comp-vs-comp near-hard counters keep the meta from converging on one build. |
51
+ | [[system-reward-schedules]] | The shared-pool draw and reroll are variable-ratio; tune the odds. |
52
+
53
+ ## Content & difficulty model
54
+
55
+ - **The shared pool is a constraint, not a faucet.** Contested units mean your comp
56
+ affects opponents' options; model the pool as finite (draining it is a real play).
57
+ - **Balance is a win-rate window over comps**, borrowing the deckbuilder instrument:
58
+ no comp should win too often or never — assert a band, and check both edges break.
59
+ - **Economy solvency is a law-3 inequality.** Interest breakpoints, level costs, and
60
+ round income must let a disciplined build power-spike on schedule; state and assert
61
+ the payback curve so no tier strangles the mid-game.
62
+ - **Positioning must matter provably.** The same units in a bad formation must lose
63
+ to the same units well-placed — that's the proof the board is a real decision.
64
+
65
+ ## Signature-mechanic seeds
66
+
67
+ - **Autochess *but* you place units on a hero's looping path and combat auto-runs
68
+ as they walk it** — the board becomes a track (structure; the Loop Hero bend,
69
+ composes [[anchor-loop-hero]]).
70
+ - **Auto-battler *but* the shared pool is literally shared — one deck, drafted
71
+ competitively** (constraint; sharpens [[system-counter-systems]] denial).
72
+ - **Auto-battler *but* you can interrupt the fight once, at a cost** — a single
73
+ spent moment of agency in a watch-only genre (mechanic-swap; [[pattern-risk-reward]]).
74
+ - **Auto-battler *but* co-op: two players share one economy and one board**
75
+ (structure; composes [[genre-coop-chaos]], [[system-coop-and-competition]]).
76
+ - **Auto-battler *but* units level by *surviving* rounds, not by gold** — the board
77
+ is a persistent roster you nurture (mechanic-swap; composes [[system-progression]]).
78
+
79
+ ## Common pitfalls
80
+
81
+ - **Dominant comp.** If one synergy wins regardless, build diversity is a lie; the
82
+ win-rate window catches it — widen counters, not nerf-hammer a single unit.
83
+ - **Economy with no tension.** If saving always beats rolling (or vice versa), the
84
+ core decision evaporates. Interest and power-spikes must trade off honestly.
85
+ - **Combat you must watch but can't read.** If the auto-fight is illegible, players
86
+ can't learn from the reveal. Choreograph it so the *reason* a build won is visible.
87
+ - **Non-deterministic resolution.** The fight must be a pure function of board +
88
+ `world.rng` seed; then goldens, clone-and-score comp bots, and replays are free
89
+ (FUN.md law 7). No `Math.random` in the fight.
90
+
91
+ ## Anchors
92
+
93
+ - [[anchor-loop-hero]] — composing placement + auto-combat + deck into one novel
94
+ loop; the reference for "arrange, then watch it resolve."
95
+
96
+ ## Verify — extension note
97
+
98
+ Auto-battler is an **extension**; with no dedicated FUN.md section it *composes its
99
+ parents' verify patterns*:
100
+
101
+ - **Auto-resolved combat honesty** → [FUN.md §12 — Tactics](../../docs/FUN.md#12-·-turn-based-tactics):
102
+ the fight is a pure sim returning choreography; 1-ply/clone-and-score comp bots are
103
+ real baselines; golden end-state per board. **This is the primary proof.**
104
+ - **Draft/economy balance** → [FUN.md §11 — Deckbuilder](../../docs/FUN.md#11-·-roguelike-deckbuilder):
105
+ win-rate *window* over comps; a "never-synergise" pilot loses well below it.
106
+ - **Pacing solvency** → [FUN.md §14 — Incremental](../../docs/FUN.md#14-·-incrementalidle):
107
+ assert flat-ish payback curves across economy tiers; no power desert.
108
+ - Determinism and cosmetic-view (laws 6–7) apply unchanged — the watch phase is the
109
+ clearest case of "sim resolves, view replays."
110
+
111
+ ## Composes with
112
+
113
+ - [[system-economy]] — the shop is the game; borrow its faucet/sink and interest tuning.
114
+ - [[system-build-diversity]] — synergy space is the replay value.
115
+ - [[system-counter-systems]] — comp-vs-comp counters keep the meta honest.
116
+
117
+ ## See also
118
+
119
+ - [`docs/FUN.md`](../../docs/FUN.md) §11–12 — the deckbuilder window + tactics
120
+ clone-and-score bots this genre borrows wholesale.
121
+ - [[anchor-loop-hero]] — the three-genre composition reference.
@@ -0,0 +1,123 @@
1
+ ---
2
+ id: genre-bullet-hell
3
+ title: Bullet Hell
4
+ kind: genre
5
+ tags: [bullet-hell, shmup, danmaku, patterns, dodging, boss, density]
6
+ summary: Screen-filling patterns that read as motion, not noise — dodging is trivial, holding fire lanes under a boss is the skill.
7
+ use-when: You want a reflex game where the fantasy is threading a wall of bullets that looks impossible but is fair.
8
+ composes-with: [system-telegraphs, system-boss-design, system-difficulty-and-dda, system-grace, genre-horde-survival]
9
+ anchors: [anchor-nuclear-throne]
10
+ verify-with: docs/FUN.md#7--bullet-hell
11
+ ---
12
+
13
+ # Bullet Hell
14
+
15
+ **What it is.** A shoot-'em-up where the screen fills with **coherent bullet
16
+ patterns** the player threads on foot. The bullets are the level; your hitbox is
17
+ a single pixel; the whole game is *reading density as motion*.
18
+
19
+ **Player fantasy / why it's fun.** *"I walked through a wall of death and it was
20
+ gorgeous."* Danmaku turns raw panic into a dance — a pattern that looks
21
+ unsurvivable resolves into one obvious gap you slide through at the last frame.
22
+
23
+ ## Pillars
24
+
25
+ 1. **Density that reads.** Every pattern is a legible shape (spiral, aimed
26
+ spread, wall-with-gap). Difficulty comes from *tighter gaps and faster
27
+ waves*, never from noise. Density ≠ difficulty.
28
+ 2. **The gap is always there.** Fairness is provable: a greedy lookahead dodger
29
+ clears deathless. If the bot can't survive, humans die *unfairly* — that's a
30
+ bug, not challenge.
31
+ 3. **Uptime is the game.** Dodging is trivial; the skill is holding your fire
32
+ lane on the boss *while* dodging. Reward aggression under pressure.
33
+
34
+ ## The loop stack
35
+
36
+ | Scale | The beat |
37
+ |---|---|
38
+ | **Moment** | Read the next wave's shape → slide into its gap → keep firing. |
39
+ | **Encounter** | A boss's pattern sequence: phases escalate; each phase teaches its gap before it speeds up. |
40
+ | **Session** | A stage: trash waves as breathers, midboss, boss. Graze/point economy rewards flying close. |
41
+ | **Meta** | Score chase, unlock ships/patterns, difficulty tiers (easy = wider gaps, same shapes). |
42
+
43
+ ## Essential systems
44
+
45
+ | System | Why it's load-bearing |
46
+ |---|---|
47
+ | [[system-telegraphs]] | Every pattern's spawn point and direction must be readable *before* it's lethal — the tell is the fairness. |
48
+ | [[system-boss-design]] | The boss IS the content; phases are the difficulty ramp. Spectacle + honest tells. |
49
+ | [[system-grace]] | Mercy clears on death and at phase transitions are **structural** — without them deaths cascade (FUN.md law 5). |
50
+ | [[system-difficulty-and-dda]] | Difficulty tiers = wider gaps / slower bullets on the *same* patterns, not new ones. |
51
+ | [[pattern-readability]] | Player bullets, enemy bullets, and the tiny hitbox must never blur together. |
52
+
53
+ ## Content & difficulty model
54
+
55
+ - **Pattern library, not level data.** Author reusable emitters (spiral, ring,
56
+ aimed n-spread, wall-with-moving-gap) parameterised by rate/speed/count.
57
+ Stages are *sequences* of patterns; difficulty is the parameters.
58
+ - **Ramp by geometry.** Widen or narrow the gap chord; speed up bullets; overlap
59
+ two patterns. Cap peak on-screen bullet count and assert it — a spike past the
60
+ budget is a frame-rate cliff, not difficulty.
61
+ - **Breathers are structural.** Trash waves and post-boss lulls let the player
62
+ reset. A stage that never breathes reads as noise.
63
+ - **Verify the gap exists.** The greedy dodge bot must clear every stage
64
+ deathless before you tune numbers — see [[system-difficulty-and-dda]] and the
65
+ verify link below.
66
+
67
+ ## Signature-mechanic seeds
68
+
69
+ - **Bullet hell but you place the bullets** *(mechanic-swap)* — a reverse shmup:
70
+ you author the enemy's next pattern from a hand, then dodge your own design.
71
+ - **Bullet hell but time only moves when you do** *(constraint)* — SuperHot for
72
+ danmaku; density becomes a spatial puzzle instead of a reflex test.
73
+ - **Bullet hell but the gap is drawn in ink** *(theme + tonal)* — Kentō
74
+ woodblock; every wave is a brushstroke, grazing "wets" the paper for score.
75
+ - **Bullet hell but co-op share one hitbox** *(perspective)* — two players, one
76
+ ship's life pool; threading requires reading each other. Pairs
77
+ [[system-coop-and-competition]].
78
+ - **Bullet hell but bullets are the platform** *(mechanic-swap)* — stand *on*
79
+ slow bullets to reach the boss; movement and dodging invert.
80
+
81
+ Pick one and let it ripple: a strong bullet-hell twist changes the *scoring
82
+ economy* (what grazing means), the *pattern authoring* (who places the bullets),
83
+ or the *hitbox itself* — not just the skin. See [[process-the-twist]].
84
+
85
+ ## Common pitfalls
86
+
87
+ - **Noise mistaken for depth.** More bullets ≠ harder; unreadable ≠ challenging.
88
+ If a death feels random, the pattern didn't telegraph.
89
+ - **No mercy on death.** Reviving into a live pattern chains deaths — always
90
+ clear the screen and grant i-frames (law 5).
91
+ - **Hitbox lies.** If the visible sprite is the hitbox, players die to grazes
92
+ that looked clear. Hitbox must be a tiny, honest sub-pixel.
93
+ - **Passive is optimal.** If parking in a corner survives, uptime isn't rewarded
94
+ — pull the player forward with graze/point economy.
95
+ - **Difficulty tiers are new patterns.** An "easy" mode that swaps in different
96
+ shapes doubles your authoring and splits your proofs. Same patterns, wider
97
+ gaps — one library, many tunings ([[system-difficulty-and-dda]]).
98
+
99
+ ## Anchors
100
+
101
+ - [[anchor-nuclear-throne]] — arcade twin-stick reflex mastery; the tight
102
+ run-based loop and readable enemy fire translate straight to danmaku.
103
+ - [[genre-horde-survival]] — the sibling "rising tide" genre; borrow its
104
+ density-that-reads discipline, swap auto-attack for manual dodge.
105
+
106
+ ## Verify
107
+
108
+ Prove it in **[FUN.md §7 · Bullet hell](../../docs/FUN.md#7--bullet-hell)**: the
109
+ greedy lookahead dodge bot clears deathless, peak-bullet count is asserted, and
110
+ the per-step time budget holds.
111
+
112
+ ## Composes with
113
+
114
+ - [[system-telegraphs]] — the tell that makes a wall of bullets fair.
115
+ - [[system-boss-design]] — the phased set-piece that is the whole encounter.
116
+ - [[system-grace]] — mercy clears and i-frames as structure, not polish.
117
+
118
+ ## See also
119
+
120
+ - [`sandboxes/particle-studio`](../../sandboxes/particle-studio) — emitter and
121
+ pooled-sprite wiring for cheap on-screen bullet mass.
122
+ - [docs/JUICE.md](../../docs/JUICE.md) — graze feedback, hit-stop, screen-clear
123
+ flash as choreography (cosmetic, law 6).