This is one way to approach this (very specific) example, but it is not equivalent:

- Finding all entities that are Running is much less efficient since you cannot leverage ECS search data structures

- A change in Running speed propagates to all locations where you want to know where an entity is Running

- It couples the logic of systems that know whether an entity is running (for example, compute Stamina) with components for updating Position

It very much depends on your game whether this is acceptable or not. If my game only supports three movement modes vs. a continuous speed, I probably do not want to use a Movement/Velocity component, and just want to work with discrete states.



I write lots of code.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store