Networking and Multiplayer

N

Nabil Kabour

Guest
Hey so I've been getting into networking in game maker, and I have followed Heartbeast's tutorial, and the yoyogames tutorial. I also just finished following RealTutsGML's Game Maker Studio: Let's build a Multiplayer Shooter. This is what I'm talking about:

I think I understand how everything works, however I have a question. How do I go about making the connections online. As in having the server somewhere on the internet, and the clients somewhere else (as opposed to using 127.0.0.1).

Thanks
 
B

Bayesian

Guest
Are you sure you're using IPv4 ex: 0.0.0.0 and not IPv6 ex: 2001:0db8:85a3:0000:0000:8a2e:0370:7334?
 
N

Nabil Kabour

Guest
Are you sure you're using IPv4 ex: 0.0.0.0 and not IPv6 ex: 2001:0db8:85a3:0000:0000:8a2e:0370:7334?
Yes. I think the issue could be that I'm trying to connect to my external IP address through my own computer.
 
You probably have to port forward to your PC to connect with your external IP.
This can be done on almost any router. All you need to know is your local IP and which port to forward (the one you use in GM).
Let me know if you need more info
 
N

Nabil Kabour

Guest
You probably have to port forward to your PC to connect with your external IP.
This can be done on almost any router. All you need to know is your local IP and which port to forward (the one you use in GM).
Let me know if you need more info
My router only gives the option to MAC forward. I entered the MAC address of my PC and the port used in GM, and the client still hangs.
 

The-any-Key

Member
If you use TCP and try connect it will "hang" until the connection is successful or timeout.
This 60 second hang often means that the connection failed.
You still need to setup your router to forward the port on TCP to your machine where the server is running.

Best is to Google some network theory to get a better "hang" how it works.
 
N

Nabil Kabour

Guest
If you use TCP and try connect it will "hang" until the connection is successful or timeout.
This 60 second hang often means that the connection failed.
You still need to setup your router to forward the port on TCP to your machine where the server is running.

Best is to Google some network theory to get a better "hang" how it works.
I don't understand what you're trying to say. I just said I MAC forwarded my PC, which is the only option my router gives.
 

The-any-Key

Member
The MAC address, what I understand, is only used in Layer 2 in the data link layer. So it only works from network node to network node (often in the same network).
Ex when you want router A in your network to forward messages to router B. But this only work with Ethernet packets. Ethernet packets is packets that use MAC address instead of IP addresses. Even if Ethernet packets hold IP and TCP packets as a payload inside the Ethernet packet, the packet is still only a Ethernet packet.
The connection packet from the game that travel to your router will not be recognised as a Ethernet packet. Because it's a IP or TCP packet and use IP as address. So it will not be forwarded to your server via the MAC forward. Because the MAC forward only forward Ethernet packets.

In the end you might need another router that allow IP and TCP forward.
 
N

Nabil Kabour

Guest
The MAC address, what I understand, is only used in Layer 2 in the data link layer. So it only works from network node to network node (often in the same network).
Ex when you want router A in your network to forward messages to router B. But this only work with Ethernet packets. Ethernet packets is packets that use MAC address instead of IP addresses. Even if Ethernet packets hold IP and TCP packets as a payload inside the Ethernet packet, the packet is still only a Ethernet packet.
The connection packet from the game that travel to your router will not be recognised as a Ethernet packet. Because it's a IP or TCP packet and use IP as address. So it will not be forwarded to your server via the MAC forward. Because the MAC forward only forward Ethernet packets.

In the end you might need another router that allow IP and TCP forward.
My connection uses a modem that has a gateway. So basically do I connect an external router to the modem?
 

The-any-Key

Member
There are no guaranties but you can always try.
Note that your ISP may also block incoming connections. (if you got a cheap ISP or if its 3G/4G based)
 
Top