X Tutup
The Wayback Machine - https://web.archive.org/web/20201011092803/https://github.com/libgdx/libgdx/issues/6093
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large delta after pause/resume (iOS) #6093

Open
jkazma-logisk opened this issue Jul 3, 2020 · 2 comments
Open

Large delta after pause/resume (iOS) #6093

jkazma-logisk opened this issue Jul 3, 2020 · 2 comments

Comments

@jkazma-logisk
Copy link

@jkazma-logisk jkazma-logisk commented Jul 3, 2020

Similar to #1196

Issue details

If a game is paused for a long time, after resuming, Gdx.graphics.getDeltaTime() will give the delta of the entire pause duration. This causes freeze/stutter on resume as the game tries to process possibly hours worth of delta. This was fixed for the android version but not for iOS which makes it inconsistent across backends.

Version of LibGDX and/or relevant dependencies

Please provide the version(s) affected.
1.9.10

Please select the affected platforms

  • Android
  • iOS (robovm)
  • iOS (MOE)
  • HTML/GWT
  • Windows
  • Linux
  • MacOS
@obigu
Copy link
Contributor

@obigu obigu commented Jul 5, 2020

Yep, it looks like a similar fix to the Android one can be applied to iOS backend. In the meantime as a workaround you can clamp the delta (for instance to 1/30f) which in most games it's a good practice protect against lag spikes (Scene2D for instance has this behaviour by default).

@jkazma-logisk
Copy link
Author

@jkazma-logisk jkazma-logisk commented Jul 6, 2020

Great, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.
X Tutup