Screens
Puts every authored screen of *First Light: Goura* on the glass and drives it. Mounted once, on `mount_screens`; it needs nothing else on that entity.
Screens
Puts every authored screen of First Light: Goura on the glass and drives it.
Mounted once, on mount_screens; it needs nothing else on that entity.
What it draws
| Screen | Layer | Up when |
|---|---|---|
fl_card | 800 | The phase is title, howto, paused, won or lost. |
fl_hud | 20 | The phase is playing or paused — the light, the lane, the six calls, the three failances. |
fl_top | 24 | A call's answer window is open, or the narrator has a line on screen. |
fl_alert | 40 | For a beat after seen, failance or caught. |
The trees come from game.screens.flscr, which is pure. This component holds
the state, the focus ring and the input.
Reachable from every device
- Pointer and finger — every row carries
onClick, so a click or a tap fires it, and the pointer moves the focus ring as it crosses a row, so what is lit is what a click will do. - Keyboard and pad —
console.inputMapis activated the instant a card goes up and released the instant the last one comes down.navigatewalks the ring (arrow keys, left stick),confirmfires the lit row (Enter / Space, south),backleaves the card (Escape / Backspace, east),resumeputs a paused run back on the floor (Escape, start). The map stands the goura's own scheme and the engine's default player scheme down while it is live, so the floor cannot be walked underneath an open card. - Touch — the console draws exactly one on-screen button, a small
Confirmin the far corner, which acts on the lit row. Everything else a finger does, it does by touching the row it means.
The transitions it owns
title → howto, title → intro, howto → title, paused → playing (through
FL.resume), won | lost → intro (through rules.restart), and any card
→ title. intro → playing belongs to the staging slice; playing → won|lost
to the rules.
What it reads
FL.get("rules").ledger() for the run's figures — including window and
remaining when the rules slice reports them, so the countdown agrees with the
run rather than with a constant — FL.get("dawn").light() for the meter,
FL.get("player").position() for how far up the lane she is, and the call,
answered, failance, seen and caught events for the marks and the pulse.
Narration
Every line this game speaks also arrives as text, and it is drawn here.
The sound slice speaks a line through say(id) and announces it on the
narration event as { id, text, seconds }; its own surface offers
captions(false) for a slice that would rather draw the words itself, and this
component takes that offer in awake and hands it back in onDestroy. So one
caption exists, in the type and the palette the rest of the screens use, and it
sits directly under the call band rather than in a second place. A card carries
its own words and covers that band, so nothing is drawn up there while one is
open — the title card puts the opening line on the page itself, taken from
sound.text("open") so the page and the voice say the same thing.
With no sound slice at all, the written line still goes up from here: a line is never lost for want of a voice.
The ids are the sound slice's own — open, begin, first_call,
first_failance, first_seen, won, lost_caught, lost_failance,
lost_light. FL.get("sound").play(name) is used for ui_move, ui_confirm
and ui_back.
Fields
| Field | What it is |
|---|---|
inputMap | The scheme a card is driven by. Live exactly while a card is up. |
alertSeconds | Seconds the pulse stays on the frame. |
subtitleSeconds | Seconds a narrated line's text stays on screen. |
card | Which card is up, or none. Live output. |
focus | The id of the row the focus ring is on. Live output. |
Scoped to this part · feeds back into the world's score.