Legacy GM Client won't connect to server if on different computer

E

EndermanTamer13

Guest
I know I've posted a thread on this before, but this is a problem I'm having a year later, and I don't want to try to bump the old thread only to probably get no response so...

I tried testing networking by trying to implement online multiplayer into a little minigame I made. Nothing happens when you connect to the server, but I can tell when the client connects. I'm sure the port I'm using (port 14998) is forwarded, because I've tried that port with other games and it worked. I don't know what the problem is, but I'd like some help, as I'd like to start making online multiplayer games.
 
F

Fishman1175

Guest
What kind of network is each computer on?
You could post the client and server connection code.
I’m assuming you’re trying TCP?
If you haven’t explicitly opened port 14998 then it’s probably not open, and those ‘other games’ are using a workaround like Udp punching.
If this is windows then make sure each computer has an entry to allow communication through windows firewall.
 
E

EndermanTamer13

Guest
I’m assuming you’re trying TCP?
If you haven’t explicitly opened port 14998 then it’s probably not open, and those ‘other games’ are using a workaround like Udp punching.
I have explicitly forwarded port 14998. A game I tested it with is this game called Risk of Rain. I had to use a program called Hamachi to play it online with friends because I couldn't port forward. I tried it yesterday without hamachi using port 14998 and it worked just fine, so port 14998 is definitely forwarded.

What kind of network is each computer on?
You could post the client and server connection code.
What kind of network? I don't know what you mean by that.
And I can post the client and server connection code. I haven't programmed anything to happen when the client connects yet, so it's very simple. Here's the server setup:

Code:
server = network_create_server(network_socket_tcp,14998,3);
And here's the client connection code:

Code:
client = network_create_socket(network_socket_tcp);
network_connect(client,global.ip,14998);
 
F

Fishman1175

Guest
By network, I mean how are the computers connected to the network. Are they on the same local network (like at your house for example)? Are they on different local networks connected to the internet behind a router?

Have you tried testing the game connection locally on your machine with the loopback address of 127.0.0.1?

What is the IP you are trying? GameMaker networking functions only work with IPV4 so if you're using IPV6 addresses then it won't work.
 
E

EndermanTamer13

Guest
By network, I mean how are the computers connected to the network. Are they on the same local network (like at your house for example)? Are they on different local networks connected to the internet behind a router?
I've tried both. Neither work.

Have you tried testing the game connection locally on your machine with the loopback address of 127.0.0.1?
Yes! I've tried this, and it works. It's the only setup that works so far.

What is the IP you are trying? GameMaker networking functions only work with IPV4 so if you're using IPV6 addresses then it won't work.
IPV4. I've tried using both my computer's internal and external IP in the appropriate cases. Nothing works.
 
Top