Hello fellow developers i am currently developing a game on the ecs architecture and it works out fine.
The plumbing was terrible i must say but now it starts to get fruitful…
But i have a dilemma that i want your opinion on (i assume you know about ecs)
Imaging we have a hero which can move has health etc
so the movesystem handles all entities which has a move component with a move vector etc
now when the entity can't move anymore because of freeze spell or unconscious, death etc we can handle it two ways 1) we temporally ‘block’ the movement with the reason so we keep the move component with a boolean or so…i really don't like this option because the component manager of move has an ‘illegal’ component and in the end then all entities will have all components and it destroys the ecs architecture (i think) 2) we remove the movement component temporally until it needs to get back…healed, spell wears off etc…this is my favourite option because it respects the ecs and will work just fine. problem with this is how to get the move component back? who will be responsible for it ? and which will we add ? walk or was he flying ?
i wrote this right away while i was thinking about it, hope it makes sense ! ;-)
so what is your opinion about it ? i am curious.