Search Unity

Multiple Dedicated servers, one game instance?

Discussion in 'Multiplayer' started by dxgriego, Jan 1, 2019.

  1. dxgriego

    dxgriego

    Joined:
    Nov 9, 2017
    Posts:
    3
    Is it possible to run one game instance, for a game with building for example, but have different parts of the same world be processed by different servers, yet the player could walk through each seemlessly(no lag of transferring between servers)? I am trying to think of a way to do this but can't figure it out.
     
  2. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    You will need to write communication into your servers, so they can hand characters over to each other. They'd want to keep a list of their neighbouring servers or something like that.
     
    Joe-Censored likes this.
  3. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    Usually you are better off avoiding that, if possible. The more fragmented is your game logic and state the more complex will it be to integrate it. If your game state is distributed across multiple servers accessing such state from one node will require multiple calls between servers to retrieve the data.

    The problem with this is that reading local state is fast but reading remote state is terribly slow, like 3 orders of magnitude slower. This in turn causes scalability issues, bottlenecks and similar problems that slow down your system.

    Generally speaking distributed systems are a big pain in the neck and require a good amount of experience. For multiplayer games I would suggest to keep a simple approach where you have lobby servers and game servers. Lobbies are for players to meet and start or join games. Game servers deal exclusively with "rooms" where players gather to play.
    Add a central database in the mix for storage (user profiles, leaderboards, etc...) and you should be able to deal with most game designs.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Moving the client from server to server with a loading scene in between is not too difficult relatively speaking. Doing it seamlessly will require a lot of custom networking work, but yes it is possible. The nature of the question tells me developing a purpose built networking API to handle this isn't what the OP is ready for.
     
    Last edited: Jan 2, 2019