Audit animation and timer systems for reactive render compatibility #79

Closed
opened 2026-05-29 20:11:57 +00:00 by funman300 · 1 comment
Owner

Context

Depends on #78 (render-on-demand). Before switching focused_mode to UpdateMode::reactive_low_power, every system that drives continuous visual change must explicitly request a redraw each frame it is active. Otherwise those visuals will freeze.

Systems to audit

System File Risk
Card slide / settle animations card_animation_plugin.rs High — runs many frames per move
Feedback flash animations feedback_anim.rs Medium — short-lived
Auto-complete step ticker auto_complete_plugin.rs High — continuous during auto-complete
Elapsed-time HUD ticker game_plugin.rs::tick_elapsed_time Medium — fires every second
Score tween (if any) hud_plugin.rs Low

Work required

For each system above:

  1. Confirm whether it drives per-frame visual change.
  2. If yes, add window.request_redraw() (via EventWriter<RequestRedraw> or the Window component) each frame the system is actively animating.
  3. Systems that are idle (no animation running) should do nothing — the reactive scheduler will suppress the frame automatically.

Acceptance criteria

  • All animations play at full framerate under UpdateMode::reactive_low_power.
  • cargo test --workspace still passes.
  • Verified on Android device (or emulator) that the board is static between inputs with zero GPU activity.

Labels

  • enhancement
  • android
  • performance
## Context Depends on #78 (render-on-demand). Before switching `focused_mode` to `UpdateMode::reactive_low_power`, every system that drives continuous visual change must explicitly request a redraw each frame it is active. Otherwise those visuals will freeze. ## Systems to audit | System | File | Risk | |---|---|---| | Card slide / settle animations | `card_animation_plugin.rs` | High — runs many frames per move | | Feedback flash animations | `feedback_anim.rs` | Medium — short-lived | | Auto-complete step ticker | `auto_complete_plugin.rs` | High — continuous during auto-complete | | Elapsed-time HUD ticker | `game_plugin.rs::tick_elapsed_time` | Medium — fires every second | | Score tween (if any) | `hud_plugin.rs` | Low | ## Work required For each system above: 1. Confirm whether it drives per-frame visual change. 2. If yes, add `window.request_redraw()` (via `EventWriter<RequestRedraw>` or the `Window` component) each frame the system is actively animating. 3. Systems that are idle (no animation running) should do nothing — the reactive scheduler will suppress the frame automatically. ## Acceptance criteria - All animations play at full framerate under `UpdateMode::reactive_low_power`. - `cargo test --workspace` still passes. - Verified on Android device (or emulator) that the board is static between inputs with zero GPU activity. ## Labels - enhancement - android - performance
Author
Owner

Fixed in 38e4c03.

All per-frame animation systems now write RequestRedraw each frame they have active work:

  • advance_card_animations (card slide)
  • advance_card_anims (deal / win cascade)
  • tick_shake_anim, tick_settle_anim, tick_foundation_flourish
  • drive_toast_display (toast countdown)
  • drive_auto_complete (step interval keepalive)

Each plugin also registers add_message::<RequestRedraw>() so tests under MinimalPlugins continue to pass. #78 switched focused_mode to reactive_low_power(100 ms) on top of this.

Fixed in 38e4c03. All per-frame animation systems now write `RequestRedraw` each frame they have active work: - `advance_card_animations` (card slide) - `advance_card_anims` (deal / win cascade) - `tick_shake_anim`, `tick_settle_anim`, `tick_foundation_flourish` - `drive_toast_display` (toast countdown) - `drive_auto_complete` (step interval keepalive) Each plugin also registers `add_message::<RequestRedraw>()` so tests under `MinimalPlugins` continue to pass. #78 switched `focused_mode` to `reactive_low_power(100 ms)` on top of this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#79