Players not seeing the same thing

Hi,

I built a multiplayer game. Till now, everything's working fine.

The problem is sometimes 2 players on 9 (max players) are in the game, but only the both of them. They dont see the rest of the players. Other players can see them but not interact them, like they are in a second instance of the scene...


My other problem is that some pieces of code are lost. For example, I kill a player and when he revives, he's invisible for a few sec. For him, he loses his invisibility after 3 sec. For me, sometimes, he doesn't lose his invisibility...Doesn't happen the whole time but when it happens, it's not fun.


Any idea how to fix these two problems ? 🤨

I have PhotonNetwork.AutomaticallySyncScene set to false because I want people to leave the game when they're done (if I understood correctly how it works).

My player observable is set to Unreliable On Change.

Answers

  • If some players see everyone, it means that everyone is in the same room and this is not a matchmaking issue.

    This is likely related to how you load scenes. If you don't use AutomaticallySyncScene, you need to implement this on your own (we have a hard time debugging your solution).

    The lost pieces of code ... also don't sound like something we can help with. You need to dig deeper and figure out what's up, how it's caused, etc. Sorry, this is very project specific and we don't have the context.

  • I had the same problems for rooms. The Photon function that's called when a new room is created wasn't called on all players in the lobby.

    I've found on the forum that it was better to build our own solution.

    It seems to be the same problem during the game. Some updates or changes on a player are not updated to everyone.

    Is there a solution to this ?

  • If latecomers are not able to see players which had previously joined the room, make sure they are being instantiated properly. Make use of the room cache if you want older players to instantiate themselves automatically for newcomers, or do this manually in the player join callbacks with target actors. If players are not even in PhotonNetwork.PlayerList to begin with, then make sure both of the clients are on the same AppVersion, otherwise they will be separated.

    Furthermore, make sure they are in the same lobby, make sure you're not using a special lobby type like async lobbies. Async lobbies do not get regular room updates dispatched.

    If after all of this you still continue to get "dropped events", then it is most likely a design problem and like Tobias said, you will have to dig deeper into your own code.