1 (edited by mahdad.baghani 2020-03-15 13:51:27)

Topic: considerable lag when using photon as the multiplayer provider

Hi, there.

I am using UFE 2.0.2, with out-of-the-box photon multiplayer API provided with it; however, I was not able to get even close to preferable results using the following scenarios with the Training room example which is provided inside UFE:
1. using photon cloud: the lag was so high that it would last multiple seconds before a simple jump would be executed.
2. using photon server on a self-managed server with ~50 ms ping: Better than scenario 1, but still far from desirable.
3. using photon server locally, with no connection over the internet whatsoever: you would expect to get a lag-free game. But, still no single action like jump or punch is not completed uniformly I get at least one jitter between the each act.

what's going on? what did I do wrong?

Share

Thumbs up Thumbs down

Re: considerable lag when using photon as the multiplayer provider

Which version of UFE are you using (Standard/PRO/Source)?
If you are using UFE Standard, it could be that your default frame delay is too low. As a result the game tries to catch up way too often. Try changing your default frame delay to 5 or 6 (Global Editor -> Network Options -> Frame Delay Netcode)

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: considerable lag when using photon as the multiplayer provider

Mistermind wrote:

Which version of UFE are you using (Standard/PRO/Source)?
If you are using UFE Standard, it could be that your default frame delay is too low. As a result the game tries to catch up way too often. Try changing your default frame delay to 5 or 6 (Global Editor -> Network Options -> Frame Delay Netcode)

I am using UFE source. the different settings I've made without any success are the following:
1. frame delay: auto, min delay: 6, max delay: 15 | min delay: 15, max delay: 60
2. disabling rollback
3. rollback balancing: aggressive, conservative, disabled
4. send input messages: every frame, every other frame, every few frames
5. disabling Force UFE animation control

Share

Thumbs up Thumbs down

Re: considerable lag when using photon as the multiplayer provider

mahdad.baghani wrote:
Mistermind wrote:

Which version of UFE are you using (Standard/PRO/Source)?
If you are using UFE Standard, it could be that your default frame delay is too low. As a result the game tries to catch up way too often. Try changing your default frame delay to 5 or 6 (Global Editor -> Network Options -> Frame Delay Netcode)

I am using UFE source. the different settings I've made without any success are the following:
1. frame delay: auto, min delay: 6, max delay: 15 | min delay: 15, max delay: 60
2. disabling rollback
3. rollback balancing: aggressive, conservative, disabled
4. send input messages: every frame, every other frame, every few frames
5. disabling Force UFE animation control

Are you experiencing those issues with the demo as well?
http://www.ufe3d.com/demo/

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.

5 (edited by mahdad.baghani 2020-03-18 07:47:59)

Re: considerable lag when using photon as the multiplayer provider

Mistermind wrote:

Are you experiencing those issues with the demo as well?
http://www.ufe3d.com/demo/

Nope. How does the demo handle networking? is it using photon cloud or does it run locally?? Can you please share the network settings for this demo project? It seems to be different from the config file provided with the package.

Also, I have to state that we are planning on using Nakama for unity to handle social aspects of the game like matchmaking, friends list, leaderboards, etc. But upon importing the Nakam unity package, there was a problem regarding the Mono4Unity runtime that UFE was using. I ended up deleting Mono4Unity to fallback to default mono runtime. I assumed there shouldn't be a problem since this omission resolved the compile-time errors. Could this be the case in our issue??

Share

Thumbs up Thumbs down

Re: considerable lag when using photon as the multiplayer provider

mahdad.baghani wrote:

Nope. How does the demo handle networking? is it using photon cloud or does it run locally?? Can you please share the network settings for this demo project? It seems to be different from the config file provided with the package.

Also, I have to state that we are planning on using Nakama for unity to handle social aspects of the game like matchmaking, friends list, leaderboards, etc. But upon importing the Nakam unity package, there was a problem regarding the Mono4Unity runtime that UFE was using. I ended up deleting Mono4Unity to fallback to default mono runtime. I assumed there shouldn't be a problem since this omission resolved the compile-time errors. Could this be the case in our issue??

Here is a picture of the options I use in the demo. Notice we use "Best Region":
http://www.ufe3d.com/lib/exe/fetch.php/global:netcode_photonadditionaloptions.png

Its the same image you see in this page:
http://www.ufe3d.com/doku.php/global:netcode.

About Nakama, I'm not familiar with that package. The only recommendation I can give you is to test the network without any changes to the source material and following the instructions provided.

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: considerable lag when using photon as the multiplayer provider

