How do I setup a multiplayer server? What do I need?

0 favourites
  • 6 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • I've been looking to make a web-based online multiplayer RPG for a while... It needs to be server based (not peer to peer) and the interations need to have as little lag as possible as there will be PvP.

    The aim is to have a lobby where 5 people can join a session.

    Can anyone explain in simple terms what exactly it is I need in order to do so?

    Sorry for the vague question, but I simply don't have a clue what is needed... or where to start.

    I have a Linux VPS for some web dev work I do... is that of any use?

    Thanks for any advice.

  • I did some research into servers. They look nice, but in the end I opted for the C3 multiplayer plug in. If you can make one of the players a host, then really you dont need a server.

    I would highly recommend going all the way through the Construct Multiplayer tuts to begin with.

    I think the process is pretty smooth when using the stock plug in. Some real tricky things to note are:

    • The plugin is really good at sending numbers but not strings
    • There should be some built in system to deal with different speeds. In my game, once all the things are loaded and ready to go, I have all the peers send a message to the host. Once the host has received a message from all the peers, then the host 'broadcasts' a 'START' trigger.
    • The 'setbit' stuff looks really confusing on the surface, but once you give it a little time, you'll realize its actually real simple. It's almost like a mini 8 box array or something. With it, you can easily send all sorts of commands from the peer to the host while also using very minimal data, and hence little lag.
    • The easiest way to get started would be to reimagine the game in your head to fit one of the Construct multiplayer templates. There are lots of little things where, if you do it wrong, it wont work. So just following the tut step by tep to begin with is helpful.


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for your reply... that's all really useful stuff for another if my templates, however for the game in mind I'm not sure peer to peer is appropriate.

    I couldn't have everyones game ended just because the host decided to end their game?

    Is there a way around this?

  • Just because it is peer to peer, doesn't mean you can't have a server.

    You would have a dedicated server join first to take the role of the host, and always leave it on.

  • Okay this all sounds interesting... So what exactly would I need to run the games then?

    Could it be done on a standard Linus VPS?

    Would I need some sort of DB integration?

    I'd be happy to pay someone to set up a working example if I can't manage it myself.

  • A dedicated server is any computer that stays on and connected to the internet.

    If you were using the included multiplayer plugin for peer to peer, all the server would need is to be able to open a browser. Any desktop environment running Windows,Linux, or MacOS can do this.

    Would it need DB integration? Maybe. Do you need DB integration? You can build your own DB in an array. If all you need is a DB, you might not even need multiplayer at all. Each player can just communicate with the DB directly and not with each other. You can interact with a MySQL database through PHP with the ajax plugin. This database could be hosted on any normal website server. Or you can just save to local storage on the host machine.

    Do you need remote access and control? Most desktop environments can be accessed through vnc software.

    If you have no idea what you're doing, you're probably best off using a third party backend service like Photon or gamesparks or playfab ect.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)