Log inGet started
World

The Hernsew Lingster

Branchmain
Branchesmain
Commitc51c06f1f8

README.md

run.director

The run of The Hernsew Lingster: the phase the game is in, the tide coming into Yowe Fen, and the five hurdles that bar the causeway until their heron is answered.

Attach one to the scene's Run anchor. It builds the hurdles as children of that anchor and publishes everything else on the shared blackboard in game.rules, so no other slice has to find it.

The phases

phasewhat it iswhat leaves it
titlewaiting to be startedRun.begin(), or a UI_CLICK of "start"; failing that, autoStartSeconds
openingthe staged arrival at the Low StaitheRun.openingDone(), or openingSoloSeconds / openingMaxSeconds
playthe walk up the causeway; the tide runsthe deck going under, the Fold, or an empty flock
crestthe water is over the deck and the Fold is still aheadthe crest, or the Fold
wonthe High Fold, with at least one yoweRun.restart()
lostthe tide crested, or the last yowe was takenRun.restart()

What it publishes

On Rules.state, every frame: PHASE, TIDE_Y, TIDE_T, STATION. As signals: PHASE(phase), TIDE_STEP(step) at each of the tide's ten notches, and GATE_OPENED(stationId) when a hurdle stands aside.

It listens for ANSWERED(stationId, correct) — a wrong answer costs Rules.TIDE.PENALTY_SECONDS of tide, a right one opens that post's gate and moves the station on — and for YOWE_LOST and UI_CLICK.

Fields

  • autoStartSeconds — how long title waits when no screens slice is there to press the button.
  • openingSoloSeconds / openingMaxSeconds — how long the opening runs with and without a stage slice driving it.
  • driveGreyboxWater — move the placeholder water plane from TIDE_Y while the greybox fen is still what is on screen. Stops by itself once the real fen stands.
  • gateOpenSeconds — how long a hurdle takes to swing aside.

Methods

begin() · openingDone() · restart() · phase() · tideT() · setTideT(t) (put the tide at a point of the run, for a staged beat or a test) · answer(stationId, correct) · report() (the whole run as one readable table).

Prefer require("run.state"), which wraps all of these and answers before the component has awoken.