Ping not coherent between server & client

Hi,

If you look at the ping on the client and on the server, you don’t have the same value (in PIE, I have an overrall ratio of 1 for 2).

On the client, I’m drawing the value of : PlayerState->ExactPing and on the server I’m using PlayerState->Ping*4.

Is there any explaination of this discrepancies or is it a bug?

thanks,

[Edited to highlight the fact that I display the replicated ping * 4]

Hey,

ExactPing is Ping * 4. The discrepancy isn’t a bug but a feature. Ping is for replication as its an uint8 and ExactPing is a float. 3 bytes more than Ping. Thus ExactPing is for display and Ping is for replication. Please see APlayerState | Unreal Engine Documentation for reference.

Regards,
Michael Brune

Hi,

I was not clear in my question. I already know that I have to multiply by 4 to get the “replicated ping”. My issue is that even multiply by 4, the discrepancies is a ratio of 1 for 2 (like 40 and 80ms). This is why I raised this.

Have you tried that on your side? Does the ping on the Server & Client match with a 5% error margin?

thanks,

Hey,

Loading up shooter game and my own game. I’ve tested this without seeing the same results. My pings are usually equal.

Regards,
Michael Brune

Thanks for the update. Might be something on my side. I will look in shootergame for this and see how it behave.

In fact, by doing some network testing with latency on my game, I saw that my initial thought was wrong, it’s not a “2x” ratio but seems to be a nearly fixed dependency of 30ms. I’m suspecting that it’s like a frame time. I need to do another test to see if the ping discrepancy is linked to the Frame rate.

thanks!

Hey Elvince, are you still having trouble with this issue?