Multi-Player, Multi-Scene Game with Rooms and Lobbys - How does it work?

Options

Hi!

I am fairly familiar with PUNs coding mechanisms with Rooms and Lobby.

I am interested in building a Multi-Player, Multi-Scene Game.

Is there some documentation that describes options on how to map Scenes into Rooms/Lobbies? Or maybe you don't

PhotonNetwork.automaticallySyncScene = true loads the same scene is the same across all clients. Why would I do that?

PhotonNetwork.automaticallySyncScene = false - won't load the same scene so do the Clients do the scene change themselves?

PhotonNetwork.LoadLevel is used to get the game going. After the second scene is up, does the third and fourth scene use this type of mechanism

As you can see I am missing a concept/model on how to build beyond a simple single scene with Photon.

Thanks

Herb Rush

Best Answer

  • Tobias
    Tobias admin
    edited February 2023 Answer ✓
    Options

    Loading scenes does not necessarily mean you also load networked objects. If you don't have them in scenes, you could load whatever you like on any client.

    And yes, you need to somehow keep PUN or Fusion on top of what networked objects exist. Doing that via scene data doesn't make much sense, if you load different locations on various clients.

    There is no built in management for multiple scenes and the solution really depends on what you want to achieve. I have no idea what you are after.

    What defines, which scene someone loads? If someone is in another location, does it even make sense to get updates from someone somewhere else or won't you be able to see that character anyways? If that's the case, use a room per scene / location.

Answers

  • No responses. Great.

  • Tobias
    Options

    Sorry but we can't guarantee responses. We try to help where nothing happens but in general, this is very much a community forum.

    PhotonNetwork.automaticallySyncScene = true loads the same scene is the same across all clients. Why would I do that?

    Why wouldn't you? If the scene contains networked objects, it is in fact useful (and simple) that everyone in the room knows the same objects, sees the same things, etc.

    If you have a large world and not everything fits into a single scene, then yes, you'd load individual scenes on the various clients.


    PUN is no longer state of the art and we'd suggest getting into Fusion instead. It is more versatile with scenes and assets you load (or don't).

    In both cases, the room defines who of the players can interact with one another. Depending on your own logic and interest management, you still may have players not getting updates of someone far away (or in another team)...


    Let us know a little about your goals and it's easier to help.


  • "If you have a large world and not everything fits into a single scene, then yes, you'd load individual scenes on the various clients" Using a Photon Mechanism of ???? or Unity mechanism of SceneManager.LoadScene.  I don't see how Photon could keep objects in sync if I am loading scenes and not telling photon somehow. Thanks for your help.


  • Tobias
    Tobias admin
    edited February 2023 Answer ✓
    Options

    Loading scenes does not necessarily mean you also load networked objects. If you don't have them in scenes, you could load whatever you like on any client.

    And yes, you need to somehow keep PUN or Fusion on top of what networked objects exist. Doing that via scene data doesn't make much sense, if you load different locations on various clients.

    There is no built in management for multiple scenes and the solution really depends on what you want to achieve. I have no idea what you are after.

    What defines, which scene someone loads? If someone is in another location, does it even make sense to get updates from someone somewhere else or won't you be able to see that character anyways? If that's the case, use a room per scene / location.

  • Excellent. Thank You!