-1
\$\begingroup\$

I'm using gamemaker studio 2 to create an RPG, at the moment it's only single player but I would ideally like to make it multiplayer if possible.

I've done a bit of research but all the information seems to be more for using your PC like a server whereas I own an actually server that I'd like to use for it.

I have a website that the game is embedded on, the files for it are all stored on my server along with my website's files.

I want to make it so that the game is constantly running 24/7 and can handle quite a few people playing at once, I imagine that this may be difficult to achieve although not impossible.

I feel I have the resources available to make this happen but I'm not sure on the steps I'd take to get to where I want to be.

If there's any more information that would help, I will update my question for you.

\$\endgroup\$
  • \$\begingroup\$ You can probably take a look at "socket programming" to connect a server and multiple clients together. I have no experience with Gamemaker so I can't suggest something more relevant. After a quick online search of "Gamemaker multiplayer tutorial" I found some results, did you take a look at them? \$\endgroup\$ – TomTsagk Feb 19 at 11:21
  • \$\begingroup\$ Tom, thanks for your response. I did have a look at some of the online tutorials but they seem to be only using your PC as a server and having the 'server' running only when you have the game running on your PC and only have a few people playing at once. I want to take this a step further and have it running continuously on my own server with an unlimited number of players. \$\endgroup\$ – Ember Feb 19 at 11:32
  • \$\begingroup\$ Your server is a PC, you can make a "headless" version of your game, that doesn't have graphics, but calculates the state of the game, and have people connect to it. It's better to start with something small while you learn and move one step at a time. Also it's impossible to support "unlimited" number of players, especially with no experience in network programming. \$\endgroup\$ – TomTsagk Feb 19 at 11:34
  • \$\begingroup\$ No, sorry I think I worded that badly, I own a dedicated server. \$\endgroup\$ – Ember Feb 19 at 11:38
  • \$\begingroup\$ The Game Maker environment isn't suited for creating high performance servers and should not be used that way. You would want to create the server in some other general purpose language like Java, C# or whatever else you like. You should of course use the "Game Maker Language" networking-API in your client. It's a thin but easy to use abstraction of UDP/TCP socket networking. \$\endgroup\$ – VaTTeRGeR Feb 21 at 22:07
2
\$\begingroup\$

A server that you own is nothing more than another PC running somewhere in the world 24/7.

Make a "headless" version of your game, that acts as a server, and has no graphics, only calculates the game's state. Upload that game to your server and run it. Now make a normal version of your game and connect with your server. I have no experience with GameMaker, but by reading a few tutorials of how to connect with other players, it should become more obvious of how its done.

Start by making the server accept only 1 connection at a time. Experiment with it, how it feels to program with networking in mind. Once comfortable, start adding more players. Handling networking properly is not an easy task, and trying to support "unlimited" number of players should not be approached by someone who has no experience in it.

Keep in mind that multi-billion companies out there have problems with too many people connecting, and servers crashing.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.