Log inGet started
World

Slag Saint

Branchmain
Branchesmain
Commit5e87281b36

README.md

CombatCamera

The fight camera, for a 1080x1440 portrait frame.

A landscape follow rig puts a 15.5 m boss half off the top of a 3:4 screen, so this one does not pick a distance and hope. Every frame it takes the two extremes the shot must contain — the Emberward's feet and the crown of the saint's bell — aims at the ANGULAR midpoint between them, and grows the stand-off until that half-angle fits inside the frame on both axes. The eye rises as the shot pulls back, so a wide stand-off looks down at the basin and up at the saint rather than crawling along the floor. The portrait shape then carries the composition: the player low, the saint towering up the tall axis.

Measured live at 15.5 m: a stand-off of 8.9 m puts the Emberward's feet at -0.89 of the half-frame and the crown of the bell at +0.68, with the horizontal spread well inside — both bodies held, neither on the border.

Modes

  • Locked on — stands on the line behind the player away from the saint and holds both bodies. Look input swings it off that line by at most orbitLimit and eases back.
  • Free — an ordinary orbit around the player.
  • Yielding — while Rules.state.mode is title, intro, victory or defeat it writes no pose at all: the staging slice drives the camera there.

Screen shake

It is the consumer of the shake event: Rules.shake(amplitude, duration) from anywhere adds trauma, trauma decays, and the offset is trauma squared, so a light hit is a nudge and the Quench is felt. Sampled from layered sines so it is smooth at any frame rate.

Reading it back

:framing() reports mode, the solved distance, the camera and aim points, the orbit offset, live trauma and the shake displacement the last pose actually carried — the numbers behind the shot, without a screenshot. :kick(amplitude, duration) shakes it directly and :calm() drops everything still ringing, which is what a cut to a new shot wants.

Attached by Emberward, which sets Camera.behavior. The follow target comes from the standard Camera.follow slot.