Are components excuted on slaves? Or just on master?


Recommended Posts

While I'm coding with syncker and component systems, this question comes into my mind.

There are some objects should be syncked in the scene. All these objects got a component. I'm wondering that if the components are just excuted on master?

Link to post

if I understand correctly, you are using SynckerPlugin and C# ComponentSystem. The ComponentSystem knows nothing about the Syncker. The Syncker knows nothing about the Component System.

Now the C# Component System runs on both master and slave. do you want the component system to work only on the master? or to keep the components in sync?

if you want to turn off the component system
in SysyemLogic call
if syncker is initialized as a slave. 

if you want to synchronize the state of the components, you can use
on the master send messages
subscribe and read on the slave

what messages will be - you decide. You can make save/restore state methods for each component and send data in each frame, or send only the necessary data at the time of change.

both use cases are good.

it is important to remember that the synker synchronizes the state of the nodes, and sometimes this can be overkill. you can make high-level commands - and send them to the slave to do the same. this can reduce the load on the network.

  • Like 2
Link to post