Mistermind wrote:
mahdad.baghani wrote:

Nope. How does the demo handle networking? is it using photon cloud or does it run locally?? Can you please share the network settings for this demo project? It seems to be different from the config file provided with the package.

Also, I have to state that we are planning on using Nakama for unity to handle social aspects of the game like matchmaking, friends list, leaderboards, etc. But upon importing the Nakam unity package, there was a problem regarding the Mono4Unity runtime that UFE was using. I ended up deleting Mono4Unity to fallback to default mono runtime. I assumed there shouldn't be a problem since this omission resolved the compile-time errors. Could this be the case in our issue??

Here is a picture of the options I use in the demo. Notice we use "Best Region":
http://www.ufe3d.com/lib/exe/fetch.php/global:netcode_photonadditionaloptions.png

Its the same image you see in this page:
http://www.ufe3d.com/doku.php/global:netcode.

About Nakama, I'm not familiar with that package. The only recommendation I can give you is to test the network without any changes to the source material and following the instructions provided.

thanks for your reply; however, I need to know the UFE config for its network options. I did use the best region for the photon AppId that I had and I still am experiencing horrible lags on the exact same system and with the connection that I tested the Demo.

Share

Thumbs up Thumbs down

Re: considerable lag when using photon as the multiplayer provider

I don't have the configurations for the demo on hand, but they haven't changed much over the past 2 years.
This is the latest default configuration for the Global Editor -> Network Options. You can find these by downloading the latest version of UFE (2.3.0):
https://pasteboard.co/J0vxGBW.png

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.

9 (edited by mahdad.baghani 2020-03-26 05:25:18)

Re: considerable lag when using photon as the multiplayer provider

Mistermind wrote:

I don't have the configurations for the demo on hand, but they haven't changed much over the past 2 years.
This is the latest default configuration for the Global Editor -> Network Options. You can find these by downloading the latest version of UFE (2.3.0):
https://pasteboard.co/J0vxGBW.png

Thanks for the reply. I think that my problem was a couple of things, most importantly the "Input buffer size". Using the buffer size you provided actually decreased the lag a lot, but we still had lots of problems regarding desync. That was because I was using UDP as the connection protocol for my photon self-hosted server. I think the packet loss was the culprit which would cause null references on both parts when UFE tried to spawn hit particles and fireballs. Using TCP solved this problem. Besides I changed the gamespeed to 0.7 and FPS to 30 and that really gave us a smooth multiplayer gameplay. Next step is to check if the gameplay experience is pleasant using 60 fps.
I'm posting these to give an idea of how to start tweaking the config file for UFE.

Share

Thumbs up Thumbs down

Re: considerable lag when using photon as the multiplayer provider

Mistermind wrote:
mahdad.baghani wrote:
Mistermind wrote:

Which version of UFE are you using (Standard/PRO/Source)?
If you are using UFE Standard, it could be that your default frame delay is too low. As a result the game tries to catch up way too often. Try changing your default frame delay to 5 or 6 (Global Editor -> Network Options -> Frame Delay Netcode)

I am using UFE source. the different settings I've made without any success are the following:
1. frame delay: auto, min delay: 6, max delay: 15 | min delay: 15, max delay: 60
2. disabling rollback
3. rollback balancing: aggressive, conservative, disabled
4. send input messages: every frame, every other frame, every few frames
5. disabling Force UFE animation control

Are you experiencing those issues with the demo as well?
http://www.ufe3d.com/demo/

I'm experiencing desynchronization in the demo version (WebGL) even though my internet connection is fine. Is this a photon problem or UFE problem?

Share

Thumbs up Thumbs down

Re: considerable lag when using photon as the multiplayer provider

Grudark wrote:

I'm experiencing desynchronization in the demo version (WebGL) even though my internet connection is fine. Is this a photon problem or UFE problem?

I apologize. The demo is using an older version of UFE (2.1.1). There are some occasions where that specific demo is desyncing. I already fixed the issue will be updating those demos with the latest version real soon.

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: considerable lag when using photon as the multiplayer provider

Mistermind wrote:
Grudark wrote:

I'm experiencing desynchronization in the demo version (WebGL) even though my internet connection is fine. Is this a photon problem or UFE problem?

I apologize. The demo is using an older version of UFE (2.1.1). There are some occasions where that specific demo is desyncing. I already fixed the issue will be updating those demos with the latest version real soon.

That's great. Is the latest demo version out yet?

Share

Thumbs up Thumbs down