Search Unity

Third Party Mirror: Scene (Room) switching

Discussion in 'Multiplayer' started by Noamxrx, Oct 21, 2020.

  1. Noamxrx

    Noamxrx

    Joined:
    Jul 25, 2018
    Posts:
    42
    Hi!

    I'm having a really hard time lately developing a Virtual world in the style of Club penguin (Rip ).

    My problem is about Scene switching.

    I don't get it how I can implement scene changing for Clients. For example:

    1. Client want's to Change the room from Town to a Shop room.

    2. The Client only will change the scene but all other clients in the Town won't see the Client that left the Town anymore, so as our client, he will now see only the online players in the Shop room.




    I was able to make something that works with a single big scene. By teleporting Clients to other Rooms in the scene I'm able to get a very basic (Working) scene changing.
    But it isn't working that good.
    I'm planning to create around 5-10 Rooms, since it is WebGL builds, this can lead to a huge performances problems by having 10 Rooms with a lot of objects in one scene. Also don't forget about editing those Scenes in the Editor will be a big pain.

    Second problem I have with my current system is when there is a Client on the Shop room for example, Clients that on the Town room can see shadows of players that above the Town that on the Shop room.

    I'm using NavMesh to navigate the players if this is relevant.



    I had an idea in My head to create Multi servers rooms based. To change scenes the client will disconnect from one Server and will join another one, but since it will take a huge resources (A lot of Playfab requests & Multiple Headless builds in one Linux 1gb ram server), I decided that this is probably a bad idea, Isn't it?



    I would love to get some advice's about how I can implement Rooms switching system that will be resources friendly for both Server & Clients
     
    godthekid likes this.
  2. haoyuchen

    haoyuchen

    Joined:
    May 22, 2021
    Posts:
    2
    I got same problem here.What I use is mirror, but looks like lt is not good at separate scene management for different clients