cBournhonesque/lightyear

Lightyear breaks down if the fps becomes too low?

Opened this issue · 4 comments

Example raised by simbleau.

Symptoms:

  • latency seems to be increasing if the FPS is too low, it keeps increasing at a constant rate to infinity.
  • crazy rollbacks

TODO:

  • check if there are many rollbacks
  • check if the client/server have the same inputs at the same time
  • check if there is a death spiral on rollback?
  • check if the sync between client and server is fine

Is this related to a specific platform / transport?

It was on web, with webtransport.
basically when they open the inspector, the FPS of their game drops and then the latency keeps climbing and the game becomes overall unplayable

Would be nice to test if this happens on other platforms/transports too otherwise it might be an issue with xwt / lightyears integration of it

I'd guess it's not specific to xwt because everything is solid under normal circumstances. It's only when the FPS is too slow, and updates begin to pile up quicker than they're being processed. It's like a weird death spiral.

My game runs at 10fps when the console is up and printing logs, or 30-40fps in debug mode without the console. Opening the console was just a convenient way to reproduce a low fps.

The rollbacks don't make much sense to me, or I'm misunderstanding how they work. I believed the default redundancy of packets is 10, meaning as long as you don't drop 10+ packets in a row, you should never see a rollback. I am buffering inputs every update, e.g. the framerate. My input send rate is 10Hz. With a packet redundancy of 10, I wouldn't expect a rollback to happen unless the latency is at least 1 full second (0.10s * 10 packets). My input is fully deterministic as well. Instead, it's constant rollbacks when the FPS is low, (<20fps).