game/boss/telegraph
The saint's wind-up, made visible.
Every attack is announced for at least eight tenths of a second, and the announcement has to be readable from where the player actually stands: a third-person camera about three metres off the black glass, in a frame that is taller than it is wide.
That rules out a floor decal. A slab lying flat, seen almost edge-on, covers almost no pixels — the first version of this drew a geometrically perfect wedge that was invisible in play. So the tell is a picket: a fan of hot blades that rise out of the basin along the arc the blow will cover, alternating tall and low with gaps between them, reaching full length on the exact frame the blow lands. Direction, distance and timing in one read, without hiding the fight behind it.
- a directional move draws its picket across its own arc;
- a move that leaves the saint entirely draws it through all 360 degrees;
- the strike flashes the picket white-hot and collapses it;
- a core light in the saint's chest swells through the wind-up and opens all the way while it is staggered, so the tell still reads when the floor is off the bottom of the frame.
local Telegraph = require("game.boss.telegraph")
local rig = Telegraph.ensure(bossRoot) -- builds only what is missing
Telegraph.place(rig, x, z, yaw, parentScale)
Telegraph.arm(rig, spec) -- a spec from game/boss/moveset
Telegraph.tick(rig, spec, t01) -- 0 at the first frame, 1 at impact
Telegraph.fire(rig, spec)
Telegraph.advance(rig, dt) -- runs the collapse out
Telegraph.core(rig, phase, charge, exposed)
Two things worth knowing before editing this
The rig heals itself. Another slice owns the saint's body and sweeps
boss_root's children when it rebuilds, so alive() is checked rather than a
handle being trusted, and ensure re-derives from the world.
Glow colour lives in emissive, not in a colour property. The standard
material's vocabulary is emissive (an RGB colour) scaled by
emissive_intensity (a number). Writing a plain number into emissive is
accepted and sets the colour to grey, so a telegraph animated that way renders
pure white however saturated its palette was meant to be. The colour is
written once when a move is armed; only the intensity moves after that, in
four steps across the wind-up rather than every frame.
Everything the rig spawns is temporary, so none of it is written into the
scene the plan phase owns.
Scoped to this part · feeds back into the world's score.