GMNet Engine - beginners help?

Anyone here familiar with the GMNet Engine? It markets itself as 'Game Maker Networking made easy!' with 'no networking knowledge required', and i checked through the manual and tested the example itself, and i can see it must be pretty easy to make online games with that engine, as compared to some pre-Studio engines and tutorials.
But in the Manual (https://gmnet-engine.org/manual/) i couldn't find info on how to host and join another player's game, just the coding tutoring and how to make a game with the engine. So, i was just planning to give an Executable to my friend and test if we could actually play online on the engine, to see if it worked in the first place. But how do i join a friend's game? Is it from the Connect to Server or Online Lobby ? And what should the hosting player put there as Port and Server?
 
I got some gmnet tutorials on YouTube:
https://www.youtube.com/playlist?list=PLfMGRgz7yTw-RtXnPV7a51aoZb3fufzZ9

I would say that you still need network knowledge to make an online game.

If you want to use the online lobby you need to setup a Master server. You can also use the direct connect for online by using your routers external IP.
Thanks 4 quick reply. Yeah, some more network knowledge would seem essential. If we try to play a test game with the engine with a friend, how can he join a server i've hosted tho? Should it be as troublesome as its been so far?
 

The-any-Key

Member
You can first test if your friend can connect to your game with the direct connect (B button, enter port and IP).
Host a game on your computer ex with port 6510.
Go to https://www.whatismyip.com/ and check your extrenal IP.
Make your friend press B and enter YOUR external IP (The one you got when you went to the website) and the port 6510.

GMnet use UPnP so the port should be already forwarded. Note that this don't work with some routers. If that is the case you need to manually do a portforward.
 
You can first test if your friend can connect to your game with the direct connect (B button, enter port and IP).
Host a game on your computer ex with port 6510.
Go to https://www.whatismyip.com/ and check your extrenal IP.
Make your friend press B and enter YOUR external IP (The one you got when you went to the website) and the port 6510.

GMnet use UPnP so the port should be already forwarded. Note that this don't work with some routers. If that is the case you need to manually do a portforward.
Hey, thanks a ton 4 reply. I shall try this out. Been busy with another project lately, but with these instructions ill get back to it
 
I would say that you still need network knowledge to make an online game.
Nah, just use gamemakerserver.com instead. Works perfectly with GMS8.1 - GMS1.4.9999, and you don't have to know nothin' about nothin' to use it. I got PROJECT ENIGMA matchmaking working in 20 minutes with D&D actions.

... I heard through the grapevine that a GMS2 extension is in the works. Fingers crossed for HTML5/WebSocket support.

Do you have any examples on how to implement it into a 2d shooter?
There's a 2D shooter example included with the extension. ;)

Here's a few YouTube tutorials:



 
Last edited:

FoxyOfJungle

Kazan Games
I have already tested this GMNet Engine and it is very unstable, if I move quickly the player may notice that the movement is not synchronized, maybe it serves to make turn-based games, but I do not recommend using it. In fact, any multiplayer game is necessary to know what you are doing, at some point or another you will need to write some code. So far I haven't seen people create online multiplayer games in real time in Game Maker Studio 2, this requires a dedicated server and I would probably have to write the server in another language as GMS2 would not support many simultaneous players, so there is still a possibility create a server in Java or Python, without an interface, and use a VPS server (The prices of this type of server can be very high). GMS2 is very good for making LAN games, I believe this is the only one that is available to the majority.
Another problem would be the question of opening a port to be able to connect, getting everyone to port forward their router is a terrible idea for a commercial game, there would need to be some kind of server connect clients together using udp hole punching so people don't have to do that. (and that's just for peer to peer, not even touching on dedicated servers).
Say you release a game on Steam, it's a 4 player rogue-like (the most common kind of game for indie devs.) They want to play multiplayer together but before buying the game have no idea what port forwarding is let alone that this game needs it to function. They press host and get a nice prompt saying ("Please port forward ports xyz on your router.") the friends who aren't hosting are fine but 1 out of 4 people will still need to go through port forwarding, which is highly unprofessional. You'd see refunds from people saying the game is broken because you're expecting players to have networking knowledge.
If you want to create a functional multiplayer game that supports many players I suggest using Unity and some API's like Photon, Forge Newtorking, Mirror, among others.
 

