• Advertisement
Sign in to follow this  

Getting the ping in Enet.

This topic is 3422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to actually do this? I know you can get peer->roundTripTime.. but that's not the actual ping. It's an averaged value over the last x seconds. It's quite annoying, because it starts at 500 by default.. and because it's averaged, it takes a while for it to settle down to the actual ping. Thus.. when players join a game.. for the first 30seconds they warp all over the place because when I extrapolate by the latency it moves them forward by ~500ms, when the actual ping is like.. 50ms. Also, in my server lobby when I want to ping all servers.. I either have to wait for a few seconds until the ping levels out (seems pointless), or I get a highly inaccurate ping of ~400 or so. So surely there must be a way to get the raw, unaveraged ping of a peer? Thanks, Ben.

Share this post


Link to post
Share on other sites
Advertisement
Enet comes with the source code. Make it either start out at 0, and detect the case of 0 to mean use the next result that comes in, or make it start out at an average of, say, 100.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement