I am having a problem with a game I have been working on. It’s a game of pong with two computer players where the speed can be controlled by clicking on the game scene. The bug i am encountering is that at higher speeds the ball sprite will sometimes stick to the top and bottom boundaries or pass through the players paddles instead of bouncing off. Does anybody know what might be causing this? The collisions in the game are meant to trigger a synthesizer and when the ball sticks to a boundary it continuously triggers and sounds horrible. I have stuck the code on repl.it if anyone would like to have a look.
Here’s a recording of it happening. The behavior I’m talking about is where it sticks to the top boundary and slides along it instead of bouncing off it.