Repository navigation
01 Prototype 01 Hud Pass
VolleyTracker not extracted. The design specified extracting volley logic into scripts/volley_tracker.gd for unit testability. This was skipped, game.gd emits signals (volley_count_changed, personal_best_changed) which the scene wires to the HUD directly. Integration tests cover the same behaviour through signals, making the extra class unnecessary indirection.
Complete the volley tracking system and display it properly in the HUD. This is the foundation that Progression System and Ball Scaling build on.
Points: 2 Dependencies: Pong Prototype (done) Unlocks: Ball Scaling, Progression System (friendship display, high score persistence)
- Ball emits
paddle_hiton paddle contact, working -
game.gdcounts volleys inline and writes directly to aCanvasLayer/Label, bypasseshud.gd -
hud.gdexists withupdate_volley_count()but is not wired up - No miss detection, no volley reset, no high score tracking
- No
VolleyTrackerclass
- Volley reset on miss
- High score tracking (session only, persistence comes with Progression System)
- VolleyTracker refactor
- HUD wiring and high score display
- Friendship display (Progression System)
- Streak-based visual feedback or animations (UI Polish in v0.5)
- Ball speed changes during streak (Ball Scaling)
- Save/load of high score (Progression System)
Design: Define what counts as a miss, ball contacts the left or right wall.
Tech: Add ball_missed signal to ball.gd, emitted on left/right wall contact. game.gd connects this to reset the volley count.
Design: High score is the best volley streak in the current session. Resets when the game closes (persistence deferred to Progression System). Tech: Track best streak, update when current streak exceeds it.
Tech: Extract volley logic from game.gd into scripts/volley_tracker.gd. Pure logic class (no node dependencies), unit-testable.
-
hit(), increment current streak -
reset(), save high score if beaten, reset streak to 0 -
current_streak: int, current volley count -
high_score: int, best streak
game.gd owns a VolleyTracker instance, connects ball signals to it, and updates HUD on changes.
Design: Layout, volley count top center, high score below it. Tech:
- Add high score label to
hud.tscn - Wire
game.gdto callhud.gdmethods instead of writing to the label directly -
hud.gdexposesupdate_volley(count: int)andupdate_high_score(score: int)
VolleyTracker (scripts/volley_tracker.gd)
- current_streak: int
- high_score: int
- hit() -> void
- reset() -> void
Ball (scripts/ball.gd)
- signal paddle_hit (existing)
- signal ball_missed (new)
HUD (scripts/hud/hud.gd)
- update_volley(count: int)
- update_high_score(score: int)
game.gd
- Owns VolleyTracker instance
- Connects ball signals to tracker
- Updates HUD on changes
- Unit: VolleyTracker, hit increments, reset clears streak, high score persists across resets, high score only updates when beaten
- In-game: volley count increments on paddle hit, resets on wall miss, high score updates and survives streak resets
-
Integration:
game.gdno longer writes to labels directly, all HUD updates go throughhud.gd
Contributing
The game
The Cast
Process
Reference