Setting up a permanent host on a game server

0 favourites
  • 6 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • I am now aware that I will need a game server to serve as the permanent host for our multiplayer game. I'm considering AWS, Vultr, OVH, because they have low-cost options which are adequate for the start-up phase of our project.

    Question: Do we need to know any coding knowledge to set-up the permanent host on the server? If yes (or no) is there a tutorial or guide which we can follow to set up the permanent host?

  • If you're using the built in multiplayer plugin and have designed your game similarly to how the tutorials do...

    The only requirement is that your server can run a browser (or nwjs) and your game, use it to join a room first as the host, and then stay online.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, I did follow the multiplayer tutorials and I can run an online game with three browsers: 2 are clients which use a similar .capx and 1 is the host lobby "game" which uses a separate .capx and passes info back and forth from the two clients.

    And this gets to the kernel of my earlier question: what software/process do I use to run the host lobby "game" capx without using my actual computer. Is there a plug-n-play app (which I can load on the server) which will virtually run the host lobby "game" app or do I need to code something on the serve-side?

  • You want to run a browser on your server. Like Chrome.

    Or you can export your game as an nwjs executable (which is a Chrome wrapper) and run that on your server.

    Normally a desktop type os on your server can be remotely controlled by VNC (I use TightVNC). You literally remote control the server computer to open a browser and go to the website where you exported game is hosted to run it. Or you use it to run the nwjs executable if you're on windows.

    On a side note, even if you're running a dedicated host, it is highly recommended to keep your host and peers versions unified as one project. It will work with separate files, but it can become quite a headache to maintain, even more so than a normal multiplayer project.

  • I will have to research the nwjs executable. Question: if the client app is exported as HTML5 will it still sync with the host app of it is exported via the nwjs?

    On the side note: if the host version, which is accessing datafiles which need to be kept secured, is unified with the peer version, won’t a hacker be able to more easily access the datafiles? And when you say unified, do you mean that they both the host and peer projects are combined into one .capx (and export file)?

    Per your suggestion, I’ve already started researching the VNC (TightVNC) solution. I see I am going to have to spend some time digesting this solution.

    For now, the one piece that is evading me (the forest for the trees metaphor) is, from a technical perspective, how do you get the browser on the server? Is it a plug-in, a script, something else?

    Oosyrag, I appreciate your help and advice on this evolution…it won’t be forgotten.

  • Yes. Nwjs is just a Chrome wrapper for your project in executable form. Basically you're bundling chrome with your game, and when you run it out opens a standalone version of chrome to load your game with, so it's basically no different than running it off a webpage.

    Yes that's what I mean by unified. The level of security pretty much depends entirely on how you design it. If the data files are located on the host computer, the peers would only be able to access them if you wanted them to be able to.

    The server... Is literally just like the computer you are using at home. You'll need an operating system like windows or linux, download chrome, and run it in a desktop environment. You can use VNC to control it remotely.

    If your server is command line only, you won't be able to run your project. You'll want one that can run (or virtualize) a windows or linux desktop. Technically MacOS would work too but... I don't think anyone does that.

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