shared
KESSREL LINE's one shared surface: the game's constants (world frame, palette, fonts, unit kinds and index ranges, regiments, stances, abilities, waves), the event bus every slice talks over, the `battle` state the sim writes and everyone reads, the `audio` and `screens` contract…
game.shared
KESSREL LINE's one shared surface: the game's constants (world frame, palette,
fonts, unit kinds and index ranges, regiments, stances, abilities, waves), the
event bus every slice talks over, the battle state the sim writes and
everyone reads, the audio and screens contracts other slices bind, and the
spoken lines with their text.
local K = require("game.shared")
K.on("battle.wave", function(p) print(p.wave) end)
K.emit("cmd.move", { ids = { 1, 2 }, x = 0, z = 40 })
K.say("wave_1")
The design spec at /zero/source/design/spec.md says which slice owns which
part of it. Nothing here writes a unit, a screen or a sound; it is the place
they agree.
Scoped to this part · feeds back into the world's score.