jobjorgos

Member
I have already tested this GMNet Engine and it is very unstable, if I move quickly the player may notice that the movement is not synchronized, maybe it serves to make turn-based games, but I do not recommend using it. In fact, any multiplayer game is necessary to know what you are doing, at some point or another you will need to write some code. So far I haven't seen people create online multiplayer games in real time in Game Maker Studio 2, this requires a dedicated server and I would probably have to write the server in another language as GMS2 would not support many simultaneous players, so there is still a possibility create a server in Java or Python, without an interface, and use a VPS server (The prices of this type of server can be very high). GMS2 is very good for making LAN games, I believe this is the only one that is available to the majority.
Another problem would be the question of opening a port to be able to connect, getting everyone to port forward their router is a terrible idea for a commercial game, there would need to be some kind of server connect clients together using udp hole punching so people don't have to do that. (and that's just for peer to peer, not even touching on dedicated servers).
Say you release a game on Steam, it's a 4 player rogue-like (the most common kind of game for indie devs.) They want to play multiplayer together but before buying the game have no idea what port forwarding is let alone that this game needs it to function. They press host and get a nice prompt saying ("Please port forward ports xyz on your router.") the friends who aren't hosting are fine but 1 out of 4 people will still need to go through port forwarding, which is highly unprofessional. You'd see refunds from people saying the game is broken because you're expecting players to have networking knowledge.
If you want to create a functional multiplayer game that supports many players I suggest using Unity and some API's like Photon, Forge Newtorking, Mirror, among others.
A whole complex story... isn't it just very easy possible with a online database instead of server/synching stuff? You can easily install any online highscore extension such as globalstats.io to GameMaker, and instead using it for the highscore, you use it for the players position, and you just save/load it like the way you load a online highscore entry. Save/load all the players positions to the online highscore every step and you have a correct working online game just with 1 simple online highscore/database list. What would be the cons of making online game from a continuesly updating online database? I did it myself and it works
 

FoxyOfJungle

Kazan Games
A whole complex story... isn't it just very easy possible with a online database instead of server/synching stuff? You can easily install any online highscore extension such as globalstats.io to GameMaker, and instead using it for the highscore, you use it for the players position, and you just save/load it like the way you load a online highscore entry. Save/load all the players positions to the online highscore every step and you have a correct working online game just with 1 simple online highscore/database list. What would be the cons of making online game from a continuesly updating online database? I did it myself and it works
I speak of games in real time, there are no disadvantages to making turn-based games, I already did and it works well too, using PHP and MySQL.
 

jobjorgos

Member
I speak of games in real time, there are no disadvantages to making turn-based games, I already did and it works well too, using PHP and MySQL.
Yeah true, mySQL database works great with turn based games for sure. But it also works for real time online game... it has maybe in the worst case 5 steps delay on loading the data from mySQL, don't you have this small delay in server aswell? I dont see really the big difference between a server and an online database yet expect that a server is more complex to setup, and a server cost more money monthly (50€/$ month) than an online database(5€/$ month)
 

FoxyOfJungle

Kazan Games
Yeah true, mySQL database works great with turn based games for sure. But it also works for real time online game... it has maybe in the worst case 5 steps delay on loading the data from mySQL, don't you have this small delay in server aswell? I dont see really the big difference between a server and an online database yet expect that a server is more complex to setup, and a server cost more money monthly (50€/$ month) than an online database(5€/$ month)
Sometimes there's a delay, but it's almost nothing...
 

ThraxxMedia

