Search Unity

Dedicated server with executable and ability to extend functionality

Discussion in 'Multiplayer' started by Pioruniasty, Mar 19, 2018.

  1. Pioruniasty

    Pioruniasty

    Joined:
    Mar 17, 2013
    Posts:
    7
    Hi,

    I'm looking for solution to create Unity server (doesn't matter if it's uNET or any other provider) that is possible to start via executable file (.exe, .so etc.) but without host. I mean I want to allow players create their own servers on their own dedicated or virutal machines (VPS or something like that) which could be possible to connect via some ip + port.

    Also that could be very cool if those solution could be extendable. I mean I want something like that: when I start server he could display something like "starting server..." and then send POST data to some backend for example to manage list of servers in my game.

    Please, help :).
     
  2. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    How have you been starting servers without executables all these years?

    That doesn't mean there is no host. It means players can be hosts.

    Again. How did you think this works?

    Only possible if you have a central server where players broadcast own server IP.

    Solution is basic networking knowledge and hard work.
     
  3. Pioruniasty

    Pioruniasty

    Joined:
    Mar 17, 2013
    Posts:
    7
    I just want to avoid situation when some player is hosting server so when he shut down game / PC whole server will shut down too. Do you have any good tutorials how to achieve this?
     
  4. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    So players shouldn't individually host, then.

    No, because you need an extra server that will keep track on who's currently hosting and who's the backup host. Also you'll need a server to do holepuching anyway.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    That is referred to as "host migration", where one of the other clients takes over as being the host when the original host quits. Many networking API's have that functionality built in. Unity's UNET has it built in, but not when using their relay servers.

    As for your original question, you can certainly build a system where players can set up their own dedicated servers that are available via a central server browser you provide. That's how networking in a lot of older FPS games was typically done, before automatic match making became the rage.

    You'd set up a dedicated server that listens for registrations of game play dedicated servers, and provides a list of servers to clients for them to select from.
     
    Last edited: Mar 19, 2018