Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Advice Needed on Dedicated GameServers

Discussion in 'Multiplayer' started by EliJNemer, Dec 26, 2019.

  1. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    123
    Hello,

    i am currently trying to set up Multiplayer for my game, in which i have chosen to take the dedicated server route.

    this means that if a game of 2 players is running there will be only one instance of the game on the server where the server will only recieve input from the clients...
    (please correct me or update me on this info)

    i would like to know what is the best method for running an instance of a unity game on servers to increase max potential instances on each server, considering they are 8 core 16 thread..

    also how is the best method to set up my game for the server..

    im considering linux as the operating system this since i read that it is better..

    also i would like to know if photon server or any other of the like comes into play in this scenario.

    also is this a hard process or is it as simple as installing the game on the server and running it, and connecting clients and user input?
    (obviously with a few extra steps)

    thanks in advance
     
    Last edited: Dec 26, 2019
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The "best" method depends on your game.

    For example, if your game was a card game, where you don't need things like server side physics or even server side representations of gameobjects at all, you could potentially have thousands of players in hundreds of games all connected to the same server applications running all of them. In that case it wouldn't necessarily need to be a Unity build at all.

    If you want things like server authoritative physics, or other Unity features on the server, Unity isn't really set up for running multiple independent scenes at the same time which won't interact with each other, so you're probably going to go with a separate instance of the server app for each match and a master server coordinating. I haven't used Photon, and there's a few different iterations of it, but for something like physics I think you'd have one of the clients handle it since the photon server itself doesn't have its own physics engine last I checked a few years back.

    As far as a single instance of a game running on your own server, in its simplest form yes it is as easy as installing the game on the server and running it, then having clients connect to its IP address. A master server managing server instances complicates it a bit.
     
    EliJNemer likes this.
  3. stefan-falk

    stefan-falk

    Joined:
    Nov 24, 2019
    Posts:
    15
    Since I am currently reading into the same topic, I got a question towards this here:

    I hope it's okay, EliJNemer, if I add a follow up question:

    My project is supposed to end up as an RTS game. Generally, peer-to-peer was/is recommended for something like this but it seems that because of the complexity that emerges with the Lockstep Protocol, and also improving bandwidth for more and more people, a server-client solution becomes more viable.

    By "separate instance", are we talking about a headless instance (the game without rendering) which runs as an authorative server (with physics simulations) for other players or how can this be understood?

    In any case: Is there anything that can get me going with a dedicated server for a Unity game? I find it hard to get started since most tutorials or blogs use the standard NetworkManager (peer-to-peer) approach.
     
  4. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    123
    yes..

    im not exactly a reliable source of info on this, as in my own project i am attempting to make a dedicated server solution but i am currently considering changing to peer to peer approach since i found it a little difficult and am going with the simpler is better motto..

    if i were to do a dedicated server, with the info i have procured up till now. i understand that there is AWS Gamelift, which is good with the server infrastructure, i was using photon bolt for callbacks and such, and playfab for client logins and personal preferences..

    (as i am not a pro, please anyone feel free to correct me)
     
    Joe-Censored likes this.
  5. stefan-falk

    stefan-falk

    Joined:
    Nov 24, 2019
    Posts:
    15