Search Unity

Looking for help planning a server solution to manage multiple scenes concurrently

Discussion in 'Multiplayer' started by Pixotic, Dec 2, 2013.

  1. Pixotic

    Pixotic

    Joined:
    Nov 24, 2013
    Posts:
    1
    Hello!

    I recently got into Unity and am putting together a Freelancer-style game as a learning project. Multiplayer will be a big part of this, since I need the experience with networking.

    From a gameplay perspective, the game is separated out into multiple solar systems, each one is a scene. Players are free to fly around and to travel to other solar systems via a jumpgate network.

    Programmatically this is very simple in single player, ship collides with trigger object and it loads up the new scene, no problem. The problem I'm trying to solve is realising this system in a multiplayer environment - I obviously don't want a star system to blink out of existence when one player leaves if there are other players still there!

    I have a solution in mind which I think will work well, a hub/spoke setup where the central hub server manages the basic duties and would spin up server instances to manage each scene in the game individually.

    With regards to specific server tech, This is not something I want centralised on any particular service, I'm looking for a similar setup to what Mojang has with Minecraft - The game ships with client and server in the box, players can run their own servers or set up dedicated servers on their own hosting/etc. So far I haven't seen a networking package that seems to support this.

    TL;DR: Looking for a server package that lets me provide the user with their own dedicated server executable. I also need to learn how I can put together a server that can serve multiple scenes concurrently. Think small-scale mmo.

    Any advice is greatly appreciated, thanks for taking the time to read my post!
     
  2. nastasache

    nastasache

    Joined:
    Jan 2, 2012
    Posts:
    74
    Hi Pixotic,
    I have a package under Asset Store describing how people may have a dedicated game server executable on their hosting. The package it's named FPShootNet, it's about FPS single / multiplayer and have no exit to the next level in multiplayer mode (game server having the level already configured at start) but maybe it's free documentation may help you a bit. Few ideas (but not tested on my own) in using multiple scenes concurrently on multiplayer server may be: 1) use multiple scenes at the same level (isolating scenes visually) with some sort of teleporting points just changing player positions to ne next scene area; 2) start multiple game servers (each having own scene/level) and trying to switch the player to a server automatically (but this idea may be utopic one). Of course, there may be better solutions based for example on Photon.
     
  3. StaticDelvar

    StaticDelvar

    Joined:
    Aug 1, 2013
    Posts:
    5
    your idea sounds similar to mine, http://forum.unity3d.com/threads/213337-Multiple-concurent-sectors-and-players-with-limited-views

    im currently building a simple POC in my spare time but it seems to work fine, basically assign each player with a 'SectorId' then use NetworkView.SetScope against each player int aht sector to enable updates and fals for anythign not int eh same sector.

    it means you have to have each sector spread out over your servers world space OR use layers and overlap them.
    the first limits your scale per sector the second limits the number of active sectors.
    as my idea is essentially 2d im stacking them atop each other like a multi story car park.

    the layers approach should work for 3d games but you are very limited to the number of active sectors and it limits you in other ways like using separate layers for collision matrix.

    sorry i cant help with server hosting side of things.