Ball Bounce Physics


Hello I was bored so I decided to make a project where a ball bounces from wall to wall in hopscotch. However it turned out to be way more complicated than expected I worked on it 6 hrs and then quit the next day I thought I found a solution but every Time I fixed something a new problem came up.

If any one knows code for this please tell me

I searched for this before I posted but did not find anything if there is another topic like this also please tell me.


Keep working on it.
Don’t give up.


Hi @Kikflip

It’s not to complex, but at the same time isn’t real easy to figure out.

Check out the bouncing ball from this in-process version of Break Out (it was languishing in my drafts, but I just published it to show you)

Here’s the bit that makes the ball bounce off the walls


My project “Pong” has an easy code for this, but it’s programmed so the ball will bounce of a object, and it’s not the most efficient code. But it should work. But with that code, the computer can technically not lose.
Here is the game:


Thanks this really helps the code is similar to an earlier solution I thought I had found I just didn’t fix one of the problems the right way.


Thanks cool game it really helps me out this looks similar to one of my earlier solutions.


Okay, I am glad that you could use it and learn about it!


Wow! That does look confusing!


Finally got it
@William04GamerA @ThinBuffalo Thanks lots


Wow! That is a great project!


Well done. I like how the text box wiggles a bit when the ball bounces off it.