Is there a function in the C++ library I can use to get the ping to the server? I’d like to show players their ping and the pings of their colleagues.
I also might want to build some contingencies into my game for high latency situations.
Is there a way to get the ping from within Nakama? Thanks!
There is no built in ping implementation/function, but you can easily create a custom RPC with an empty payload and calculate how long it took to get the response back on the client. There’ll be some additional overhead but it should be neglegible and allow you to get an estimate of the network round-trip time.
Hope this helps.