Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 13 June 2012 - 09:31 AM
Posted 13 June 2012 - 10:51 AM
How should I match players? I first considered pinging all servers when the client downloads the server list, but after reading about implementing ping there are many caveats, ICMP requires adminstrator access on windows (no go for a game?), many networks filter out ICMP messages, ICMP messages are may not relate to UDP latency, and I would need both windows and mac implementations of a pinging system.
Another thought is to require the client to provide some sort of location information (country, state, city) and then provide this information in the master server list, then the client would have a good idea of how close another server is and they can decide for themselves.
What should I do? Should I simply not worry about it? Use ICMP anyway?
Posted 13 June 2012 - 11:05 AM
Posted 13 June 2012 - 01:50 PM
send bunch of UDP messages, wait return for a time, say 500ms time to live.
you will have both jitter percentage and latency.
you dont need to "ping" to get latency.
Posted 13 June 2012 - 01:58 PM
That is correct.
I must be missing something, shouldn't most firewalls and routers simply discard the messages, they aren't going to respond.
Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.
Also check out my personal website at bryanwagstaff.com, where I occasionally write about assorted stuff.
Posted 13 June 2012 - 02:04 PM
Posted 13 June 2012 - 02:19 PM
Do you mean that the servers are regular players with non-portforwarded routermodemthingies, and you need to punchthru to join a server, but dont want to have to punchthru all of them to get ping? (As in a random player is chosen to be a server)
Edited by Rasterman, 13 June 2012 - 02:21 PM.
Posted 13 June 2012 - 02:24 PM
That is correct.
The article linked to for Q9 in the forum FAQ describes how to handle NAT punch-through for lobby and matchmaking services. There are other articles on that linked-to site about matchmaking services that probably answer other questions you may not have thought about yet.
Posted 13 June 2012 - 04:48 PM
Posted 13 June 2012 - 05:10 PM
Posted 13 June 2012 - 08:20 PM
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.