• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Rasterman

Peer finding best peer to initiate multiplayer

11 posts in this topic

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?
0

Share this post


Link to post
Share on other sites
[quote name='Rasterman' timestamp='1339601502' post='4948836']
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?
[/quote]

Cant you just ping them using UDP messages?
0

Share this post


Link to post
Share on other sites
[font=arial,helvetica,sans-serif]From what I have found there is no UDP specification for pinging a server, if you ping a server with a UDP message it will responde with an [/font][font=arial,helvetica,sans-serif]ICMP: Destination unreachable packet so you still need to access ICMP.[/font] I cannot ping with my normal UDP means because that would require doing a NAT punch through to each server, or is that the way that most games do it still? It seems like managing all of those punch throughs would be slow and problematic though.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
I must be missing something, shouldn't most firewalls and routers simply discard the messages, they aren't going to respond.

[quote name='saejox' timestamp='1339615680' post='4948892']
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.
[/quote]
0

Share this post


Link to post
Share on other sites
[quote name='Rasterman' timestamp='1339617001' post='4948905']
I must be missing something, shouldn't most firewalls and routers simply discard the messages, they aren't going to respond.
[/quote]That is correct.

The article linked to for [url="http://www.gamedev.net/index.php?app=forums&module=forums&section=rules&f=15"]Q9 in the forum FAQ[/url] 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.
0

Share this post


Link to post
Share on other sites
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)
0

Share this post


Link to post
Share on other sites
[quote name='Waterlimon' timestamp='1339617849' post='4948914']
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)
[/quote]

correct, I have updated the thread subject to better reflect my question Edited by Rasterman
0

Share this post


Link to post
Share on other sites
[quote name='frob' timestamp='1339617536' post='4948910']
That is correct.

The article linked to for [url="http://www.gamedev.net/index.php?app=forums&module=forums&section=rules&f=15"]Q9 in the forum FAQ[/url] 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.
[/quote]

Thank you, I have already read the entire FAQ and most related pages, none of them discuss what I am talking about.
0

Share this post


Link to post
Share on other sites
If you want to measure the latency between each pair of peers in a set of players, then yes, you need NAT punch-through between all pairs of players. Additionally, not all players may be behind firewalls that accept NAT punchthrough -- those players should probably not be allowed as servers.
What you're trying to do is pretty hard to make robust. This is why the majority of games simply says "the game host == the game server," and if the server goes away, they migrate the server to whatever player had the best connectivity to the old server (basically, the old server keeps sending out packets of "if I were to go away, the next server is ....")
1

Share this post


Link to post
Share on other sites
Thanks hplus, I appreciate your advice rather than me wasting time trying to get it to work. I will simply not include pinging servers on windows or linux, since I plan on using GameCenter for the iOS/Mac versions it already includes this functionality, and the majority of users will be on these platforms. If I did want to put ping in just for windows, which looks pretty damn simple using [url="http://www.gamedev.net/topic/594412-ping-socket/page__view__findpost__p__4767839"]your souce code[/url], do you have a guestimate of how many players would return a valid ping response? If it even worth including for windows only?
0

Share this post


Link to post
Share on other sites
Sending a UDP message to a random peer on the Internet without any form of NAT punch-through or port forwarding is unlikely to be very successful in most parts of the world. There are still some places where an ISP will hand out cable modems that give your PC a publicly visible IP address, instead of using NAT, but those are becoming increasingly less common.

If you can have the "server" users set up port forwarding, or can use a NAT introduction server/service, then you can get 99% success.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0