Files
gijs_pong/index.html
Dabit 46b8f7bcc7 feat(01-02): add ball physics — movement, wall bounce, zone deflection, and GameConfig
- Add GameConfig with initialBallSpeed (220px/s), speedIncrement (18px/s), paddleSpeed (400px/s)
- Add Physics.serveBall(): centers ball, sets random angle (-45 to +45 deg), random left/right dir
- Replace Physics.update() skeleton with full ball movement and wall bounce logic
- Add Physics._checkPaddleCollision() with 5-zone angle deflection and speed increment per hit
- Ball exits left/right bounds → immediate re-serve from center
- Ball pushed out of paddle on collision to prevent double-hit next frame
- Add on-canvas speed debug display (Phase 1 verification aid)
2026-03-10 14:50:41 +01:00

9.2 KiB