Debugging ECS Issues
Common Entity-Component-System problems and solutions from official Zay-ES patterns.
Official Rules of Thumb
From the Zay-ES wiki:
- Components are data only - no logic in components
- One canonical writer per component type. Multiple systems must not independently write the same component to the same entity. When multiple sources contribute deltas (e.g. damage from different weapons, prize-pickup cap bumps), use the ADR 0001 Change-entity shape: emitters create a short-lived entity carrying
ChangeTarget(target, source)+ a typed*Changepayload; a single canonical writer drains those entities and applies the fold. Concrete example:EnergyChange/EnergyStatsChangedrained byEnergySystem/EnergyStatsSystem. See