devlog.thermokar.st

2026-05-18

Collision Physics

Figuring out collision physics for my Pong remake is pretty humbling. I’ve noticed that most folks who share Pong code tend to neglect to handle top and bottom of paddle interactions. I am thinking ahead a bit to the second game in the 20 Game Challenge, which will likely be Breakout, so I would like to get a good handle on things here. Some things I’ve tried:

I think what is working right now is a combo of a cheap axis-aligned bounding box (for ball and paddles) check for collision presence/absence, followed by some gross bound checking to ascertain which surface I am hitting to work out the reflection axis. That might need to be adjusted a bit, because I want to know where on the pad surface the ball hits to change the reflection angle a bit. One other thing I am concerned about is that all of my testing is at sufficiently slow speeds - but once I add ball acceleration (to make the game progressively harder), I worry that the intersection checks will need to be adjusted to not clip through the entire paddle.

As frustrating and challenging as it is, this is exactly what the doctor ordered. No LLMs. No big tech. Just me and my soft squishy brain.