Search Unity

Single scene for each player

Discussion in 'Multiplayer' started by pablohr88, Jun 26, 2017.

  1. pablohr88

    pablohr88

    Joined:
    Jun 15, 2016
    Posts:
    3
    Hello all:

    I've been searching through the forum but can't find anything that fits me, so there goes my question.

    I need to program a networked game, where players can login, and their progress is stored in a central server. By now, following the multiplayer tutorial, and adding some little changes, I've been able to implement this, but what I need is that the players do not see each other or their interactions. Is it possible to do this connecting all the players in a single "global" scene and hiding them? Should be necessary to create one scene for each player?

    Thanks for your help.

    P.S.: My code right now is the same as the official multiplayer tutorial, that's why I don't post it :)
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Connecting all players to one scene is a big mistake. Don't do it.
    What you need is called Master Server, which is implemented completely differently. You can always use ready solutions. Try Master Server Framework from asset store. Or pay for Photon. Official multiplayer matchmaking is a plain ripoff.

    In any case, you can check whether the action is done by a local player in Unet via isLocalPlayer variable.
     
  3. pablohr88

    pablohr88

    Joined:
    Jun 15, 2016
    Posts:
    3
    Ok thanks. I had already thought about MatchMaker, which could solve my problem too, right?

    On the other hand, that MasterServer class seem to be deprecated, won't I be in trouble in the future? The only alternative (free) is MatchMaking?

    Photon is not an option to me, as my project is not even a beta yet and it's not worth to pay for it, maybe in the future, it would be possible.

    Regards.
     
  4. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    When I wrote "Master Server" I meant abstract term, not a MasterServer class.

    If you're want something free and awesome - get Master Server Framework. That way you could host servers without any CCU limitation and paying anything except for hardware and ISP bandwidth.

    Unity's matchmaking is also an option. Though I wouldn't recommend it, since you'll have to pay for it in any case, once your game becomes something bigger than 3 people.