game
The shared memory of one BLOCKBUSTER 767 session, and the bus every slice talks over.
game
The shared memory of one BLOCKBUSTER 767 session, and the bus every slice talks over.
Game.session holds what the run is: the state it is in, the score, which
plane is loose, how many are left, the chain and its multiplier, the counts of
blocks shoved and blocks off the table, and the star rating once the session
ends. Game.telemetry holds what the airframe is doing this frame — speed,
altitude, pitch, bank, boost and its remaining fuel, the winds the key is
holding, which parts are still attached — written only by the flight slice and
read by the HUD, the camera and the sound mix.
Game.on / Game.emit are the bus. Handlers run in subscription order, which
matters: more than one slice answers roundStart, and which of them the player
ends up looking at cannot be left to the order a table happens to iterate in.
Game.set moves the state machine through the names in game.rules, and
Game.reset / startRound / endRound / advance are the session flow — a
fresh city, a plane on the launcher, a wreck, and then either the next plane or
the end card.
Everything it remembers lives in modules.state(), so editing this file while
the game is running does not drop the subscriptions the other slices hold.
Consumed by every slice: flight, city, camera, ui, set and audio.
Scoped to this part · feeds back into the world's score.