Why is there game breaking delay in my Photon Pun 2 multiplayer game?

Hi, I am quiet new to photon and I've been making a multiplayer first person shooter game. The game was working well until a few days ago. Now the player's movements and shooting are very delayed when it comes to seeing it on another client, sometimes even by a minute. I can't seem to figure out why this is happening and if this is normal or not. Idk if I have too many RPCs or what the deal is but its completely broken my game and its not very playable anymore. Please help.

Answers

  • Maybe you have to review the changes of the last few days. If things worked well and now don't, you likely changed something significant. Delays of a minute are far beyond anything that should be expected.

    Going back to the state a few days ago will help a lot. In networking it's quite important to use a working state, then develop on it, bit by bit. Once things are not working anymore, it's really hard to debug issues.

    Look at amount of objects you got, if they are syncing reliable or unreliable. Make sure bullets don't use PhotonViews and if you shoot a lot, don't send one RPC per shot.

    Check the docs:

    https://doc.photonengine.com/en-us/pun/current/troubleshooting/

  • I figured it out. For some reason I had an rpc in the update function that was sending way to much data so I rewrote that rpc so it isn't called in the update anymore so its fixed now! Thanks for the help