Improbable Icon

SpatialOS Discourse Forums

How often should I send Position component updates

Hi. I have a question here. I am using my custom transform component to share position and rotation data across the network, so this is used for simulation etc.
On the second hand,I have required Position component. I send updates to it every 5 seconds, because I don’t need it to consume network. I wasn’t even used in the gameplay. That is until I started being surprised about the fact that my relative cylinder interest area behaves weird. This is when I realized that it uses Position component in order to move worker around, and therefore all my query calculations were done with 5 seconds delay. My question is. How often should I send position updates of the players. They are the only moving objects, except for AIs. When I started doing it every 1 second, my query based behaviour was good enough so that I could leave it as is. However I would like to know your thoughts. How often should Position component data be send for RPG project.

Hi @furious,

thanks for pinging this to our forums and apologies for the delay in getting back to you.

The send rate here depends on the accuracy you need for your checkout and queries. It shouldn’t depend on time, but rather, distance travelled - hope this helps!


Hi @Nee , Thanks for response. I haven’t thought about it this way… So what you’re saying is… I should check what distance player travelled, and send updates let’s say every 10m(depending on the gameplay and other game specific factors, obviously, that 10m is just an example). That sounds like something so simple and robust, I’m not surprised I haven’t thought about it before :smiley: