Matchmaking Server through Router

Started by
1 comment, last by Kitasia 15 years, 3 months ago
From what I can tell, a matchmaking server is just a server you connect to that uses information to begin matches with other players. What I wanted to do is have two or more players connect to the server, let the server decide which one will host/serve the game, and then make a new connection between the group of players to start the match. The problem here, I think, is how player connect to each other behind a router. I'm guessing the players would connect to the server okay but at the point which they connect to each other, wouldn't the serving player need to open a port? There don't seem to be many guides on matchmaking servers.
Advertisement
I think what you are looking for is a NAT punch through.
The forum FAQ has some links about it:
http://www.gamedev.net/community/forums/showfaq.asp?forum_id=15

Check out questions Q9, and more specifically Q24.

However NAT punch through techniques are generally for UDP, and I don't know how well they work (if at all, reliably) under TCP.

I suppose an other (more difficult + less reliable ?) option would be to attempt to use UPnP or NAT-PMP to attempt to configure the router dynamically to forward a port without requiring the user to do so manually. (Just remember to ask the user first! :P)
Well I'm actually using a reliable UDP through the Lidgren Network library so I guess I shouldn't run into trouble.

Thanks for the help!

This topic is closed to new replies.

Advertisement