• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM Networking Help (not local) (Solved - use Hamachi)

D

Diogo

Guest
Hello, there!

I'm trying to make a simple board game, and am now working on the multiplayer basics.

My purpose is to have a P2P connection, having one player act as the server, the other as the client.
I have successfully tested 2 things:
Same computer connection with: 127.0.0.1;
Same network, different computers, with: 192.168.x.x

So I think the game is working fine.

The problem, then, is when I try connecting using my IP address (using http://www.whatsmyip.org/ to find out what it is). The server never receives anything when I try.
The websites sometimes give me an ipv6 address, but I'm only using the ipv4. Not sure if that makes a difference.

I have port-forwaded the only port I'm using. I have not created a static address, but I assume it should make no difference if I check which IP I'm giving before trying to connect.

Does anyone know what the cause of the problem might be?
(I've given the info I find relevant, but please say if I'm missing something!)

Thanks!
 
R

renex

Guest
Port forwarding. By default, you can't host a server socket from behind a home router / modem - it will only authorize incoming packets that match an outgoing packet.

Moreover, most importantly, most home modems actually don't have a dedicated out-facing ip address - isps usually bucket several clients on the same address to save space. This means an incoming packet would have to be guided by history from a previous outgoing packet, which never happened since you're hosting a server and not making a request.

This also affects your players, so there are a few solutions.

  • You could have a master server that relays traffic between instances of your game. This requires no port forwarding from your players, but is the most expensive method since it requires a physical server with capacity to host all your players.
  • A master server that only performs UDP hole punching. This is simpler because the server will not need to handle more than two clients at a time, no matter how many clients are playing the game. It does come with the caveat that you'll be limited to unreliable udp connections which have packet loss, so you'll need your own error correction protocol.
  • Just instruct your players to port forward. Most people who call themselves 'gamers' have relative experience in port forwarding or using hamachi for example, so not entirely an issue unless your game is mobile.
 
D

Diogo

Guest
Port forwarding. By default, you can't host a server socket from behind a home router / modem - it will only authorize incoming packets that match an outgoing packet.
I have port-forwarded the port I'm using.
http://www.ipfingerprints.com/portscan.php says that the ports are "filtered", rather than "closed". The server asks for me to let it through the firewall (which I do), so I'm not sure what this "filtered" means.

Moreover, most importantly, most home modems actually don't have a dedicated out-facing ip address - isps usually bucket several clients on the same address to save space. This means an incoming packet would have to be guided by history from a previous outgoing packet, which never happened since you're hosting a server and not making a request.
Is this a separate issue from port-forwarding?
http://www.yougetsignal.com/tools/open-ports/ also says the port is closed (based on timeout) despite me having port-forwarded it.



It's not a mobile game, and I'm just trying to get the online part working as simply (codewise) as I can. So port forwarding is not an issue. ... Well, except it's not working, haha!
How can I solve the second point you mentioned?

Thanks for taking the time to help! :)
 
R

renex

Guest
How can I solve the second point you mentioned?
Try logging in to your modem and finding the WAN ip it reports. That address should be different from the one that shows up on ip finder websites, and should be a pointer to your actual machine. Now if that won't work, you'll have to seek alternatives to TCP.
 
D

Diogo

Guest
Try logging in to your modem and finding the WAN ip it reports. That address should be different from the one that shows up on ip finder websites, and should be a pointer to your actual machine. Now if that won't work, you'll have to seek alternatives to TCP.
The WAN section had no IP. The InternetGPON had one, but it was the same as the one shown by the ip finder websites. So no luck, I guess...

I've looked into Hamachi because of your suggestion and although it didn't always work, I did manage to connect 2 computer from different networks. So I'll look further into it to solve what's left.

Thanks for your help! :D
 
Top