Multiplayer Synchronized start

Hi,

Does UE4 have some sort of synchronized time variable or way of compensating for the time an RPC takes to transmit? I’m creating a multiplayer racing game, and attempting to synchronize the start of the match. If I send an RPC which informs clients to “start in 5 seconds” the clients will start at a different time due to the amount of time it took to send the RPC. I’ve also tried using the Elapsed Time variable in GameState, as shown in the FPS example project, but this is simply replicated without prediction so starting at XX elapsed time has the same issue.

I would appreciate any guidance.

Thanks

Hi there,

I don’t know if you figured it out but can’t you create a boolean like all clients loaded if true start countdown, if false. You could use some cinematic’s to help cover up the time to load. like the vehicles driving up to the starting line or a fly over of the track to help get some time for everything to communicate.

I hope this helps
XxDigitalDanxX

Send an initial message with a high resolution timestamp and pad with empty data to match your “game start” message. From that get the send time for that client, and respond to the message with that result. On your server or head client take the max of those returned values, round up to the nearest second, and send your start message with that time as a countdown relative to the message stamp (not time received on the client).