EMBERLINE
README.md
staging.director
The staging slice's entry point. Requiring it registers three services on the bus and nothing else needs to know the slice exists:
Bus.services.fx— the impact language (sparks, dust, shake, hitstop, the screen flash, speed lines, cinematic bars).Bus.services.camera— the only thing that movesFightCamera.Bus.services.staging— the attract sequence and the staged moments.
local Director = require("emberline.staging.director")
Director.boot() -- builds the effect sheets, wires events
Director.Staging.playAttract() -- the opening
Director.Staging.preview("heavy") -- look at one beat on its own
Director.boot(opts) builds the effect sheets, resets the camera and starts
the attract art building. Pass { eagerArt = true } to draw the attract art up
front instead of spreading it a canvas per frame. Director.teardown() undoes
all of it and leaves no listener, tween or timeline behind.
What it listens to
Every fight.* event the combat slice raises is already wired:
hit and block pick a spark by the move's strength, land / jump / dash
put dust on the floor, throwLand lands like a heavy plus dust, superStart
runs the super's camera move, ko runs the knockout, and roundStart ends the
opening and plays the round-start push-in. Listeners are registered under the
tag staging, so a hot reload never stacks a second copy.
The timelines
A timeline is a coroutine driven from update: wait(seconds) between beats,
tween(dur, fn) for anything that has to move every frame while the beats keep
coming. Starting one cancels the one before it, and Staging.stop() cancels
whatever is running — so this slice never leaves a task ticking.
playAttract()— the opening: a pan across Kessai, the Emberline crossing behind the viaduct, the Ember held close, the title, the three fighters slamming in one at a time, a push-in on the Warden, then the title and the prompt.playIntro(data)— the round-start push-in.playSuper(data)— freeze, white out, snap onto the fighter, speed lines.playKo(data)— freeze, white out, slow motion, and the camera falling onto whoever hit the ground.playEnding()— the Ember rises out of the smog and the camera follows it.preview(what)— play one beat by name, for looking at it on its own.
Two things it writes that other slices read
Bus.state.hitstop— frames the fight should not advance for.Bus.state.timeScale— 1.0 normally, dropped during the knockout and ramped back over about two and a half seconds.