Log inGet started
World

First Light: Goura

Branchmain
Branchesmain
Commite917faa950

README.md

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

ScreenLayerUp when
fl_card800The phase is title, howto, paused, won or lost.
fl_hud20The phase is playing or paused — the light, the lane, the six calls, the three failances.
fl_top24A call's answer window is open, or the narrator has a line on screen.
fl_alert40For 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.inputMap is activated the instant a card goes up and released the instant the last one comes down. navigate walks the ring (arrow keys, left stick), confirm fires the lit row (Enter / Space, south), back leaves the card (Escape / Backspace, east), resume puts 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 Confirm in 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

FieldWhat it is
inputMapThe scheme a card is driven by. Live exactly while a card is up.
alertSecondsSeconds the pulse stays on the frame.
subtitleSecondsSeconds a narrated line's text stays on screen.
cardWhich card is up, or none. Live output.
focusThe id of the row the focus ring is on. Live output.