1.1 KiB
1.1 KiB
Bevy Debug Playbook
When build fails
Run:
cargo check
cargo clippy --workspace --all-targets --all-features -- -D warnings
Quote exact compiler error. Fix smallest cause first.
When game opens but nothing visible
Check:
- camera spawned?
- entity has render component?
- transform in view?
- asset path correct?
- window created?
- alpha / color not invisible?
- system registered in right schedule/state?
When movement broken
Check:
- input system runs?
- query matches entity?
- transform or velocity changed?
- another system overwrites transform?
- delta time used correctly?
When UI broken
Check:
- UI entity spawned?
- text component updated?
- wrong state schedule?
- score resource/event exists?
- UI and gameplay mixed too tightly?
When architecture feels messy
Refactor by:
- extracting plugin
- moving singleton data into resource
- replacing direct calls with events
- introducing state for flow
- shrinking system queries
Review output format for AI
When AI reviews code, demand:
- top 3 bugs
- top 3 architecture risks
- concrete patch plan
- exact commands to verify