Idea gms 2 server hosting

C

Cowlord

Guest
Crowd funding to address multiplayer in GMS is the way to go, I will definitely support this project!
 

SoVes

Member
I've got a full plan of how to do it. the question is just if i'm gonna get funded. I can't afford to build a server pc
 
F

Famine

Guest
Why would you when you have all these cloud hosting options today? What's the benefit?
 

andev

Member
Your strawpoll needs a "I'm interested, but the concept is too vague to develop an opinion" option ;)
  • What exactly is this, and how would it work?
  • Multiplayer game code is extremely specific to the game at hand, how would you let developers submit their code to run in your cloud?
  • Would you have a free option for testing purposes, and then once you release, you buy a "commercial" package that deals with the much larger user base using it regularly?

A really generalised method could be: "every player is allocated a set of variables, and your server syncs everyone that's online's variables". But there's only so much you could do with that, without some serious creativity. And if you had the creativity to utilise it effectively, you might be better off just learning how to do it yourself.
 

meseta

Member
This is also an area I'm interested in. I highly recommend doing it in the cloud. Google Cloud has a $300 sign-on bonus right now.

I'm currently working on this (mostly for my own use), so far I have a matchmaking/relay service built on top of Google Cloud and Kubernetes. The relay service is pretty basic - when enough players join, matchmaker spins up new cloud resources (containers) as needed, each session gets its own relay container; the IP and port of this newly created relays gets sent back to the clients who can now connect to it. Think of the relay as just part of your "network", all it does in forward packets from one client to all connected clients, think of it is part of the network rather than a "server" in its own right. After all users disconnect, the relay automatically terminates, and scales back to minimise costs - the running cost of these server, because of the auto-scaling, is of the order of half a cent per hour. So if the game is 2 hours long, I pay 1 cent. If there are 1000 sessions a day, each lasting 15 minutes, I pay about $40. So it's quite affordable and very scaleable this way.

The reason this is useful is now your netcode just has to connect to the matchmaking server, wait for enough players to join, then connect to the relay server to be able to talk to all players in the session. There's no need to deal with firewalls or port-forwarding since you only need to make an outgoing connection. This is why it is a "relay server", as opposed to a "dedicated game server". It's not game-specific, and could be used by any game whose netcode is non-authoritative or client-host that can tolerate a little bit of extra ping. It would not be suitable for authoritative dedicated hosts.

If you're interested in the GMS side of the code, the reference implementation is here: https://meseta.itch.io/gmcloud-relay?password=packetdrop . My server is currently active, so you would be able to run the demo. It's a very basic drawing demo, click to draw. In the future I will be upgrading this to UDP and adding authentication so I can ensure only authorized games are connected.

If you do go ahead with your plan, I agree with Cowlord, I would highly recommend using a VPS or cloud service. You won't get faster network connections elsewhere.
 
C

Cowlord

Guest
I have been playing around with PlayFab (Backend as a Service) using the REST API (http webhooks). They also have an SDK for C++, Android, Obj-C if someone wanted to make extensions. Basically free cloud server for indies.

Edit: Here is where you should start if you want to look into it - https://api.playfab.com/tutorials/postman
 

TheWaffle

Member
Actually, its much easier than that. If done as a match - maker idea, the cloud does not need to know anything about the game. Every game is different, but they all need the same information : Player Names, User IP addresses, which player is which (player 1,2,3 ...) that is all the information a match-maker needs to function. If you want to get fancy, you can add
player ranking and sorting. This could be done by moving players around to different servers by ping-time or rank .... The only complex part is scalability. Making the sorting stuff optional until the player count exceeds a certain threshold.

edit: Working on this. first draft is up for review......
 
Last edited:
Top