bevyengine / bevy

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

System order reporting and visualization #2137

Open alice-i-cecile opened 3 years ago

alice-i-cecile commented 3 years ago

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

The order in which systems can execute is critically important for understanding and debugging but this information is typically spread across an entire app.

What solution would you like?

  1. Provide a user-friendly method to log the schedule. This should be human-readable to both ease parsing and make it usable for vision-impaired users.
  2. Create a graph visualization from this log.
  3. Create an example showing how to use these features.

What alternative(s) have you considered?

None.

Additional context

This has been discussed informally repeatedly, but I somehow couldn't find an issue.

https://github.com/jakobhellermann/bevy_mod_debugdump is fantastic prior art.

Other more advanced functionality (e.g. filter by component / resource type, showing which execution order was actually used, filtering by stage or module) can be added on top of this once the initial PR is merged. Those should have separate issues for clarity.

alice-i-cecile commented 3 years ago

Ideally this should be integrated with #2025 as well.

dimvoly commented 4 months ago

What's the current method for debugging system execution order problems?

It seems the best way right now is to guess & check which is quite ineffective.

I've got code where I've put things into sets and either they don't run as expected or run out of order. Despite using .chain() and .run_if() etc.

Be nice to have something that could be dumped out to a text file, even if it's quite ugly.