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,106 @@
1
+ ---
2
+ id: anchor-shadow-of-mordor
3
+ title: Shadow of Mordor
4
+ kind: anchor
5
+ tags: [nemesis, emergent, systemic-memory, rivalry, procedural-narrative, personalization]
6
+ summary: The nemesis system — a systemic hierarchy of enemies that remember you, rise from your failures, and become personalized rivals no writer scripted.
7
+ use-when: The design wants antagonists (or allies) that persist, remember player history, and generate personal stories from systemic memory.
8
+ composes-with: [genre-action-adventure, system-emergent-systems, system-enemy-ai, system-progression, pattern-emergence]
9
+ anchors: []
10
+ verify-with: docs/FUN.md#4-top-down-action-adventure-zelda-like
11
+ ---
12
+
13
+ # Shadow of Mordor
14
+
15
+ **What it is.** An open-world action game remembered for one thing: the **nemesis
16
+ system**. Instead of interchangeable enemies, a **procedural hierarchy** of named
17
+ captains *remembers* every encounter — the orc who killed you gets promoted and
18
+ taunts you by name; the one you scarred returns disfigured and afraid. Kill,
19
+ fail, or spare them and the power structure *rewrites itself*, authoring rivalries
20
+ no writer wrote.
21
+
22
+ **Player fantasy.** *Your* enemies, with *your* history. The pull is personal: an
23
+ orc you barely escaped becomes a boss you *need* to settle, and the game remembers
24
+ the whole grudge — the scar you gave him, the time he humiliated you. Emergent,
25
+ personalized drama beats any scripted villain because it happened to *you*.
26
+
27
+ ## Design DNA
28
+
29
+ The engine is **systemic memory turned into personality**. Three parts. First, a
30
+ **living hierarchy**: a roster of named agents with ranks, traits, and
31
+ relationships that persists and reshuffles ([[system-emergent-systems]]). Second,
32
+ **memory of the player**: every meaningful interaction (a death, a wound, a flee)
33
+ is *recorded on the agent* and *surfaced later* — the orc references it. Third,
34
+ **player actions rewrite the structure**: killing a captain promotes a rival, and
35
+ the graph reconfigures. The result is procedural narrative: the *system*
36
+ generates the story, and personalization (names, scars, callbacks) makes it feel
37
+ authored. This is the same family as [[anchor-rimworld]]'s director, aimed at
38
+ *rivals* instead of crises.
39
+
40
+ ## Load-bearing structures
41
+
42
+ | Structure | Why it works |
43
+ |---|---|
44
+ | **Named agents with persistent identity** | Enemies are individuals with names, traits, and ranks, not spawns — the prerequisite for any personal story. → [[system-emergent-systems]]. |
45
+ | **Memory of player history** | Each agent records interactions (who killed whom, who fled) and *surfaces* them later ("you ran last time") — recognition is the magic. |
46
+ | **A hierarchy that rewrites** | Killing/promoting reshuffles ranks; the world's power structure responds to your actions. → [[pattern-feedback-loops]]. |
47
+ | **Traits generating behaviour & flavour** | Fears, strengths, and quirks drive both combat (exploit the fear) and dialogue (colour the taunt). → [[system-enemy-ai]]. |
48
+ | **Callbacks / recognition** | The system *voices* its memory back at you — the moment "he remembers me" lands is where the fantasy pays off. |
49
+ | **Systemic stakes** | Rivalries you built are the goals; you set your own targets from the emergent web. → [[pattern-emergence]]. |
50
+
51
+ ## What to steal
52
+
53
+ - **Give enemies persistent identity + memory**: even a lightweight
54
+ name+trait+"last interaction" record turns spawns into rivals. This is the whole
55
+ trick, and it's cheaper than it looks. → [[system-emergent-systems]].
56
+ - **Surface the memory back at the player**: recognition ("you fled from me
57
+ before") is where the emergence *becomes felt*. Record *and* replay.
58
+ - **Let player actions rewrite the structure**: kills promote, defeats scar,
59
+ mercies create allies — a graph that responds makes the world feel alive.
60
+ - **Traits do double duty**: one trait drives both a combat exploit and a
61
+ personality beat — mechanics and story from the same data. → [[pattern-emergence]].
62
+
63
+ ## What's just theme (drop it)
64
+
65
+ - The **Tolkien/orc fiction** — the nemesis system is medium- and
66
+ genre-agnostic: rival racers, court factions, corporate rivals, roguelike
67
+ bosses. → [[world-theme-vectors]].
68
+ - The **AAA open-world combat** — the memory system is separable; it can ride a
69
+ card game, a roguelike, a tactics game. It's data, not spectacle.
70
+ - **Full voice acting** — flavour text assembled from traits achieves the callback
71
+ effect at a fraction of the cost.
72
+ - **The specific rank ladder** — captains/warchiefs is one hierarchy shape; any
73
+ reshuffling structure (a bracket, a court, a leaderboard) works.
74
+
75
+ ## Composes into
76
+
77
+ - [[genre-action-adventure]] — the parent action genre it shipped on (readable
78
+ combat; door/containment proofs).
79
+ - [[system-emergent-systems]] — the canonical *nemesis/systemic-memory* case; this
80
+ anchor is its combat-rival exemplar (RimWorld is its crisis-director exemplar).
81
+ - [[system-enemy-ai]] — traits driving behaviour and exploitable weaknesses.
82
+ - [[system-progression]] — rivals rise as you do; the ladder is a difficulty curve.
83
+ - [[pattern-emergence]] — story from a few interacting rules over persistent agents.
84
+
85
+ ## Twist seams
86
+
87
+ - **Nemesis but for allies** *(perspective / tonal)* — a system of companions who
88
+ remember your kindnesses and grow loyal or resentful; systemic friendship, not
89
+ rivalry. Pairs with [[genre-narrative-decisions]].
90
+ - **Nemesis but turn-based / roguelike** *(structure)* — bosses that persist
91
+ *across runs*, remembering how you beat them last time and adapting. Pairs with
92
+ [[system-meta-progression]].
93
+ - **Nemesis but the memory is the mechanic you fight** *(mechanic-swap)* — enemies
94
+ literally learn your patterns and counter them; the twist is out-thinking a
95
+ system that studies you.
96
+ - **Nemesis but at empire scale** *(scale)* — rival *nations* remember your
97
+ treaties and betrayals; systemic memory as diplomacy. Pairs with
98
+ [[anchor-civilization]].
99
+
100
+ ## See also
101
+
102
+ - [`docs/FUN.md#4-top-down-action-adventure-zelda-like`](../../docs/FUN.md) —
103
+ readable telegraphs; hit-stop buffering; containment every frame — the combat
104
+ substrate the nemesis roster fights on.
105
+ - [[system-emergent-systems]] · [[anchor-rimworld]] (the crisis-director sibling) ·
106
+ [[pattern-emergence]].
@@ -0,0 +1,127 @@
1
+ ---
2
+ id: anchor-slay-the-spire
3
+ title: Slay the Spire
4
+ kind: anchor
5
+ tags: [deckbuilder, roguelike, draft, map-choice, synergy, deck-thinning, run-based]
6
+ summary: The roguelike deckbuilder — every card is a draft-of-3-or-skip, every fight thins or thickens your deck, and the map is a route of risk you choose in advance.
7
+ use-when: Designing a run where the player's growing toolkit (a deck) IS the strategy, refined choice by choice against escalating threats.
8
+ composes-with: [genre-deckbuilder, system-build-diversity, system-procgen-design, system-reward-schedules]
9
+ anchors: [anchor-slay-the-spire]
10
+ verify-with: docs/FUN.md#11-·-roguelike-deckbuilder
11
+ ---
12
+
13
+ # Slay the Spire
14
+
15
+ **What it is.** Climb a branching map, fighting turn-based card battles. After
16
+ each fight, draft one card of three (or skip). Your deck is your build; the
17
+ run is one long refinement of it against enemies whose damage you can read in
18
+ advance.
19
+
20
+ **Player fantasy / why it's fun.** *I am sculpting a machine and watching it
21
+ come alive.* The pull is **the deck as an evolving strategy**: a pile of weak
22
+ cards slowly becomes an engine, and the moment two cards click into a combo is
23
+ the whole genre's dopamine. Every choice — which card, which path, which relic
24
+ — compounds.
25
+
26
+ ## Design DNA
27
+
28
+ Make **the growing toolkit the game**. The player doesn't level a character;
29
+ they *curate a deck*, and every reward is a fork: take this card (and dilute
30
+ your draw) or skip it (and stay lean). Wrap that in a **route of pre-visible
31
+ risk** — a branching map where you choose your fights, elites, shops, and
32
+ rests before you take them — and escalating enemies whose intents are *shown*,
33
+ so losing is a planning failure, not a coin flip.
34
+
35
+ The magic is **subtractive as well as additive**: a good deck is often a
36
+ *small* deck. Thinning is a strategy, not just adding. This is the
37
+ counter-intuitive core — most progression systems only grow, so "the reward
38
+ you decline" and "the card you delete" are dead concepts. Slay the Spire makes
39
+ *both* live decisions: the skip has teeth because every card you add dilutes
40
+ the odds of drawing the ones you already want, and card-removal at shops is
41
+ often the strongest purchase. Power is a function of *consistency*, and
42
+ consistency is a function of *restraint*.
43
+
44
+ Every layer — the draft, the map, the relics, the energy budget — is a
45
+ decision made against *incomplete future information but perfect present
46
+ information*. You never know the next reward, but you always know exactly what
47
+ this fight will do.
48
+
49
+ ## Load-bearing structures
50
+
51
+ | Structure | Why it works |
52
+ |---|---|
53
+ | **Draft-of-3-with-skip** | Every reward is a real decision — including the decision to *not* dilute. The skip is what makes drafting have teeth. FUN.md truth. [[system-reward-schedules]]. |
54
+ | **Deck as build; thinning matters** | Power comes from *composition*, not stats. Removing weak cards is as strong as adding good ones. [[system-build-diversity]]. |
55
+ | **Pre-visible branching map** | You choose the route (elite for a relic? shop? rest?) before committing — [[pattern-risk-reward]] made spatial. [[system-procgen-design]]. |
56
+ | **Telegraphed enemy intents** | Each enemy shows next-turn damage/effect; combat is a solvable puzzle, not a gamble. Intent honesty is CI (FUN.md). [[system-telegraphs]]. |
57
+ | **Relics = passive multipliers** | Persistent modifiers that warp the whole run's math and reward committing to an archetype. [[pattern-emergence]]. |
58
+ | **Energy as the real constraint** | Cards are cheap; the per-turn energy budget forces every hand into a small optimisation. [[system-economy]]. |
59
+ | **Win-rate window as the balance instrument** | Tune to a band (e.g. 11–19/20), not a point — both "too hard" and "too easy" break CI. |
60
+
61
+ ## What to steal
62
+
63
+ - **Draft-of-N *with a skip*.** The skip converts "free reward" into
64
+ "meaningful decision." Steal this into any progression, not just cards.
65
+ - **Make composition the power, and let subtraction be a strategy.** A leaner
66
+ deck/loadout should sometimes beat a bigger one.
67
+ - **A pre-visible route of risk.** Show the map's fights/rewards ahead; make
68
+ the player commit to a path. This is portable to any run structure.
69
+ - **Telegraphed intents** so every fight is solvable. Assert intent honesty as
70
+ a one-line audit (FUN.md).
71
+ - **Balance to a win-rate window** (e.g. 11–19/20), not a point — both edges
72
+ break CI, since "too easy" is as broken as "too hard." Assert the draft
73
+ delta: same pilot drafting-off must lose far more (FUN.md's 17→9).
74
+ - **A per-turn budget (energy) as the real constraint.** Cards being cheap to
75
+ acquire but limited to play per turn means every hand is a small
76
+ optimisation puzzle — the budget, not the card pool, is where tactical depth
77
+ lives. See [[system-economy]].
78
+
79
+ ## What's just theme (drop it)
80
+
81
+ - **The spire / the Ironclad-Silent-Defect fiction.** Cosmetic; the loop is
82
+ theme-agnostic.
83
+ - **Playing *cards* specifically.** The structure is "draft-refine a personal
84
+ toolkit of single-use actions." It could be spells, dishes, dance moves —
85
+ see [[system-build-diversity]].
86
+ - **The relic art and names.** *Passive run-warping modifiers* is structural;
87
+ the trinkets are flavour.
88
+ - **Fantasy monsters.** Any enemy that can *show its next move* satisfies the
89
+ telegraph truth — [[system-telegraphs]].
90
+
91
+ ## Composes into
92
+
93
+ - [[genre-deckbuilder]] — its canonical anchor; the draft-refine loop lives
94
+ there.
95
+ - [[system-build-diversity]] — deck-as-build with meaningful thinning.
96
+ - [[system-procgen-design]] — the branching, pre-visible map.
97
+ - [[system-reward-schedules]] — draft-of-3-with-skip cadence.
98
+ - [[system-telegraphs]] — intent-driven, solvable combat.
99
+
100
+ ## Twist seams
101
+
102
+ - **Slay the Spire but the deck is shared and you draft *against* an
103
+ opponent** *(perspective)* — every skip becomes a card denied to them; the
104
+ route is a contested board. Pushes toward [[system-coop-and-competition]].
105
+ - **Slay the Spire but the map is the deck** *(mechanic-swap)* — you draft
106
+ *rooms* onto a path and then walk them; placement is the build. This is the
107
+ [[anchor-loop-hero]] bend.
108
+ - **Slay the Spire but you can only ever hold 10 cards — every add forces a
109
+ cut** *(constraint)* — makes thinning mandatory, not optional; the whole run
110
+ is a rolling replace-decision. Sharpens the subtractive pillar into the core
111
+ verb.
112
+ - **Slay the Spire but tonal — the deck is a diplomatic hand and fights are
113
+ negotiations** *(tonal)* — recolor combat as conversation; "damage" is
114
+ persuasion, "block" is patience, intents are the other party's next
115
+ argument. Keeps the draft-refine spine, swaps violence for stewardship.
116
+ Pairs with [[genre-narrative-decisions]].
117
+
118
+ ## See also
119
+
120
+ - [[genre-deckbuilder]] · [[anchor-balatro]] · [[anchor-loop-hero]] ·
121
+ [[system-telegraphs]]
122
+ - `docs/FUN.md#11-·-roguelike-deckbuilder` — win-rate window + draft-delta +
123
+ intent audit.
124
+ - `examples/lanternfold/` — generated, all-channels reference (drafted content
125
+ pipeline).
126
+ - `sandboxes/procgen-lab/` — `Rng`/`pickEntry` for weighted card & map
127
+ generation.
@@ -0,0 +1,98 @@
1
+ ---
2
+ id: anchor-starcraft
3
+ title: StarCraft
4
+ kind: anchor
5
+ tags: [rts, asymmetry, faction, balance, macro, micro, matchup]
6
+ summary: The gold standard of RTS faction asymmetry — three rosters that share almost no units yet balance across every matchup because each expresses one clear identity.
7
+ use-when: The design needs deeply different sides that still play fair; you're building faction identity, not palette-swaps.
8
+ composes-with: [genre-rts, system-faction-asymmetry, system-unit-rosters, system-counter-systems, system-mastery-curve]
9
+ anchors: []
10
+ verify-with: docs/FUN.md#9-rts-lite
11
+ ---
12
+
13
+ # StarCraft
14
+
15
+ **What it is.** An RTS whose reputation rests on one achievement: **three
16
+ factions that share almost nothing** — different units, different economy quirks,
17
+ different production models — yet stay balanced across all three matchups and
18
+ mirror matches. Terran, Zerg, Protoss aren't reskins; they're three *answers to
19
+ the same question* (how do I convert economy into a winning army?), and the
20
+ answers stay fair.
21
+
22
+ **Player fantasy.** You don't pick a colour, you pick an *identity* — the swarm
23
+ that drowns you in cheap bodies, the machine-precise army that trades up, the
24
+ elite few that each hit like a truck. Mastering a faction feels like learning a
25
+ language; the matchup is a conversation.
26
+
27
+ ## Design DNA
28
+
29
+ Asymmetry is a **promise about identity, balanced by a shared power budget**. Each
30
+ faction gets a distinct *fantasy* (swarm / tech / elite) and a distinct *texture*
31
+ (macro rhythm, unit feel), but every unit is priced against a common yardstick so
32
+ no faction's answer dominates. The magic is that **different but fair** multiplies
33
+ depth: three factions × three opponents = far more than three times the
34
+ strategies, because each matchup has its own logic. See
35
+ [[system-faction-asymmetry]] for the balancing discipline this demands.
36
+
37
+ ## Load-bearing structures
38
+
39
+ | Structure | Why it works |
40
+ |---|---|
41
+ | **One faction = one identity** | Zerg *are* the swarm; Protoss *are* few-and-elite. A one-word fantasy keeps every unit on-theme and legible. → [[world-faction-identity]]. |
42
+ | **Distinct production model per side** | Larva/hatch vs build-from-structure vs warp-in. The economy *feels* different, not just the units. |
43
+ | **Shared power budget** | Cheap-but-weak and expensive-but-strong cost out to the same value; asymmetry without a hidden best side. → [[system-faction-asymmetry]]. |
44
+ | **Matchup-specific logic** | ZvP ≠ ZvT ≠ PvT. Each pairing is its own puzzle; balance is per-matchup, not global. |
45
+ | **Counter web, not counter list** | Units soft-counter across factions; comp and timing decide fights, not a lookup table. → [[system-counter-systems]]. |
46
+ | **Macro/micro split as skill ceiling** | Economy management (macro) and unit control (micro) are separable skills; the ceiling is doing both at once. → [[system-mastery-curve]]. |
47
+
48
+ ## What to steal
49
+
50
+ - **Identity-first faction design**: write the one-word fantasy *before* the unit
51
+ list. Every unit must express it or it doesn't belong. → [[world-faction-identity]].
52
+ - **A shared power budget** as the balance instrument: price every asymmetric thing
53
+ against a common yardstick so "different" never means "better."
54
+ - **Per-matchup balance**, not global: verify each faction-vs-faction duel wins its
55
+ own NvN (FUN.md §9), including the mirror.
56
+ - **Separable macro/micro**: two skills the player improves independently gives a
57
+ long mastery curve with early wins available.
58
+
59
+ ## What's just theme (drop it)
60
+
61
+ - The **sci-fi fiction** — bugs vs marines vs psionic knights is one dressing of
62
+ swarm/tech/elite. Fantasy, historical, or abstract carries the same spine.
63
+ - **Exactly three** factions — three is a sweet spot (each matchup distinct,
64
+ still tractable), but the principle is "N identities on one budget," not the 3.
65
+ - **The specific units** — a Zergling is a delivery mechanism for "cheap swarm
66
+ body." The role matters; the sprite doesn't.
67
+ - **Hard-APM execution** — the *demand* for macro+micro is the ceiling; you can
68
+ raise it with automation without losing the strategic identity.
69
+
70
+ ## Composes into
71
+
72
+ - [[genre-rts]] — the parent genre; StarCraft is its asymmetry exemplar.
73
+ - [[system-faction-asymmetry]] — the home system; this anchor is its canonical
74
+ case study of "different but fair."
75
+ - [[system-unit-rosters]] — three legible rosters, each a clear set of roles.
76
+ - [[system-counter-systems]] — the cross-faction counter web.
77
+ - [[world-faction-identity]] — the fiction that makes each side feel distinct.
78
+
79
+ ## Twist seams
80
+
81
+ - **StarCraft but the factions are drafted mid-run** *(structure)* — roguelite:
82
+ each run you compose a roster from a pool, and the "faction" is your draft.
83
+ Pairs with [[system-build-diversity]].
84
+ - **StarCraft but one hero, not an army** *(perspective)* — you *are* a single
85
+ unit inside the swarm/machine/elite fantasy; the faction becomes a class.
86
+ - **StarCraft but no micro** *(constraint)* — armies auto-resolve; the whole game
87
+ is macro and comp. Pairs with [[genre-auto-battler]].
88
+ - **StarCraft but the third faction is the map** *(mechanic-swap)* — an
89
+ environmental "faction" (creep, weather, tide) plays against both players as a
90
+ neutral asymmetric force.
91
+
92
+ ## See also
93
+
94
+ - [`docs/FUN.md#9-rts-lite`](../../docs/FUN.md) — "strategy is the balance test";
95
+ every counter edge must win its NvN duel; flow-field mass pathing.
96
+ - [`sandboxes/pathfinding-demo`](../../sandboxes/pathfinding-demo) — wall-aware
97
+ mass movement the roster rides on.
98
+ - [[system-faction-asymmetry]] · [[anchor-age-of-empires]] (economy-first cousin).
@@ -0,0 +1,103 @@
1
+ ---
2
+ id: anchor-stardew-valley
3
+ title: Stardew Valley
4
+ kind: anchor
5
+ tags: [life-sim, farming, cozy, open-ended, compulsion-loop, calendar, progression]
6
+ summary: Gentle life sim whose pull is a calm compulsion loop — open-ended goals, a daily rhythm, and "one more day" pacing that never punishes.
7
+ use-when: The intent is a low-stress, open-ended progression game where the player sets their own goals and the loop is soothing, not tense.
8
+ composes-with: [genre-farming-sim, system-progression, system-collectibles, system-economy, system-session-structure]
9
+ anchors: []
10
+ verify-with: docs/FUN.md#15-farminglife-sim
11
+ ---
12
+
13
+ # Stardew Valley
14
+
15
+ **What it is.** A life sim with **no fail state and no forced goal**. You inherit a
16
+ farm and a town; a **daily loop** (wake, tend, forage, socialise, sleep) advances
17
+ a calendar of seasons and festivals. Progress is broad and **self-directed** —
18
+ farm, mine, fish, befriend, decorate — and every strand pays out on its own gentle
19
+ schedule. The genius is *calm compulsion*: "one more day" without pressure.
20
+
21
+ **Player fantasy.** A softer life you're quietly building. The pull isn't winning;
22
+ it's tending — a plot filling in, a friendship deepening, a collection nearing
23
+ complete. You always have three small things you *want* to do next, and none of
24
+ them can go badly.
25
+
26
+ ## Design DNA
27
+
28
+ The loop is **open-ended progression with a soft clock**. A day is a fixed budget
29
+ of time/energy; the calendar (seasons, crop timers, festivals) gives structure and
30
+ anticipation *without* threat. Many parallel goal-strands
31
+ ([[system-collectibles]], [[system-progression]]) mean the player always has a
32
+ choice and never a dead end — if farming stalls, go fish. The compulsion is
33
+ *variable-but-safe*: rewards come on legible timers, so you can always plan a
34
+ satisfying tomorrow. Crucially, **calendar arithmetic is a hard inequality**
35
+ (FUN.md §15): a season must be long enough to grow what it offers, or the calm
36
+ breaks into frustration.
37
+
38
+ ## Load-bearing structures
39
+
40
+ | Structure | Why it works |
41
+ |---|---|
42
+ | **Daily loop with a time/energy budget** | A fixed day forces gentle prioritisation; ending the day is a natural save/breather. → [[system-session-structure]]. |
43
+ | **Seasonal calendar** | Seasons gate crops and stage festivals — anticipation and rhythm without a threat clock. → [[system-progression]]. |
44
+ | **Parallel self-directed goals** | Farm/mine/fish/social/collect run in parallel; the player always has an appealing next thing and no dead end. → [[system-collectibles]]. |
45
+ | **No fail state** | You can't lose the farm; setbacks cost a day, never a run. The safety *is* the genre. → [[pattern-anti-frustration]]. |
46
+ | **Gentle solvency economy** | Plans that can come true: crop→sell→reinvest with margins that reward diligence, not optimisation. → [[system-economy]]. |
47
+ | **Relationship meters** | Slow, warm progress bars on townsfolk; social as a collectible you tend over seasons. → [[system-emergent-systems]]. |
48
+ | **Surfaced deadlines** | "Days left in season" is shown — the one number the player must plan around. (FUN.md §15). |
49
+
50
+ ## What to steal
51
+
52
+ - The **no-fail soft clock**: a calendar that gives rhythm and anticipation while
53
+ *nothing can go badly*. This is the mood engine; guard it above all.
54
+ - **Parallel goal-strands**: enough independent tracks that the player always has
55
+ three things they *want* to do and never a wall. → [[system-collectibles]].
56
+ - **Gentle solvency**: an economy where diligence pays and optimisation isn't
57
+ required — reinvest-vs-hoard has a clear right answer but a soft penalty (FUN.md
58
+ §15's 740-vs-236 delta).
59
+ - **Surface the one deadline** the player must plan around; hide the rest. Knowledge
60
+ the bot needed, the player needs.
61
+
62
+ ## What's just theme (drop it)
63
+
64
+ - The **rural-farm fiction** — the loop is "tend parallel strands on a soft clock,"
65
+ which fits a bookshop, a spaceship, a garden, a shrine equally. →
66
+ [[world-theme-vectors]].
67
+ - **Farming as the central verb** — it's one strand among many; a Stardew of
68
+ *fishing* or *repair* or *ritual* keeps the DNA. → [[process-the-twist]]
69
+ mechanic-swap.
70
+ - **Combat/mines** — an optional pressure strand many cozy players skip. Cut it
71
+ before you cut the calm.
72
+ - **Pixel-art / marriage / specific NPCs** — content and dressing on the
73
+ relationship-meter and collection systems.
74
+
75
+ ## Composes into
76
+
77
+ - [[genre-farming-sim]] — the parent (gentle solvency, calendar as a hard
78
+ inequality).
79
+ - [[system-progression]] — broad, self-directed power/skill growth across strands.
80
+ - [[system-collectibles]] — sets, completion, decoration: optional goals with pull.
81
+ - [[system-economy]] — the solvent, forgiving money loop that funds tending.
82
+ - [[system-session-structure]] — the day as the session; the season as the
83
+ campaign.
84
+
85
+ ## Twist seams
86
+
87
+ - **Stardew but a garden of grief** *(tonal + mechanic-swap)* — the calm loop
88
+ becomes coming-to-terms; each crop is a memory you eventually release. (The
89
+ worked example in [[process-the-twist]].)
90
+ - **Stardew but a run ends the year** *(structure)* — roguelite seasons: you lose
91
+ the farm each year but keep meta-unlocks, turning cozy into a run loop. Pairs
92
+ with [[system-meta-progression]].
93
+ - **Stardew but one plot, no expansion** *(constraint)* — a single tiny space you
94
+ perfect instead of sprawl; depth over breadth. Pairs with [[genre-grid-puzzle]].
95
+ - **Stardew but two farmers, one day** *(perspective)* — coop where the shared
96
+ time-budget forces gentle coordination. Pairs with [[genre-coop-chaos]].
97
+
98
+ ## See also
99
+
100
+ - [`docs/FUN.md#15-farminglife-sim`](../../docs/FUN.md) — season ≥ growDays +
101
+ slack; surface nights-left; reinvest-vs-hoard delta; golden year.
102
+ - [[genre-farming-sim]] · [[anchor-rimworld]] (the tense-sim cousin) ·
103
+ [[pattern-anti-frustration]].
@@ -0,0 +1,122 @@
1
+ ---
2
+ id: anchor-tetris
3
+ title: Tetris
4
+ kind: anchor
5
+ tags: [endless, mastery, single-verb, falling-block, tuning, flow, difficulty-ramp]
6
+ summary: The perfectly-tuned single verb — place falling tetrominoes to clear lines, forever, with a difficulty that rises with your own success.
7
+ use-when: Designing for pure, endless mastery on one tight mechanic where the score curve and the skill ceiling ARE the game.
8
+ composes-with: [genre-grid-puzzle, system-mastery-curve, system-difficulty-and-dda, pattern-mastery-and-flow]
9
+ anchors: [anchor-tetris]
10
+ verify-with: docs/FUN.md#1-·-grid-puzzle-sokoban
11
+ ---
12
+
13
+ # Tetris
14
+
15
+ **What it is.** Seven shapes fall one at a time; rotate and slot them so rows
16
+ fill and clear. There is no end, no story, no unlock — just a board, a next
17
+ piece, and a speed that climbs the longer you last.
18
+
19
+ **Player fantasy / why it's fun.** *One more line.* The pull is **flow through
20
+ mastery of a single verb**: the rules fit on a napkin, but the skill ceiling
21
+ is bottomless, and the game tightens exactly as fast as you improve. It is the
22
+ cleanest proof that depth doesn't need breadth.
23
+
24
+ ## Design DNA
25
+
26
+ Take **one verb** — orient-and-drop — and tune it until it's perfect, then let
27
+ *difficulty rise with the player's own success*. Every cleared line speeds the
28
+ fall; skill buys you time that the game immediately taxes back. There's no
29
+ meta, no content treadmill: the loop is so tight and so well-tuned that
30
+ repetition *is* the reward. The randomiser (a bag of 7) keeps it fair; the
31
+ failure state (stack to the top) is always your doing.
32
+
33
+ The discipline here is *subtraction*. Tetris is the proof that **depth doesn't
34
+ require breadth** — that a single verb, tuned to perfection, out-lasts games
35
+ with a hundred mechanics. Everything that isn't the drop was cut: no story to
36
+ gate the loop, no unlocks to pace it, no second verb to dilute the tuning
37
+ budget. All of that budget goes into *feel* — the exact frames of lock delay,
38
+ the DAS charge, the gravity curve, the rotation kicks — because when there's
39
+ one verb, the game *is* its feel.
40
+
41
+ This is the ur-example of **easy to learn, impossible to master** — the entire
42
+ game is a mastery curve with the fat trimmed off. And the ramp is self-tuning:
43
+ because speed scales with *your* clears, the game meets every player at their
44
+ edge without a difficulty menu. The flow channel holds for a beginner and a
45
+ world-record holder using the identical rule.
46
+
47
+ ## Load-bearing structures
48
+
49
+ | Structure | Why it works |
50
+ |---|---|
51
+ | **One verb, perfectly tuned** | Orient + drop is the whole moveset. All design budget goes into *feel* — DAS, lock delay, gravity — not breadth. [[system-mastery-curve]]. |
52
+ | **Success raises difficulty** | Clearing lines speeds the fall; the game auto-escalates to match you, so flow holds across skill levels. FUN.md law: the ramp is the design. [[system-difficulty-and-dda]]. |
53
+ | **Self-inflicted failure** | You lose by stacking to the top — always legibly your mistake. No cheap deaths, so retry is instant appetite. |
54
+ | **Bag randomiser** | The 7-bag guarantees fairness (no piece drought) while staying unpredictable — controlled randomness. All rng via `world.rng` (FUN.md law). [[system-procgen-design]]. |
55
+ | **The next-piece queue** | Showing what's coming turns reflex into *planning* — a one-cell telegraph that opens the skill ceiling. [[system-telegraphs]]. |
56
+ | **Lock delay + soft/hard drop as grace** | A frame window to slide/rotate before a piece sets — the grace canon that makes fast play fair. FUN.md law 5. [[system-grace]]. |
57
+ | **The score as the whole meta** | No progression system; the leaderboard number is the entire long-term goal. [[system-collectibles]] (score-as-goal). |
58
+
59
+ ## What to steal
60
+
61
+ - **Pick one verb and spend everything on its feel.** Lock delay, buffer,
62
+ gravity curve, rotation system — the tuning *is* the game. Depth without
63
+ breadth.
64
+ - **Let difficulty rise with success.** Tie the ramp to the player's own
65
+ score/clears so flow self-corrects across all skill levels — no difficulty
66
+ menu needed.
67
+ - **A fair randomiser (bag, not pure-random).** Guarantee no droughts so
68
+ failure is always skill, never luck. Route it through `world.rng`.
69
+ - **A lookahead queue** to convert reflex into planning and lift the ceiling.
70
+ Showing the next piece (or several) is a one-cell telegraph that lets skilled
71
+ players *pre-solve* placements — depth added with zero extra rules. See
72
+ [[system-telegraphs]].
73
+ - **Make the failure state self-inflicted and instantly re-enterable.** Cheap,
74
+ legible death is the engine of "one more go" — you always know *why* you
75
+ lost, and you're one keypress from trying again.
76
+ - **Cut everything that isn't the verb.** Resist the urge to bolt on story,
77
+ meta, or a second mechanic; every addition steals tuning budget from the one
78
+ thing players actually feel. Scope discipline is the design.
79
+
80
+ ## What's just theme (drop it)
81
+
82
+ - **The Soviet / cosmonaut branding.** Pure decoration.
83
+ - **The specific 7 tetrominoes.** *A small alphabet of shapes with a fair bag*
84
+ is structural; the exact set is tuning — a hexagonal or pentomino variant
85
+ obeys the same DNA.
86
+ - **The music (Korobeiniki).** Iconic, but the loop is silent-viable — it's a
87
+ [[pattern-juice-choreography]] layer, not a mechanic.
88
+ - **The board being 10×20.** Dimensions are tuning, not law.
89
+
90
+ ## Composes into
91
+
92
+ - [[genre-grid-puzzle]] — shares the grid-and-piece substrate (though endless,
93
+ not solved-level).
94
+ - [[system-mastery-curve]] — the purest "easy to learn, hard to master"
95
+ exemplar.
96
+ - [[system-difficulty-and-dda]] — success-driven auto-escalation.
97
+ - [[pattern-mastery-and-flow]] — the flow channel held by a self-tuning ramp.
98
+ - [[system-grace]] — lock delay / drop buffering.
99
+
100
+ ## Twist seams
101
+
102
+ - **Tetris but the pieces are your deck** *(mechanic-swap)* — you
103
+ draft/upgrade which tetrominoes can appear; the bag becomes a build. Pulls
104
+ in [[genre-deckbuilder]] depth over the pure verb.
105
+ - **Tetris but two boards share a rising garbage line** *(perspective)* —
106
+ clears send junk to a rival; the single-verb duel becomes competitive. Feeds
107
+ [[system-coop-and-competition]].
108
+ - **Tetris but gravity is a resource you spend** *(constraint)* — you *choose*
109
+ when the piece falls, and hesitation costs a meter; converts reflex into
110
+ economy. Bends the auto-fall that defines the genre.
111
+ - **Tetris but tonal — you're stacking to *build*, not to clear** *(tonal)* —
112
+ filling rows raises a tower/city that persists instead of vanishing; the
113
+ same orient-and-drop verb, recolored from anxiety-management into gentle
114
+ construction. Pairs with [[genre-city-builder]].
115
+
116
+ ## See also
117
+
118
+ - [[genre-grid-puzzle]] · [[system-mastery-curve]] ·
119
+ [[pattern-mastery-and-flow]] · [[system-grace]]
120
+ - `docs/FUN.md#1-·-grid-puzzle-sokoban` — determinism + replay for grid
121
+ pieces.
122
+ - `docs/JUICE.md` — line-clear feedback (the pop that sells a good drop).