Godot Version
4.3
Question
So, I’ve been progressing on my multiplayer third-person shooter. I’m almost finished with client prediction to have the client control their player locally as well as send their input to the server.
However, a factor I’m overlooking is the effect of packet drop on this system. I use the program, Clumsy, to test in a realistic (enough) network environment.
This question isn’t about directly addressing the packet loss, but instead asking how to use GDscript to track the client’s percentage of packet loss (and current ping as well).
This function(s) will be inside of my client manager script. Triggering in the _process
function I imagine. Maybe I could create a dummy unreliable RPC that is sent from the client manager → to the server manager → and back to perform a math calculation. Getting a semi-accurate estimate of packet loss and ping.
This will allow me create some error handling function, such as disconnecting the player if their packets are dropped too often, or have the information to give out warnings to players.
I have a vague idea of how to do this, but I’d like some pointers or examples to go off of.