Challenges
During the debugging stage, I noticed that even though the ball visually hit the paddle only once on screen, Stencyl detected multiple collisions. This might be an issue with how the Stencyl engine handles collision detection.
Solution
After the ball hit the paddle the first time, I repositioned the ball outside the paddle's collider to ensure it registered as a single collision.
Another mitigation solution I implemented was to move the paddles slightly backward after the initial collision to avoid overlapping.
Additionally, I deactivated the paddle's movement briefly when the ball hit the top or bottom of the paddle or the barrier, preventing further unintended collisions during that time.


Ball collide paddle script
To handle collisions with the paddle, I set the ball’s position based on whether it hit the front, bottom, or top of the paddle.
Additionally, I adjusted the ball's speed and trajectory accordingly.
This script also helps reposition the paddle backwards to prevent further unintended collisions.
If the ball hits the wall, then set the "Check Wall Collision" to true.
If the ball hits the top or bottom of the paddle then set the "Check Top Bottom Paddle Collision" to true
If both "Check Top Bottom Paddle Collision" and "Check Wall Collision" is true, prevent the player from moving the paddle to avoid further unintended collisions.
After 0.5 seconds, set one or both of these conditions to false.
What I Learned
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.
What to improve
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your mouth.
Results
