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

(WinitPlugin) Allow control of game tick #2872

Closed
wants to merge 5 commits into from

Conversation

xiaopengli89
Copy link

@xiaopengli89 xiaopengli89 commented Sep 26, 2021

Objective

Related to #1343, this PR allow dynamic control of game tick, and benefit power savings for GUI applications.

image

Solution

To disable the default poll game tick, insert WinitTick::new(false) resource into the world, animation systems can call poll_tick with WinitTick resource to poll game tick for the next frame.

The default default_poll_tick parameter value of WinitTick is true to prevent break changes.

Todo

  • When Asset is loaded asynchronously, we should send a tick event to EventLoop.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Sep 26, 2021
@inodentry inodentry added A-App Bevy apps and plugins A-Windowing Platform-agnostic interface layer to run your app in C-Feature A new feature, making something new possible S-Needs-Review and removed S-Needs-Triage This issue needs to be labelled labels Oct 2, 2021
@alice-i-cecile
Copy link
Member

@aevyrie is this still needed?

@aevyrie
Copy link
Member

aevyrie commented Apr 22, 2022

@aevyrie is this still needed?

With #3974 merged, I don't think so. This does have a few other features, but it would need to be rewritten anyway. I'd suggest we close this, and we can add any missing functionality in small PRs as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-App Bevy apps and plugins A-Windowing Platform-agnostic interface layer to run your app in C-Feature A new feature, making something new possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants