Members - Reputation: 100
Posted 30 March 2012 - 12:46 AM
I have created a simple game, and i want to make a online multiplayer mode.
I did understand how UDP or TCP/IP Socketing works (i have already made LAN mode to the game) BUT i seems fail to understand how to connect to another player via Internet with his global IP.
every my attempt to connect to my public IP has failed.
i want similar player connection like diablo 2 direct IP connection.
pls if you have examples post a link to them i will be very greadfull
P.S. ITS NOT a firewall problem or other of this kind.
Crossbones+ - Reputation: 7561
Posted 30 March 2012 - 01:02 AM
2) same as for LAN, if it doesn't work then it is a firewall/routing problem.
Also, many cheap routers (especially ones that include a DSL modem) will fail miserably if you try to connect to your own public IP from inside the LAN. (if you need to do this for testing purposes then either get a router that you can configure properly for this(usually the setting you want to enable is called NAT loopback) or place the server somewhere else while testing)
Thus most likely i'd say that it is actually a firewall/router problem despite your assurance of the opposite
The voices in my head may not be real, but they have some good ideas!
Members - Reputation: 1067
Posted 30 March 2012 - 03:04 AM
On the server end you, will need to forward the required port to the internal (LAN) IP address of the server.
The client will need to connect to you WAN ip address. If you dont know what that is, you can find it by typing 'what is my ip addesss' into google.
Google these days tells you what you IP address is, without having to go to a 3rd party site.
Hope this helps