MDFramework icon indicating copy to clipboard operation
MDFramework copied to clipboard

Unique GameClock Remote Offset Per Peer

Open Beider opened this issue 5 years ago • 0 comments

Currently the GameClock sets the remote offset to be equal to the ping of the player with the highest ping. It would be nice to have a second mode where it calculates a remote offset per player.

The solution to this would be as follows:

  • Since we want to support server relay being off the server needs to transmit the roundtrip time to each other client to this client.
Eg.
P1 => Ping : 100
P2 => Ping : 150
P3 => Ping : 200

In this scenario maximum ping would be
P1 => P1 + P3 = 300
P2 => P2 + P3 = 350
P3 => P3 + P2 = 350
  • The GameClock needs to be updated so it calculates an remote offset time per client
  • The GetRemoteOffset needs to be updated so you can get remote offset per PeerId
  • The MDClockedReplicatedNode need to be updated so it get the offset for the owning PeerId instead of just the max offset.

Beider avatar Jul 07 '20 18:07 Beider