Demonstrated Features:
-
BT.ticks()
— Frame-based timing counter
-
BT.ticksReset()
— Reset tick counter for animation sequences
-
Sprite animation with frame cycling
-
Animation state machine (Idle, Walking, Jumping)
-
Cooldown timers and event scheduling
-
Deterministic frame-based game logic
Why tick-based timing?
Using ticks instead of delta time ensures deterministic behavior - the same inputs always produce the same results. This is ideal for animation timing, cooldowns, and any gameplay logic that needs predictable frame-based behavior.
Key concepts:
- Ticks increment once per a fixed update (60 FPS)
- Compare tick differences for timers: if (BT.ticks() - lastTick >= duration)
- Reset ticks when starting new animation sequences
- Store tick timestamps for cooldowns and events