▣
module · drop-in viewer
caption
The written form of everything the Kid says, so a spoken line survives a muted player, a noisy room and a failed generation.
by·posted 1mo ago
What it does
caption
The written form of everything the Kid says, so a spoken line survives a muted player, a noisy room and a failed generation.
SoundDirector writes; anything that draws reads.
local Caption = require("game.audio.caption")
local now = Caption.current() -- { id, text, remaining, duration } or nil
local off = Caption.on(function(shown) ... end) -- every new line, and nil on clear
SoundDirector draws the words itself, in a band above the bottom control
band, laid out from the live ui.screenSize(). A screen that would rather
carry the line inside its own composed card takes the job:
Caption.claim("bb_screens") -- SoundDirector's band stands down
Caption.release() -- hand it back
Time is handed in rather than read: Caption.tick(dt) is called once a frame
by SoundDirector, so a caption follows the game's clock and holds still while
the game is paused.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.