Expand description
Plays a cinematic (shuyi_assets::cinematic, ticket 1113; the game’s
game ADR-0060): a Timeline says which shot a time falls in and how far
through it, and a CinematicPlayer has the shot draw itself there.
What a shot shows is the game’s: its shot kinds implement
ShotPainter.
Every frame is drawn from the time alone: nothing is carried from one frame to the next, and no shot may keep state that an update advances; whatever moves in a shot is worked out from the time. So whoever owns the clock can follow the music, jump or loop, and a test can draw any moment. The player has no clock of its own.
The engine also gives what most shots move by: an ease_in_out (and
every curve of shuyi_core::ease, through
ease_f32), and
a Pan over a picture shown as the frame’s backdrop (game ADR-0048,
cinema::view), its frame (PanFrame) and its paint
(paint_pan).
Structs§
- Cinematic
Player - Draws a cinematic of shots
Sat any time. - Moment
- Everything a shot is told about a moment of its cinematic.
- Pan
- A pan over a picture shown as the frame’s backdrop (game ADR-0048): the
picture’s pixel
fromin the middle of the screen when the shot starts,towhen it ends, eased in and out (ease_in_out), at one whole zoom for the whole shot. - PanFrame
- A frame of a
Pan: where its picture is behind the screen, as plain data. - ShotAt
- Where a time falls in a
Timeline. - Timeline
- When each shot of a cinematic starts, and when the cinematic ends.
Traits§
- Shot
Painter - A game’s shot, built once to be drawn at any moment: one of its shot kinds with whatever it needs ready (a picture painted, a text laid out). Never changed by drawing.
Functions§
- ease_
in_ out p(0 to 1; clamped, not a number counts as 0) eased in and out: slow at both ends, fastest in the middle. It is smoothstep, the curve ofEase::Smooth, inf32; throughease_f32a skin has every other curve too.- millis
tseconds in whole milliseconds. A time below 0, or one that isn’t a number, counts as 0.- paint_
pan - Paints
frameover the whole ofbuf:picture(a whole map, say:MapPicture) as its backdrop, behind cells that are all holes, inpalette’s text color.