Skip to main content

Tick Engine and PER Cycle

Tick Engine and PER Cycle

The combat clock is a global discrete tick, not real time. Player-paced: the world advances only when the player commits an action or explicitly waits. "Whenever it's time for the user to enter something, everything stops."

Granularity

  • Ticks are deliberately tiny: roughly 10 ticks per foot on even terrain. Integer tick durations everywhere.
  • Fine granularity minimizes same-tick ties between actors (though ties still happen - see Resolution).

The PER Cycle

Every action - attacks, spells, movement, cancels, reactions - is modeled identically:

Phase Meaning
Prep Wind-up: gathering reagents, mental focus, shifting grip. OnlyThe action has not started. This is the readable, interruptible window - only intelligent/experienced observers can read thisprep as an intention.
Exec The action is active: casting, swinging. Can'You can't do anything else. May include zone windows (e.g. a whirlwind that slices anyone entering range). The action can be mitigated here, but it cannot be cancelled.
Recover Reset:The action is done; the actor is winding down - regaining footing, recovering balance. ThisNothing can affect the completed action at this point, but enemies can take advantage of the window while the actor is thenot "readablefully beat" where enemies react.recovered.
  • Zero phases allowed: a fighter feat can zero prep/recover on light attacks to enable combos. KeepReadability aand recoveranti-spam floorlive of >= 1 tick on any action that can interrupt or be interrupted, so every significant action leaves a readable window.
Spells have a second clock: {prep, exec, recover, duration} where duration is how longin the spellprep lastswindow, afternot casting completes.recover. One action state machine: forevery everything.entity Abilitiesin parameterizethe it;sim runs the same Action state machine - PREP, then EXEC, then RECOVER. Attacks, spells, movement, cancels, and reactions are all instances of one Action type; they don'tdiffer addonly newin simparameters code.(phase Execdurations, windowsexec makewindows, positioningcompletion effects), never in code path. A cancel or a reaction is itself an action with its own PER cycle, so the coresame defenserules - "wait out the whirlwind, then close in" is an expressible tactic.compose.

Movement is an action

Movement uses the same PER model; terrain is paid at the borders (see Movement and Terrain).