Topic: WebGL online mode doesn't work

Hey guys,
Did you notice in WebGL build, online mode is actually 2 different local games? Passed character selection screen, the fights don't have anything to do with each other. I tested it in the UFE website demos too. The same thing happened.
Is it supposed to be this way? Or am I missing something terribly important?

Any help appreciated,
Thanks

Share

Thumbs up Thumbs down

Re: WebGL online mode doesn't work

I've had a report on this problem before with someone living in Russia and apparently behind a VPN. Their connection speed however was bellow the minimum acceptable level for online games.
I ran multiple tests against other people myself, but I could not trigger any issues on my end.

You can however try a few things to ease the package load:
- Under Global Editor -> Network Options -> Frame Delay Netcode, set the "Default Frame Delay" to a higher value (8 or 10 for example)
- Under Global Editor -> Network Options -> Package Options, set "Input Message Frequency" to "Every 5 frames"
- Under the Project tab, navigate to Photon/Resources/PhotonServerSettings and manually set the dev region to the closest to where you are located (https://doc.photonengine.com/zh-cn/pun/ … on/regions)
- (optional) Still under PhotonServerSettings, try switching the protocol to Tcp or Udp

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.

Re: WebGL online mode doesn't work

Hey, thanks for the points.
It'll work if I set those settings, but then the game is slowmotion (I disabled the roleback netcode) and when I set them back on, it's two local fights again.
I do test it behind a vpn. But the thing is when I build for PC, it works nicely. with the same internet connection. Why is that in the WebGL version it behaves this way?

Thanks

Share

Thumbs up Thumbs down

Re: WebGL online mode doesn't work

miladzarrin1 wrote:

Hey, thanks for the points.
It'll work if I set those settings, but then the game is slowmotion (I disabled the roleback netcode) and when I set them back on, it's two local fights again.
I do test it behind a vpn. But the thing is when I build for PC, it works nicely. with the same internet connection. Why is that in the WebGL version it behaves this way?

Thanks

Its hard to say what is going on without a way to replicate it myself.

I ran multiple online tests with the WebGL version (including using VPN) and it seems to work well on my end. The only time it didn't work was when I attempted to play against this customer from Russia. Their connection speed was relatively slow (around 2 mbps) and they too were behind a VPN. According to their reports, not even local tests were working on their end. Unfortunately there is not much more information about this case to draw a conclusion.

As for any kind of instability with WebGL, all I know is that WebGL is a relatively new platform created shortly after the deprecation of the Unity Player. Based on my experience working with Unity (not just UFE), the platform is known for being memory demanding and somewhat unstable. The lack of a useful information log also makes it hard to debug, and more often than not, the solutions have little to do with the problem.

Best thing I can tell you is to keep an eye on WebGL updates and if you do figure something out, share your findings with the community. The more information we have the easier it is to find the problem.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.

Re: WebGL online mode doesn't work

OK, I came up with a few workarounds for anyone that this might be useful.

First, upgrade the project to Unity 2021.2 or higher. That makes it a lot better. Apparently, they did some stuff on WebGL in that version that really makes a difference.
Secondly, Google Chrome manages the memory better, if possible use Chrome instead of firefox or edge.

Will update this if I found anything else.

Share

Thumbs up +2 Thumbs down