4 ms·
With the implementation of Change Detection + Sparse sets, does that mean that using components to handle entity state (e.g. flags like is_hungry) is recommende
by setr 6y ago
With the implementation of Change Detection + Sparse sets, does that mean that using components to handle entity state (e.g. flags like is_hungry) is recommended? And then a system querying for Changed<is_hungry>
With archetypes alone, I believe this would have been highly undesirable (causing the entity moving back and forth between archetype tables)
- TheRawMeatball 6y agoYes! Marker components, as we like to call them are a common and encouraged pattern :)
- alice-i-cecile 6y agoYep, marker components is a much more feasible pattern now, and I tend to prefer tiny, granular components when writing Bevy apps as a result. The only drawback to this design is that you can't add / remove components instantly[0], and instead need to wait for the next "hard sync point" at the end of the stage. 0: https://github.com/bevyengine/bevy/issues/1613 https://github.com/bevyengine/bevy/issues/1613