1 (edited by Voltaseca 2017-04-11 13:06:14)

Topic: Photon Network slowdown

So I've managed to stitch together a "working" Photon implementation with the Network support of my UFE Bundle. Problem is that apparently there's a massive slowdown in the game while running on Photon. Even the countdown isn't updating each second, but each 3 more or less. The thing is, the fps is fine, both clients are running at 60fps. From what I can tell after some tests, it's the FixedUpdate of UFE that's taking too long, and apparently after checking if both players are ready is their IsReady. I can see that by using Debug.Log just before checking the bothReady boolean is true, and another Debug.Log inside that condition.

The Logging just before the condition is running almost 3 times more than the one inside, like this
http://i.imgur.com/Pfd1zZv.png

If I select the option to use the normal P2P implementation everything works nicely.
Any help is welcome, I've been stuck on this for quite a while.



Update on the post below

Share

Thumbs up Thumbs down

Re: Photon Network slowdown

I've managed to at least uncover exactly WHERE the problem was happening. It's not that the FixedUpdate is taking too long or anything like that. It's because the bothReady is returning false quite a lot of frames. While using the P2P implementation, bothReady is false once each 15 frames or more, so you can barely tell that the game wasn't running well. While using Photon it's like once each 3 frames or even worse.
Looking at the code that happens because the inputBuffer count of the RemotePlayer isn't higher than the currentFrameOffset, and that happens quite a lot with my Photon implementation. Whenever that happens, UFE will simply stop and wait. I can't seem to think of a way to fix that without making it so Photon updates like 10 times faster than it is currently. Yes, I already tried to increase the SendRate, it helps just a little. Apparently there's a limit for the SendRate.

If I could get anyone that has a deeper understanding of UFE's code or Networking in general that'd really help.

Share

Thumbs up Thumbs down

Re: Photon Network slowdown

Did you manage to go further with Photon? I think a lot of us would be interested in a solution.

Share

Thumbs up Thumbs down