2.4 KiB
2.4 KiB
Game Mechanics Refactor - Walkthrough
Summary
Successfully refactored the game from a lap-based racing system to a cycle-based goals system with power-ups, scoring, and a live leaderboard.
Changes Made
New Files Created
| File | Purpose |
|---|---|
| goals_cycle_manager.gd | 60-sec timer, scoring (base+time bonus), goal regeneration, 9-tile randomization |
| powerup_manager.gd | Power-up points (4 bars max), holo tile tracking, special effect activation |
Modified Files
| File | Changes |
|---|---|
| player.gd | Added powerup_manager, score, use_powerup input, removed finish checks |
| playerboard_manager.gd | Holo tiles → powerup points, goal completion check |
| player_race_manager.gd | Deprecated lap system, kept pattern matching |
| main.gd | GoalsCycleManager init, UI setups, signal handlers |
| ui_manager.gd | Power-up bar, leaderboard panel, timer labels |
| project.godot | Added use_powerup input (F key) |
New Game Flow
flowchart LR
A[60s Cycle] --> B[Grab Tiles]
B --> C{Holo?}
C -->|Yes| D[+Powerup]
C -->|No| E[Check Goal]
E -->|Match| F[+Score +Powerup +Randomize 9 tiles]
F --> G[New Goals]
A --> H{Timer End}
H --> I[Clear Board → Score Matching]
Manual Testing Required
- Timer Test: Verify 60-sec countdown on goal panels
- Goal Completion: Complete pattern → score + powerup + tile randomization
- Holo Tiles: Pick 4 → 1 powerup bar (no auto effect)
- F Key: Use powerup → triggers random special effect
- Leaderboard: Updates dynamically with score rankings
- Multiplayer Sync: Timer and scores sync across clients