gv — Gumdrop Vale's shared contract
require("gv") from anywhere in this world.
The one module every build slice codes against. It holds three things and nothing else:
TUNINGandPALETTE— every number and every colour in the game. Tune here; the whole game follows.state— live game state. The BLOOM slice is the only writer; VALE and CONFECTION read it and never cache it.- The event bus —
on/off/emit. How the slices talk without requiring each other. BLOOM emits; the other two subscribe.
Plus the world helpers the slices need to reach the scene without owning
it: terrainId, groundHeight, randomGroundPoint, flatDistance,
mixColor, bloomFraction.
Slice boot
SLICES = { "bloom", "vale", "confection" }. Each is one root module
returning { start, stop }. bootSlices() starts every slice that
exists and skips the ones that do not, so the three land in any order.
shutdownSlices() stops them. The scene entrypoint calls both.
stop() must cancel every task handle the slice created.
Ownership
This file and scenes/main.scene/ are the plan agent's. A slice that
needs a new tuning value or a new event says so in its report rather than
editing here — a concurrent edit breaks the other two.
Full design: /zero/source/design/spec.md.
Scoped to this part · feeds back into the world's score.