Godot 3.0
So, I run a couple instances of my game server , and a very useful function for me (and I think for people in the future) would be the ability to get the latency from client to any of my server instances, that without triggering the client connected/disconnected signals in the server instance.
I don't have the time to learn how networking works and all that stuff, so maybe someone like faless (the only person I'm aware that knows networking) could implement that if it is possible.
@Faless do you know by any chance what's the status of this issue?
@kubecz3k a bit stale, I have to finish what I started in #17227 (documentation, renaming, deprecations) before working on it,
I do not believe we should implement the ping test without connecting/disconnecting though, but only when already connected.
That seems a very specific feature, which should be implemented via scripting when needed (as the result would also not be reliable without the actual network load of your game).
On the other end, implementing a simple pinging API using ICMP sockets might be an option too (not an alternative one), I'll investigate further, I'm just worried of adding quite a lot of network code for a feature that might not be very useful.
@Faless I'm no longer running multiplayer servers so I'm not in the need of this...
However, I see this as a very usefull feature, since in a "server browser" you would most likely show the server info, in which you might want to include the "ping".... But if the server is 8/8 players lets say, you won't be able to connect to the server and get the "ping" with current method.
That's the reason I said without "connection/disconnection", server should not treat it as a new client.
I'm assuming the current way to get ping is to simply use a rpc call and count the time between the ping and pong messages.
Additionally I'd like to see how many bytes are currently being received and sent. Is this something you can already get from the API?
Additionally I'd like to see how many bytes are currently being received and sent. Is this something you can already get from the API?
This information is available in the new network profiler, but I'm not sure if it's exposed to running projects.
This can be easily done with a _ping
RPC.
External plugin material (I'll see if I have time to publish one).
Closing.
This can be easily done with a
_ping
RPC.
External plugin material (I'll see if I have time to publish one).
Closing.
@Faless
Two thoughts on that:
Doing this in a robust way (averaging over a few frames/packets, tracking latency, bandwith and packet loss) while not insurmountable isn't trivial
Every networked game will want this information
Not sure pointing to "the competition" is always the best, but they do indeed offer similar features:
see GetCurrentRTT() and GetConnectionStats() for Unity's UNet, or this class for the popular Mirror networking API, or this one for Photon Networking.
In short, they all seem to offer:
@mhilbrunner Someone could open a proposal for this feature.
Most helpful comment
@Faless
Two thoughts on that:
Doing this in a robust way (averaging over a few frames/packets, tracking latency, bandwith and packet loss) while not insurmountable isn't trivial
Every networked game will want this information
Not sure pointing to "the competition" is always the best, but they do indeed offer similar features:
see GetCurrentRTT() and GetConnectionStats() for Unity's UNet, or this class for the popular Mirror networking API, or this one for Photon Networking.
In short, they all seem to offer: