#Photon PUN2 high latency

1 messages · Page 1 of 1 (latest)

plush galleon
#
using Photon.Pun;
using TMPro;
 
public class NetworkStats : MonoBehaviour
{
    public TextMeshProUGUI pingText;
    public TextMeshProUGUI sentText;
    public TextMeshProUGUI receivedText;
    public TextMeshProUGUI resentText;
 
    private void Update()
    {
        // Update the text of the TextMeshProUGUI components
        pingText.text = "Ping: " + PhotonNetwork.GetPing() + " ms";
        sentText.text = "Sent: " + PhotonNetwork.NetworkingClient.LoadBalancingPeer.BytesOut;
        receivedText.text = "Data Received: " + PhotonNetwork.NetworkingClient.LoadBalancingPeer.BytesIn;
        resentText.text = "Data Resent: " + PhotonNetwork.NetworkingClient.LoadBalancingPeer.ResentReliableCommands;
    }
}``` 
This is basically how I am getting the ping and some other network stats
#

Also sorry, I got a Lil busy and didn't get time to reply. Also I thought I'd just make a thread so it's easier to reply and check messages

#

Also about data resends, there are hardly any. And the ping remains high still even with 0 resends

chilly jasper
#

Also sorry, I got a Lil busy and didn't get time to reply.
No worries.

#

Is this a recent PUN version (update, if possible)? And which transport protocol do you use?

plush galleon
#

Yes it's the latest version, and I'm sorry I am kinda new to the networking, whats a transport protocol here? @chilly jasper

chilly jasper
#

There are different protocols to chose from. UDP is the default which you will be using.

plush galleon
#

I see it, I am using the default Udp.

#

@chilly jasper

#

Just today I have been getting around 100 ms, on both client and host. But I still think it's much higher than it should be I guess

#

I think optimal ping is around 60?

chilly jasper
#

Lower is always better, yes.

plush galleon
#

So what could be the issue here @chilly jasper

chilly jasper
#

I hardly know anything new about the case, really.
Ok, so UDP and not so many re-sends. I would prefer some numbers for this but ...

I would possibly enable the SupportLogger (in the PhotonServerSerttings) and increase the logging levels to Info. Then run it and send the log file.