Jump to content
  • Advertisement
Sign in to follow this  
md_lasalle

Gamelist ping

This topic is 3983 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

Hi All! I've searched the forum but couldn't find a real answer for my concern. The gamelist ping is my concern here ( not the ingame ping ) In my last game, we used UDP(with a safe mecanism) to simply send a packet to every server we get from the master server and measure the time it took till we receive the response. The problem with this, is that if you are behind a router with lots of activity, your results are easily bogus, so even if your gamelist shows 300 ping, you could join the server and get a 30ms ping, not very useful. I was looking at the ICMP ping that any ping utility uses. It seems to be using Raw sockets. My question is simple, is it worth it to learn how to use raw socket just to get a ping from a gamelist ?

Share this post


Link to post
Share on other sites
Advertisement
ICMP messages are filtered by some ISPs. I noticed a huge drop in ICMP responsiveness since a certain worm exploited ICMP buffer a few years back. Disabling all/most raw traffic was the only immediate solution then. Plenty of networks still drop all ICMP (or even raw) traffic.

If router can't handle the traffic you're sending, there's little to be gained from using different protocol. Change the way profiling works, sample over longer periods of time, send a burst, time fastest response, or something similar.

You don't need a safe protocol to measure latency. Send 10 packets over period of 5 seconds, measure fastest time, number of dropped packets, etc.

Share this post


Link to post
Share on other sites
ok so you are suggesting that my way of doing with the UDP protocol is still a good idea ?

For the "behing router with heavy traffic" i meant like at school or on a network with someone using torrents, torrents seems to create a lot of "congestion" on routers

Share this post


Link to post
Share on other sites
If network is bogged down, there's not much you can do. Sending ICMP won't do much good, since it could get routed differently. Many home routers also ship with ICMP packets being discarded by default.

Just have your "safe" protocol respond to your proprietary UDP ping messages immediately. Use the canonical UDP echo server - if a packet of certain type is received, send the contents unchanged back to sender immediately.

Share this post


Link to post
Share on other sites
You should not try ping from the lobby server, because the lobby server is not located where the client is located. Instead, try doing a ping of each server of interest, from the client, when displayed in the interface.

If you have a scrolling list box of servers, you don't need to ping all of the servers, only the servers you actually draw in the list box.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!