How should we sync localPlanet.id for remote Players? #43
Replies: 2 comments 1 reply
-
You mean store the localPlanet for each user on the host? What if multiple users are on the same planet then one leaves? IMO, we need to just work out where every change to localPlanet happens and send it as a packet. Unless your suggestion is to compute some sort of delta, in which case that might work (like discord does it, the send a READY packet with the initial state then incremental deltas), which might also fix the potential issue of someone taking a while to load in and desyncing. |
Beta Was this translation helpful? Give feedback.
-
Yeah I think we will need to keep track of each players last known planet id. Else we won't be able to spawn the remote players at the appropriate location when they join back the same game. We will also need that information later to be able to send the planet state update only to the players that are currently on this planet. |
Beta Was this translation helpful? Give feedback.
-
As a great part of the game relies on the
localPlanet
and its ID variable and it might not always be possible to replicate the same functionality without it.We could store the
localPlanet.id
of each user in some place where we can easily access it and update it when needed/required, for example inLeavePlanet()
andArrivePlanet()
.This would help me greatly on #36 and #35 and i think we should all agree on a way that suits us all rather then send that information in multiple packets when we implement our functionalities.
What do you think would be a good place to store this information? Or what do you think about this in general?
Beta Was this translation helpful? Give feedback.
All reactions