Member
Yeah true, mySQL database works great with turn based games for sure. But it also works for real time online game... it has maybe in the worst case 5 steps delay on loading the data from mySQL, don't you have this small delay in server aswell? I dont see really the big difference between a server and an online database yet expect that a server is more complex to setup, and a server cost more money monthly (50€/$ month) than an online database(5€/$ month)
Databases are designed for long-term data storage, not for holding and handling temporary variables. Yes, you may succeed in building a project where this works quite well on a smaller scale... but go ahead and try to scale things up to, let's say, hundreds of simultaneously connected players, and you'll sooner or later run into problems regarding both access time and bandwidth limitations. An HTTP POST request from your run-of-the-mill database extension (which is basically how globalstats.io operates), just to update a player's x and y coordinates for example, is a WAY bigger set of data than it ever should be in terms of client-server communication.

I wouldn't actually be surprised if at some point your access to globalstats would be revoked because of too many requests. Maybe that hasn't happened yet, but trust me, if your game becomes more popular (and thus your usage of the database gets out of hand) your app is very likely to be first in line on the way to the chopping block.

There's a reason why you pay extra for dedicated gaming servers - exactly because they are designed to handle all the traffic in the most efficient manner possible, according to your specifications.
 
Last edited:

jobjorgos

Member
An HTTP POST request from your run-of-the-mill database extension (which is basically how globalstats.io operates), just to update a player's x and y coordinates for example, is a WAY bigger set of data than it ever should be in terms of client-server communication.
Ah so thats the difference... that is really interesting to know!
 

FoxyOfJungle

Kazan Games
Considering that the last answer on this topic was 7 months ago, probably in the meantime the author must have made many improvements, but I believe that it can be useful!, just testing to know in fact. The last time I used this was in 2017 or 2018...
 
thanks for renewed attention to this post. :D I havent returned to trying to create an online multiplayer in a long time now but last in Spring I checked with my friend the GMNet Engine and we didnt get it to work.
But so there's a newer version now, Ill have to download that. So it is still possible to achieve this with GMS.
I have GMS1.4, does it matter or should I upgrade to .2?
 

FoxyOfJungle

Kazan Games
thanks for renewed attention to this post. :D I havent returned to trying to create an online multiplayer in a long time now but last in Spring I checked with my friend the GMNet Engine and we didnt get it to work.
But so there's a newer version now, Ill have to download that. So it is still possible to achieve this with GMS.
I have GMS1.4, does it matter or should I upgrade to .2?
GMS 2 is much better :)
 

jobjorgos

Member
thanks for renewed attention to this post. :D I havent returned to trying to create an online multiplayer in a long time now but last in Spring I checked with my friend the GMNet Engine and we didnt get it to work.
But so there's a newer version now, Ill have to download that. So it is still possible to achieve this with GMS.
I have GMS1.4, does it matter or should I upgrade to .2?
The extension worked both in 1.4 and 2.3 for me. To get it working in 2.3, I just imported the 1.4 project. There will be shown 2 errors when you import this to 2.3. All you have to do is click on one of these errors, and just change every 'delete' you see into 'delete0' to fix everthing.
Go to https://www.whatismyip.com/ and check your extrenal IP.
And like The-any-Key said, set the host/starting server in htme_obj_menu to your IP adress, and let a friend from somewhere else try to connect to your game. If you are on WI-FI, you can just keep the port default as 6510, but I noticed if you are connected with an ethernet cable, the default port 6510 doesnot work.
If you wanna find out which port you can use when using ethernet cable instead of WI-FI, all you have to do is type “netstat -a” on Command Prompt / Run and hit the Enter button. This will populate a list of your active TCP connections. The port numbers will be shown after the IP address and the two are separated by a colon. For instance, if your IP address is something like 192. 168. 45. 2 and you’re being displayed an entry for 192. 168. 45. 2: 57961, it means the port number 57961 is open. If these results quit directly after 1 second, try to make a screenshot quick before the results are gone.
 
Last edited:
Top