How do I run multiplayer game on dedicated server?

0 favourites
  • 10 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hello!

    I`ve been toying with multiplayer games lately. I`ve made a small multiplayer action platformer using peer to peer techinique. You can check the game out in Scirra Arcade: https://www.scirra.com/arcade/multiplay ... 6-v10-5795

    Next i`d like to try programming multiplayer game that uses Client - host infrastructure. I am going to try method that Ashley is talking in this thread: multiplayer-discussion-dedicated-server-peer-and-client_t122599

    I do grasp the principals of peer / host programming in the way Ashley is referring on the thread, but....

    Problem is that I don`t know anything about servers... I`ve been searching for days and I still have no clue how to:

    • open browser tabs on server etc. (i know that I could do this on my own PC, but I am looking towards Web hosting)

    SO.... how is opening browser tabs on a server done? Would I need a hosted virtual machine for that or is there another way? Does any one know a good tutorial on setting up servers this way?

  • A server - computer that is always on. What you do/put on the server is up to you. Where the server is located is also up to you.

    You can build/run your own server at home or work, or you can rent a space in a colocation and host your server there.

    Or you can rent someone else's server if you don't have your own. Or you can rent a virtual machine that's on someone else's shared physical server.

    Basically once you have your server (it can run windows, linux, whatever you install/rent), you'll open a browser on it, log into your game, and leave it on. Going to recommend not using windows, as it tends to restart itself for updates and not turn back on unless you really know what you're doing.

  • Ok, maybe I was exaggerating a bit when I said that I don`t know anything about servers... I do know what they are, but I am not aware how to configurate them and which hosting service provider would be suitable for my needs.

    Many service providers have ton of different options and it is really hard to grasp what do i need...

    So basicly my needs are:

    • to be able to open browser tabs on the server
    • to have enough bandwidth to be able to host simple action game for about 40 simultanious players (players would be divided in 8 rooms.
    • bandwidth requirement would be around 20 bytes / peer
  • I just took a look and saw that you need a dedicated server.

    Didn't look any further for configuration, because of the first hurdles.

    The rent of a dedicated root server will typically cost 50$ per month.

    The other option is to setup your own server at home - that now has to run 24/7.

    So this is how it would work:

    • take an old crappy computer and install WAMP (Windows) or even better LAMP (Linux) on it (now it's a full fletched Web Server)
    • configure your router so you can see your server from the outside - I think, I would configure a DMZ zone for the server and configure the firewall of the server as closed up as possible
    • check if you get always the same IP address from your provider (some give you a different one every x hours) But it isn't a big problem if he does, you only need a web service to fix that (also a not - a lot of providers don't allow servers at home - but usually they don't care).
    • till now you only can access with an IP adress. So you could think about to buy your own domain name
  • Thanks for the info fm4fanAt.

    ATM. I am not intressed of running my own hardware. Mainreason being that I live outside of the city lights so to speak and there for I do not have access to really stable web connections (or even electricity for that matter).

    There for i would need a web hosting... So I still are in need of good entry level web host and some guidance how to start configuring my rented server? Again I only need to be able to run browser tabs on the server, nothing more. (I am guessing I need alot mor to actually do this tho)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We use and love Amazon Web Services for all of our server needs. They offer a free server in the cloud for a year too, after which it is like 20USD/mo for a micro server. All of our servers are based on their Oregon cloud, but you can get cloud servers at any of their facilities around the world. You login to your server using SSH via puTTY and winSCP (for Linux servers; Do not use Windows servers!).

    We are presently using three servers and one database. One server for our security gateway/proxy, one for our game client, and one for our website/forums. All of our servers together with the database cost around 100USD/mo.

    From there, you can use PHP/Python/Java based on a variety of installable software like Apache Web Server, Apache Tomcat, etc. Then you create an application program interface (API) for your client to talk to your server. Then you use AJAX to communicate between C2 and your server. You probably want a database (MySQL, PostgresQL, Cassandra, etc.) too, which you can either rent from AWS or install on your micro server yourself.

    I can go into a lot more detail in PM if you are interested.

  • Thanks for your response gumshoe2029. I will PM you for more info!

  • We use and love Amazon Web Services for all of our server needs. They offer a free server in the cloud for a year too, after which it is like 20USD/mo for a micro server. All of our servers are based on their Oregon cloud, but you can get cloud servers at any of their facilities around the world. You login to your server using SSH via puTTY and winSCP (for Linux servers; Do not use Windows servers!).

    We are presently using three servers and one database. One server for our security gateway/proxy, one for our game client, and one for our website/forums. All of our servers together with the database cost around 100USD/mo.

    From there, you can use PHP/Python/Java based on a variety of installable software like Apache Web Server, Apache Tomcat, etc. Then you create an application program interface (API) for your client to talk to your server. Then you use AJAX to communicate between C2 and your server. You probably want a database (MySQL, PostgresQL, Cassandra, etc.) too, which you can either rent from AWS or install on your micro server yourself.

    I can go into a lot more detail in PM if you are interested.

    Hi gumshoe! I was wondering if you could help me out about connecting construct 2 with AWS? It would really help me out! Could I PM you?

  • Hey Aanand, feel free to PM or email me, and I will walk you through setup, etc.

  • Hey Aanand, feel free to PM or email me, and I will walk you through setup, etc.

    Hi Gumshoe2029, thanks for your reply!

    I have emailed as the scirra forum did not let me PM you.

    Hope you get a chance to read my email!

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