29.12.2018, 06:32
At IRL time T, player A shot player B. The player A sends information to the server about the shot (and other information) which is received by the server at time X. Player B keeps sending information every now and then.
In IRL time T, the player A had some state information (includes player B's state based on which B is rendered on A's screen). Player A's state at IRL time T is received at the server at IRL time X. I somehow need to find out the state of player B as seen by A.
What are the approaches to solving this problem of synchronization?
The player B continuously informs B's state to the server which is relayed to other nearby players based on which things are rendered on their screen. If I were to store the state information relayed by B in an array. How can I efficiently pick the correct state information of B that corresponds to the event that happened at T on A's screen?
In IRL time T, the player A had some state information (includes player B's state based on which B is rendered on A's screen). Player A's state at IRL time T is received at the server at IRL time X. I somehow need to find out the state of player B as seen by A.
What are the approaches to solving this problem of synchronization?
The player B continuously informs B's state to the server which is relayed to other nearby players based on which things are rendered on their screen. If I were to store the state information relayed by B in an array. How can I efficiently pick the correct state information of B that corresponds to the event that happened at T on A's screen?