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

Add update interval config for FpsOverlayPlugin #17487

Open
lomirus opened this issue Jan 22, 2025 · 0 comments · May be fixed by #17489
Open

Add update interval config for FpsOverlayPlugin #17487

lomirus opened this issue Jan 22, 2025 · 0 comments · May be fixed by #17489
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Bug An unexpected or incorrect behavior C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@lomirus
Copy link
Contributor

lomirus commented Jan 22, 2025

What problem does this solve or what need does it fill?

Current the FpsOverlayPlugin has a very short update interval, like the video below:

Screen.Recording.2025-01-22.at.10.51.20.mov

Of course we can see that it's approximately 59 fps, because it a relatively stable frame rate. But sometimes we may have some unstable frame rate that may fluctuate from 30+ FPS to 40+ FPS where we can hardly say what the specific frame rate is(I just met this problem recently, and I may add a video example of that if I am available tomorrow).

What solution would you like?

Add interval (or other name, I am not good at naming) field, and the FPS displayed will be the average fps of the past interval duration.

App::new()
        .add_plugins((DefaultPlugins, FpsOverlayPlugin {
            config: FpsOverlayConfig {
                interval: bevy::utils::Duration::from_millis(200),
                ..default()
            },
        }))
        .add_systems(Startup, setup)
        .run();

What alternative(s) have you considered?

  • Write a simple fps overlay plugin myself
  • Use MSI Afterburner or Xbox Game Bar
@lomirus lomirus added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jan 22, 2025
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it A-Diagnostics Logging, crash handling, error reporting and performance analysis S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Jan 22, 2025
@spvky spvky linked a pull request Jan 22, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis C-Bug An unexpected or incorrect behavior C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants