bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
35.15k stars 3.46k forks source link

Diagnostic overlay dev tool #12560

Open IceSentry opened 6 months ago

IceSentry commented 6 months ago

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

Bevy currently has multiple diagnostics that are recorded but only the FPS is displayed as a dev tool. We should have a way to display all those diagnostics

What solution would you like?

What alternative(s) have you considered?

N/A

Additional context

Any other information you would like to add such as related previous work, screenshots, benchmarks, etc.

bushrat011899 commented 6 months ago

As discussed in Discord, a somewhat ideal would be DOOM Eternal's debug overlay:

Screenshot ![image](https://github.com/bevyengine/bevy/assets/2217286/fbbd2937-b7f3-417b-8795-67b121f9804a)

I think instead of "Simple" and "Advanced", it would be nice if the plugin had options for each of the specific diagnostics, with sensible provided configs like minimal() and full().

app.add_plugins(DiagnosticOverlay  {
    fps: true,
    frame_times: true,
    cpu_info: false,
    // ...
});

This would allow the diagnostics plugin to capture more niche information but keep it optional (to avoid overwhelming users).

IceSentry commented 6 months ago

Soon after making this issue this crate was released https://crates.io/crates/iyes_perf_ui

We are currently strongly considering upstreaming it

inodentry commented 5 months ago

I would be very happy for iyes_perf_ui to be upstreamed for Bevy 0.14.

But first I would like to take another month or so to maybe iterate on it and make some improvements while it is still an unofficial crate. It will let me iterate faster, and users will be able to benefit from it in their projects that use Bevy 0.13.

As the time for the Bevy 0.14 release draws nearer, let's revisit it and try to upstream it!