Some design questions about ES using Zay-ES
Starting with noob one
In simple tutorials in zay-es github wiki (written by @ia97lies [Christian thanks for tutorial ]) , I can see there is no setter method for components to change fields value, instead new component was created and overwrote the existing component. Which can impact on GC. Any reason for this ?
Systems contacting with each others
ex: System A wants to tell system B (position system) to change position of an entity
Can system A call method from B directly ? (Seems very bad also will couple systems to each other and also will prevent multi threading)
Does system A need to update position component on entity and system B will detect this change by checking position components on all entities in it’s infinite loop (It is not event driven but polling pattern)
Or I need to have an event driven messaging system so systems can register there and contact with sending messages and each system can listen to specific message types. So systems without knowing each other can contact with each other (Like using Gdx-AI Telegraph library)
What is your idea ?