feat(engine): playability improvements — rounds 7–9 (#40–#64)
Round 7 — Input & feedback
- H key cycles hints; F1 opens help (conflict resolved)
- N key cancels active Time Attack session
- Hint text distinguishes "draw from stock" vs "recycle waste"
- Forfeit (G) clears AutoCompleteState so chime does not bleed into new deal
- Zen mode timer clears immediately on Z press
- HUD shows recycle count in both draw modes
- Settings scroll position persisted across open/close
Round 8 — Polish & clarity
- Undo unavailable fires "Nothing to undo" toast
- Streak-break toast on forfeit/abandon when streak > 1
- F11 fullscreen toggle with toast; documented in help and home screens
- H-after-win, new-game countdown expiry, Tab-no-cards toasts
- Win cascade duration/stagger scales with animation speed setting
- Draw-Three cycle counter HUD ("Cycle: N/3")
- Forfeit requires G×2 confirmation within 3 s (mirrors N key)
Round 9 — Game feel & information
- Escape dismisses game-over/stuck overlay (PausePlugin skips Escape when overlay visible)
- Shake animation on rejected drag before snap-back
- Forfeit countdown cancels when any other key is pressed (U/H/D/Z/Space)
- Tab wrap-around fires "Back to first card" toast
- HUD selection indicator shows active Tab-selected pile in yellow
- Challenge time-limit HUD turns orange < 60s, red < 30s
- Win summary shows XP breakdown (+50 base, +25 no-undo, +N speed)
- Game-over overlay: "No more moves available" with clear N/Escape/G instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+36
-11
@@ -256,16 +256,35 @@ Done
|
||||
|
||||
### Bevy Plugins
|
||||
|
||||
| Plugin | Responsibility |
|
||||
|---|---|
|
||||
| `CardPlugin` | Card entity spawning, sprite management, drag-and-drop |
|
||||
| `TablePlugin` | Pile markers, background, layout calculation |
|
||||
| `AnimationPlugin` | Slide, flip, win cascade, toast animations |
|
||||
| `AudioPlugin` | Sound effect and music playback via bevy_kira_audio |
|
||||
| `UIPlugin` | All Bevy UI screens: Home, Stats, Achievements, Settings, Profile |
|
||||
| `AchievementPlugin` | Listens for game events, evaluates unlock conditions, fires toasts |
|
||||
| `SyncPlugin` | Manages sync lifecycle (pull on start, push on exit, status display) |
|
||||
| `GamePlugin` | Core game state resource, input routing, win detection |
|
||||
| Plugin | Key | Responsibility |
|
||||
|---|---|---|
|
||||
| `CardPlugin` | — | Card entity spawning, sprite management, drag-and-drop |
|
||||
| `TablePlugin` | — | Pile markers, background, layout calculation |
|
||||
| `AnimationPlugin` | — | Slide, flip, win cascade, toast animations |
|
||||
| `FeedbackAnimPlugin` | — | Shake, settle, and deal-stagger animations |
|
||||
| `AutoCompletePlugin` | Enter | Executes auto-complete when the HUD badge is lit |
|
||||
| `AudioPlugin` | — | Sound effect and music playback via bevy_kira_audio |
|
||||
| `InputPlugin` | — | Keyboard and mouse input routing |
|
||||
| `CursorPlugin` | — | Custom cursor sprite during drag |
|
||||
| `SelectionPlugin` | — | Keyboard-driven card selection |
|
||||
| `GamePlugin` | N | Core game state resource, new-game flow, win/game-over overlays |
|
||||
| `HudPlugin` | — | Score, move counter, timer, auto-complete badge |
|
||||
| `StatsPlugin` | S | Stats overlay and persistence |
|
||||
| `ProgressPlugin` | — | XP/level system, persistence |
|
||||
| `AchievementPlugin` | A | Unlock evaluation, toast events, persistence |
|
||||
| `DailyChallengePlugin` | — | Daily challenge resource and completion tracking |
|
||||
| `WeeklyGoalsPlugin` | — | Weekly goal progress and completion events |
|
||||
| `ChallengePlugin` | — | Challenge mode progression (seeded hard deals) |
|
||||
| `TimeAttackPlugin` | — | 10-minute time-attack mode timer |
|
||||
| `HomePlugin` | M | Main-menu overlay with keyboard shortcut reference |
|
||||
| `ProfilePlugin` | P | Player profile overlay: level, XP, achievements, sync status |
|
||||
| `SettingsPlugin` | O | Settings panel: audio, draw mode, theme, sync, cosmetics |
|
||||
| `LeaderboardPlugin` | L | Leaderboard overlay |
|
||||
| `HelpPlugin` | H | Help / controls overlay |
|
||||
| `PausePlugin` | Esc | Pause and resume |
|
||||
| `OnboardingPlugin` | — | First-run welcome screen |
|
||||
| `SyncPlugin` | — | Async sync lifecycle (pull on start, push on exit, status display) |
|
||||
| `WinSummaryPlugin` | — | Win cascade overlay and screen-shake effect |
|
||||
|
||||
### Key Bevy Resources
|
||||
|
||||
@@ -588,6 +607,9 @@ pub enum PileType {
|
||||
|
||||
pub enum DrawMode { DrawOne, DrawThree }
|
||||
|
||||
/// Active game mode. Classic is the default; others unlock at level 5.
|
||||
pub enum GameMode { Classic, Zen, Challenge, TimeAttack }
|
||||
|
||||
pub enum MoveError {
|
||||
InvalidSource,
|
||||
InvalidDestination,
|
||||
@@ -600,13 +622,16 @@ pub enum MoveError {
|
||||
pub struct GameState {
|
||||
pub piles: HashMap<PileType, Vec<Card>>,
|
||||
pub draw_mode: DrawMode,
|
||||
pub mode: GameMode,
|
||||
pub score: i32,
|
||||
pub move_count: u32,
|
||||
pub undo_count: u32, // number of undos used in this game
|
||||
pub recycle_count: u32, // number of stock recycles
|
||||
pub elapsed_seconds: u64,
|
||||
pub seed: u64,
|
||||
pub is_won: bool,
|
||||
pub is_auto_completable: bool,
|
||||
undo_stack: Vec<StateSnapshot>, // private, max 64
|
||||
undo_stack: VecDeque<StateSnapshot>, // private, max 64 (VecDeque for O(1) pop_front)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user