How to start on online multiplayer matchmaking and lobbies?

ac585318

Member
So for a few years I've had a game I really wanted to make but it is one which can only really be played multiplayer online. I'd ideally want it to have a lobby system where a player can join rooms of players who can talk to and challenge each other, pretty much like how ArcSys fighting games do it.

I'm pretty set on this game but I don't know where to begin and have little to no experience with networking and servers. I've looked at a few tutorials but they are mostly from 3+ years ago so I'm worried they'll be outdated... Does anyone know of any up-to-date beginner friendly resources, guides and/or tutorials which can teach me (and any others)?
 

FrostyCat

Redemption Seeker
So for a few years I've had a game I really wanted to make but it is one which can only really be played multiplayer online. I'd ideally want it to have a lobby system where a player can join rooms of players who can talk to and challenge each other, pretty much like how ArcSys fighting games do it.

I'm pretty set on this game but I don't know where to begin and have little to no experience with networking and servers. I've looked at a few tutorials but they are mostly from 3+ years ago so I'm worried they'll be outdated... Does anyone know of any up-to-date beginner friendly resources, guides and/or tutorials which can teach me (and any others)?
Then keep using those tutorials, they aren't outdated. While the exact implementation may have changed since then (e.g. from instance_create() to instance_create_layer()), the networking functions involved have not changed from GMS 1 to GMS 2, and neither have the basic theory. In particular, the relationship between multiplayer games and correspondence chess still holds in any case:
One thing that I now demand of all networking novices is an understanding of procedures in correspondence chess, even if they don't all play chess. That's the closest physical analogue of how actual multiplayer games work, and it stops dead most rookie myths about multiplayer games.
  • The connection is not a shared board between the players on a table, it's just the mailman in a correspondence game.
  • Nothing happens on your board until you act upon mail sent out by your opponent.
  • Nothing happens on your opponent's board until you send him/her mail stating what your move is.
  • For the same reason you can't use chess notation in backgammon, bridge or StarCraft, you have to tailor the form and notation to the game.
And no, the stuff already there is as "beginner-friendly" as it can get. Networking is an intermediate- to advanced-level topic that demands a complete grasp of logic, GML syntax, variables, data structures and resource management, Wanting to do something for years doesn't give you a free pass on basics.
 

Carbon

Member
My suggestion would be to learn the basics of client-server communications first. Then learn how to write your server in node.js, and mongoDB for your database. On GameMaker (client) side of things, always target HTML5 using WebSocket (which doesn't work out of the box, so you should write the javascript extension yourself, either from scratch or from libraries like socket.io), because it can deploy to other platforms very easily, using Cordova/Phonegap for mobile or wrap them with a runtime environment to be running natively on Windows/OSX, or even good ol' browsers with canvas/webGL.

You're hitting two (or even more) birds with one stone when doing this.

If you know the basics it shouldn't be too hard. First off, javascript is a simple language. You only need to work on how to really build the server vs. having to learn the language. Coming from a traditional development myself, it's not really my cup of tea, but that's okay, because there is TypeScript. So you always have options there.

Also, prepare for some cash. Those servers ain't paying for themselves, just as a rough estimate, if you have players just in the realms of 100-200s in an MMORPG, you already need a dedicated server which costs up to $300-$400 a month depending on many other obvious things like the size of your game, your server logic efficiency, etc.

In the case of you not knowing even what the heck am I talking about, then perhaps it's time to buckle down and learn the basics first. Start from where? -> Read first paragraph
 
Top