Log inGet started
World

First Light: Vagant

Branchmain
Branchesmain
Commit2ac9266a40

README.md

Screens

Puts every authored screen of First Light: Vagant on the glass, and drives them. It is mounted once, on mount_screens, and needs nothing else on that entity.

What it draws

ScreenLayerWhat it is
fl-menu960whichever card the phase calls for
fl-hud120dawn band, clock, pause pip, the seven standards, oil, wig
fl-alert118the hunt vignette and the relight prompt
fl-say980the subtitle line, above the cards

The subtitle sits above the cards on purpose: a staged ending reads you your entry in the minute-book while the card is on the glass, and a line nobody can read is a line the game did not say.

What decides which card is up

fl.state.phase, which the loop slice owns.

PhaseCard
boot, titlethe title card
openingnone — a staged shot, with only the words over it
playnone — the HUD
pausedthe pause card
won / lostfirst light, or the entry in the minute-book

How to play is an overlay over whichever card opened it, not a phase.

When the player takes a line, this component emits uiRequest(action) — "start", "pause", "resume", "restart", "title" — and waits. If nothing has moved the phase after a moment it moves the phase itself, so the game is reachable from its own title card whatever else is or is not listening.

Controls

ui.uimenu is activated the instant a card goes up and released the instant the last comes down; it stands the player's own scheme down while it is live. ui.uipause carries the one control that has to stay live during play.

  • Focus moves on navigate (arrow keys / d-pad) and navigateStick (left stick), wraps at both ends, and lands on something the instant a card opens. The focused line carries a brass ring, a lit edge marker and a diamond.
  • Choose on confirm (Enter, Space, south), leave on back (Escape, right mouse, east), and an end card also answers restart (R, north).
  • A pointer or a thumb takes a line by touching it. Doing so moves the ring to that line, so a player who mixes a mouse and a pad never loses their place.
  • Each card shows the legend for the family actually in the player's hands, read from /runtime/input/device.

Public fields

  • menuMap: assetRef(inputMap) — the menu scheme. Default ui.uimenu.
  • pauseMap: assetRef(inputMap) — the pause control. Default ui.uipause.

Methods

  • :repaint() — force the next tick to rebuild every screen. The screens are only repainted when their own inputs change, and a hot reload of a style module is not one of those inputs, so this is how an edit to ui.flui reaches the glass without restarting anything.

Lifecycle

  • awake() — subscribes to line, caught and dawn, activates the pause control, and paints the first frame.
  • update(dt) / editorUpdate(dt) — one tick either way: reads the device, ages the subtitle, resolves the card the phase asks for, and repaints only the screens whose inputs changed.
  • onDestroy() — drops every subscription, releases both schemes, and unregisters every screen it put up.