GMS 2.3+ Server hosting and its capabilities.

Morkinas

Member
So I'm making a game that has multiplayer and as I just dove into networking so far so good, but I want to ask you guys for some help answering my questions to make up my mind if I should invest time into multiplayer or should I stick with single-player only.

1) If I would host a server I would like to do it on my PC and I wonder is there a way to roughly calculate how many players could server host, example:
PC specs: i5-4590, 8GB RAM, GTX 970 4GB. (also which hardware is more important in hosting such server?) 300Mbps download/upload (can get 1GBs if needed), Windows10 as of now, might switch to Ubuntu for hosting.
Server: receive 7*30 Bytes per sec, do a couple simple calculations and send 7*30 Bytes per sec. (per player) + some connect/disconnect handling, 7=Bytes 30=Times its sent per sec.

2) I heard GML servers are not that great, is it true? Could I get away with it or it would be much better to make server in another language?

3) Any other tips appreciated.

Edit: 4) If I would use hosting services, how many people could I host per 1RAM, 1 core roughly?

-Thanks
 
Last edited:
Hosting on your own PC is going to be a bad time unless you have like 10 consistent users or whatever. If your game grows at all, it's gonna cause a lot of headaches (plus you can never turn the PC off). And yes, GML servers aren't great. It's doable, but usually more for connecting two to four players directly together from a host PC (usually one of said players), not anything with a lot of users.
 

mikix

Member
I believe server hosting games are like dial up modems were in the 90s when you had to pay per minute. But instead, you pay per "data moved". Very expensive.
 

Mr Magnus

Viking King
1 ) I strongly advise that you don't host a permanent server on your own network. It takes so little for it to become nothing but pain and hassle. Either give the players an ability to host their own servers for their friends (ala Minecraft) or if you want a centralized server everyone plays on then you're better off finding a hosting company to handle the logistics and security for you. There are too many variables to calculate how many people you can comfortably support on a home hosted server, but generally it will depend on the nature of your game, how computationally tense running the server is, how much data is being passed, and what else your computer is doing.

2 ) GML is not the best language in the world. It's pretty slow and GML servers - because they are built on a game engine - tend to be trying to do a lot of things not related to hosting the game. A GML server is running a game loop and trying to pretend it's a video game that happens to include some networking. While it's not untenable - especially if you're just running a small server for a couple of friends - if you want to scale it up eventually you'll want to move to a more focused, faster language that can focus all of its efforts in being a server.

3 ) Learning networking is a great time and very rewarding. I strongly recommend you try even if just for the experience. However if this is a time-sensitive project that your risking something on you maybe should see where to focus your efforts.
 
So I'm making a game that has multiplayer and as I just dove into networking so far so good, but I want to ask you guys for some help answering my questions to make up my mind if I should invest time into multiplayer or should I stick with single-player only.
You could write your entire server code in GML and have it bundled with your game. This way, your player just hosts the server themselves from ingame and other players connect from their game. If this is your first time learning networking, this is probably the best place to start!

But if you wanted to go deeper and have a global lobby or even have dedicated hosting, you'll need to dive a little deeper.

1) If I would host a server I would like to do it on my PC and I wonder is there a way to roughly calculate how many players could server host, example:
As everyone else is saying,
don't.
It's fine for testing purposes but once you launch your game, absolutely do not rely on something like this. 1 powercut or internet outage and you'll be swarmed with negative reviews from angry players unable to play, demanding their money back. "Servers are always down!!!", not to mention the security risks of publishing your home IP.

2) I heard GML servers are not that great, is it true? Could I get away with it or it would be much better to make server in another language?
You can get away with it, GML can run headless, or you could buy a very expensive graphics card host (like 30x the price).

Alternatively if your servers will be 100% user hosted (no master server), this can work.

But learning another language is much easier than you expect. Python or java work great with game maker, and they're very similar once you get going.

Java:
The jetbrains IDE is very friendly and almost entirely prevents you from compiling without errors. The error checking holds your hand throughout the whole process, telling you exactly what's wrong. I recommend 100%. Intimidating error messages but one google search and stack overflow will get you on your way.

Python:
Very lenient language, easy to pick up, probably the most similar to GML. But you can run into headaches with different versions being incompatible with each other and because it's not strongly typed, the IDE tends to not be that helpful.

You will also need to follow some tutorials on linux command line operating for your server hosting. It sounds intimidating but once you've learned what it all does, in reality it's like 5-6 copy pastes from notes to get it all working.

You'll also need some FTP software like filezilla to upload files to your VPS.

For the hosting itself, I've used digital ocean, they're pretty good, amazing customer support / help articles too.

Edit: 4) If I would use hosting services, how many people could I host per 1RAM, 1 core roughly?
It depends on your game. You could host 100 concurrent chess games, or a single frustratingly slow minecraft server. We'd need more info
 
Last edited:
Top