A game tick is a unit of time for something happening in the world. Generally, when the player takes an action, a tick occurs. Entities within the ECS can watch for ticks and take actions. NPCs, for example, have the opportunity to take an action on each tick. You can think of a tick as a round of combat in D&D, where each combatant has their own turn within the round (in a particular order).
Ticks are controlled very flexibly, allowing for layers of precedence and handlers:
- Global: defaults to on, run after any user input
- NLP: disables current tick if the player’s input wasn’t understood
- Verb: enables/disables current tick for an entire verb (e.g.
INVENTORY
) - Callback: can enable/disable current tick on the fly during verb callback
Some fun things I might look into:
- Time scaling as a result of plot or a character power (ticks happen more/less frequently than normal).
- Exempting a creature from the normal tick rules, allowing them to act after bad input or non-tick verbs.