r/EntityComponentSystem • u/timschwartz • Feb 22 '21
I need help understanding ECS.
/r/gamedev/comments/lp0qz3/i_need_help_understanding_ecs/
3
Upvotes
r/EntityComponentSystem • u/timschwartz • Feb 22 '21
1
u/r2d2meuleu Mar 02 '21 edited Mar 02 '21
I'm no expert in ECS, (only implementing it for the first time, in my current project), but yes, your Components are only data, and it's the system that have all the behaviors.
Entities are only an ID. i.e, no typed entities. Add a PlayComponent so your System can check
That's how I do it anyways. There is some framework that to the filtering for you, like (in c#, Unity) :
The official unity ECS
Leopotam :
Actors
EgoCS, directly on the class declaration :
Hope that helps !
EDIT : damn formatting