Log inGet started
World

Nine Bells

Branchmain
Branchesmain
Commit5e921c28b2

README.md

Doctor

The physician's body. It hangs on the doctor entity the scene reserves for the player, and it is the only thing in Nine Bells that reads a control.

Every frame it turns the live control scheme into one table of intent, hands that to the traverse slice's simulation, and writes the answer onto its own entity. Nothing about how he moves lives here — that is game.traverse — which is what lets the whole of the doctor's movement be driven from a test with a made-up frame of input and no game running at all.

Fields

inputMapthe control scheme this body answers to
controlledclear it and he still falls, lands and stands, but takes no orders — what a cutscene wants
animread-out: what he is doing
speedXread-out: how fast he is going along the street
inputXread-out: the control reading he is acting on
ticksread-out: frames simulated since he last woke

Other slices reaching a control

game.traverse.physician is the game's one scheme, and it is activated here and nowhere else. Anything else that needs a control asks for it rather than standing up a second map:

local stop = NB.ext.onControl("treat", "pressed", function() ... end)

kind is "pressed", "released" or "input", and the returned function unsubscribes.