Understanding ping and lag
Options
Hi, I'm new to Photon and I'm trying to understand the relation between the ping and the time to send an RPC from a client to master client and another one back (both client and master client are on my same PC).
I'm on the EU region with a ping of 44ms listed in console at start. In the PhotonStatsGUI window it shows ping 60-70ms. I understand this is a roundtrip ping (from client to Photon Server and back) got from:
PhotonNetwork.NetworkingClient.LoadBalancingPeer.RoundTripTime
I'm sending an RPC from client to master client. Using PhotonNetwork.Time to calculate, this takes 68ms. Right when received, from the master client I send another RPC to all clients. The initial client receives this second RPC after 136ms seconds since when the initial RPC was sent.
So, a full communication with the MaserClient (who acts as my game authority) takes about ping * 2.
That's 1 trip from Client to PhotonServer (ping/2) + 1 trip from PhotonServer to MasterClient (ping/2) + 1 trip from MasterClient to PhotonServer (ping/2) + 1 trip from PhotonServer to Client (ping/2)
Meaning, if a player has to validate an action, there is a delay of about 140ms from when he presses the button to the moment the action starts.
1. Is this assumption correct? Did I understand it right? Can I assume this to calculate the lag people will experience, based on their ping values, or are there other factors?
2. I was wondering about the difference between ping value listed in PhotonStatsGUI (60-70ms) and the one listed for EU region (44ms).
3. Does the PhotonNetwork.SendRate is part of those pings and lags? I tried to change it from 20(my default) to 30, but no conclusive change. I also tried calling PhotonNetwork.SendAllOutgoingCommands after the RPC requests, still with no visible improvements.
Thank you!
I'm on the EU region with a ping of 44ms listed in console at start. In the PhotonStatsGUI window it shows ping 60-70ms. I understand this is a roundtrip ping (from client to Photon Server and back) got from:
PhotonNetwork.NetworkingClient.LoadBalancingPeer.RoundTripTime
I'm sending an RPC from client to master client. Using PhotonNetwork.Time to calculate, this takes 68ms. Right when received, from the master client I send another RPC to all clients. The initial client receives this second RPC after 136ms seconds since when the initial RPC was sent.
So, a full communication with the MaserClient (who acts as my game authority) takes about ping * 2.
That's 1 trip from Client to PhotonServer (ping/2) + 1 trip from PhotonServer to MasterClient (ping/2) + 1 trip from MasterClient to PhotonServer (ping/2) + 1 trip from PhotonServer to Client (ping/2)
Meaning, if a player has to validate an action, there is a delay of about 140ms from when he presses the button to the moment the action starts.
1. Is this assumption correct? Did I understand it right? Can I assume this to calculate the lag people will experience, based on their ping values, or are there other factors?
2. I was wondering about the difference between ping value listed in PhotonStatsGUI (60-70ms) and the one listed for EU region (44ms).
3. Does the PhotonNetwork.SendRate is part of those pings and lags? I tried to change it from 20(my default) to 30, but no conclusive change. I also tried calling PhotonNetwork.SendAllOutgoingCommands after the RPC requests, still with no visible improvements.
Thank you!
0