62. Fairy Forest
Status: unimplemented — design draft. Fairy Forest runs today on its own private code at
/realms/fairy-forest: fairy.coax over metaverse/fairy-forest/. This chapter plans rebuilding it only from the OpenAgents Metaverse Engine's earlier chapters. Nothing here runs yet.
Fairy Forest is the realm players asked for when asked what game they would make. You are a newly woken fairy in a valley faded to grey. Bloom a faded patch and colour spreads from it; bloom a glade and its creature is happy, and one of the heart tree's five roots wakes. When all five wake the heart tree blooms, colour returns to the whole park, and the forest stays yours to wander.
What this chapter teaches
- Flight as part of character movement: one wing beat per press, holding climbs, letting go glides.
- Progress as saved state that survives devices: in the browser and, with an account, on the server.
- A world whose look is state: colour spreading from bloomed patches.
- Characters with troubles, memory and owner-written lore and quests.
The method
- State and saves (chapter 3): each patch's bloom, each creature's mood and each root are declared fields with defaults; what you restored is saved locally and on the server.
- Input (chapter 4): BLOOM (E, or a button on a phone), the wing beat (Space), talk.
- Movement (chapters 8, 9): the controller walks and runs; flight adds an upward impulse per beat and a glide, both inside the controller rather than in the page's face.
- Camera (chapter 10): the free orbit.
- Water (chapter 24 for physics where it matters; the game layer's river body otherwise): the stream and pond along a spline, lily pads, what water you are in.
- Look (chapters 11–13): the flat style, faceted low poly in the
FLAT_FAIRYpalette, flat translucent shadows, bloom only on what glows; colour per cell blended from grey by the bloom field. - Talk and panes (chapters 15, 52): creatures answer through the character chat; with EDIT open, LORE and QUEST panes for whoever you stand by.
bloom_at :: (f: *Forest, p: Vec3W) { patch := nearest_patch(*f.patches, p, BLOOM_REACH); // chapter 7's query if patch != NONE then patch_bloom(f, patch); // spreads over steps, saved}What exists today
- metaverse/fairy-forest/README.md: the story, Thornfall and the Old Ring, the five roots, the panes rule.
- forest.coax (layout, fade, troubles), stream.coax (one metaverse/water.coax river body), talk.coax, life.coax, night.coax, park.coax.
- fairy.coax and
fairy.wgsl: the page, drawn from the engine's five shapes (a ground of cells in store 0, objects in store 1, the stream's nodes in store 2); the face does the flight. Quests from the panes:apps/openagents-web/fairy/fairyquest.coax. - Edit rows: sparkles, grass, ridges; visitor tool: fly.
Flight lives in the face, outside the controller, so its physics is not in the realm's checks or its replay.
What it builds
- The forest's story, troubles and bloom over
metaverse-engine/, with flight moved into the shared controller as a declared mode.
Acceptance checks and oracles
- A scripted session blooms every glade, wakes all five roots and reaches the heart tree's bloom; it replays bit-identically natively and in the browser.
- Flight: a held beat climbs, a release glides; the same action stream gives the same path at 30, 60 and 144 FPS (chapter 1's rule).
- A save written in one browser and loaded on the server's copy restores the same fields; a missing field takes its declared default.
fairy-forest.png's golden changes only where a fix is visible.
Dependencies
Chapters 1–15, 24, 49 and 52.