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

Improve loop timing and revisit LoopModes #456

Open
mitchmindtree opened this issue Feb 23, 2020 · 2 comments
Open

Improve loop timing and revisit LoopModes #456

mitchmindtree opened this issue Feb 23, 2020 · 2 comments

Comments

@mitchmindtree
Copy link
Member

This is a reminder for myself to revisit our approach to application loop timing, and perhaps implement some options based on the game loop article here.

Options that we definitely want:

  • Loop once: model runs once, update runs once then view runs once. Following this, the application simply waits on window, application and input events. update and view are never called again. This would be best implemented a manner that allows any number of loops. Our LoopMode::NTimes is basically this.
  • Wait: model runs once, update runs once then view runs once. Following this, the application waits on window, application and input events. Once events are cleared, update and then view run, and the application goes back to waiting for events. This is currently implemented as LoopMode::Wait.
  • A continuous loop mode: We currently have RefreshSync and Rate modes, but both are a little unstable on different platforms. This article describes a nice solution which may solve the issues that we currently have with both.
@foltik
Copy link

foltik commented Apr 17, 2020

This article might be useful as well: https://gafferongames.com/post/fix_your_timestep/

@bluelhf
Copy link

bluelhf commented Jun 4, 2022

This seems like an integral part of Nannou... As it stands, the Rate mode does not even follow the user preference for a given update rate. It's been two years — are there still plans to work on this?

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

No branches or pull requests

3 participants