The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Players not seeing the same thing

Dimistolers
2021-10-13 17:31:12

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.

Comments

Tobias
2021-10-14 11:35:43

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.

Dimistolers
2021-10-18 18:26:41

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 ?

[Deleted User]
2021-10-18 19:24:04

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.

Dimistolers
2021-10-22 13:31:22

Thanks, checking AppVersion was a first step to fix my problem.

And I've found that the loss of events in my code (like timer or winning conditions) seems to occurs when the master client leaves the room.

Ever heard of this ? Should I pause the game while the switch of master happens ?

Back to top