Game Development Community

LAN Connection works but how to connect over Web?

by Andy Hawkins · in Technical Issues · 08/12/2008 (8:03 am) · 6 replies

I can get people to join up if one person hosts and the other join the server via a LAN, but how do I setup a game so people connect over the internet?

#1
08/12/2008 (8:34 am)
Whoever is hosting the server has to setup port forwarding on their internet router, then people can connect over the internet by pointing their clients to the public IP of the hosts router.
#2
08/12/2008 (4:34 pm)
This doesn't sound like something that the fps starter kits does natively. Is that correct? What do I need to do? Add a text entry gui to type in the IP of the host?
#3
08/12/2008 (4:44 pm)
It's not something that you will do with the game. It's the nature of NAT. The hosting person will have to read the documentation for his internet router on forwarding a port.
#4
08/12/2008 (4:52 pm)
Http://www.portforward.com/guides.htm
#5
08/12/2008 (7:37 pm)
But how do the clients find it then? Am I hard coding the master server into every client so that's what they search for when they hit query master?
#6
08/13/2008 (8:58 am)
You will have to put up a masterserver, and hardcode it's address into every client. That will provide a central database of hosted games for players to access.

But, everyone who wishes to host a game will have to setup port forwarding.