Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Need Help about multiple online scene for multiple user

Discussion in 'Multiplayer' started by shohagmist, Nov 29, 2015.

  1. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    Unity's built in Multiplayer System provides option of Offline Scene and Online Scene in Network Manager.
    When a user starts a server, the online scene is loaded and joining that server other players are brought to that "Online scene".
    That's how it works. It is totally cool and I can implement the system.

    But I have a different aspect. Say, I have 4 players who will play with each other. But I don't want them to be in one scene i.e the "Online Scene" which was initialised in the Network Manager. I want different view for every players, but their moves/turns will be synchronized according to their own scene perspective.

    Like, a gameobject (a cube) is in position(0, 0, 0) in player 1's scene. But Player 2 will see the same gameobject in position(0, -4, 0) in his scene. Player 3 will see it in another position of his scene and so on.

    Is it possible using the available plugins i.e UNET, Photon ?

    How can I do that? Any suggestion is highly appreciated.
     
  2. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    @seanr , @Erik Juhl
    Can you please help me? I beg pardon for bothering you.
     
  3. the_game_maker

    the_game_maker

    Joined:
    Nov 15, 2014
    Posts:
    65
    Hmm... That seems pretty hard. I'll have a look at it and see if I can find a solution. I'd say you'd need a foreach loop to check the players, then choose a random number between 1 and the amount of scenes you have. Then use Application.LoadLevel() to load the different levels. To put the GameObjects in all the scenes but at different positions would be hard
     
  4. shohagmist

    shohagmist

    Joined:
    May 19, 2015
    Posts:
    37
    Thank you for your response.
    I thought about different positions is that every player will have that prefabs in their games. Player 1 takes the gameobject from (0 , 0, 0) to (0, 4, 0) and Player 2 will see the object moved (-4, 4, 0) to (0, 4, 0).
    Think of a turn based card game, where each player sit around a table. every player will see himself at centre of the table and other player in rest 3 positions. That is why I need different scenes.
     
    Last edited: Nov 29, 2015