Add note on combat tick health

This commit is contained in:
Jared Miller 2026-02-07 16:31:16 -05:00
parent 8fbee01c11
commit 600be4ed95
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -332,6 +332,11 @@ things the ecosystem learned the hard way:
direct command execution is simple but it doesn't compose with timing-based direct command execution is simple but it doesn't compose with timing-based
combat, NPC AI, or periodic world events. the tick loop is fundamental. combat, NPC AI, or periodic world events. the tick loop is fundamental.
note: when combat/NPC AI gets added to the game loop, add tick health
monitoring — log warnings when tick processing exceeds TICK_INTERVAL. the
skeleton loop handles overruns correctly (skips sleep, catches up) but
sustained overruns mean the tick rate is too ambitious for the workload.
"we should have designed entities for composition" "we should have designed entities for composition"
inheritance hierarchies (Item > Weapon > Sword > MagicSword) get brittle. inheritance hierarchies (Item > Weapon > Sword > MagicSword) get brittle.
composition (entity with damage_component + magic_component) stays flexible. composition (entity with damage_component + magic_component) stays flexible.