Ball Bounce Physics


#1

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.


#2

Keep working on it.
Don’t give up.


#3

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)

https://c.gethopscotch.com/p/ytd4w0m3y

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


#4

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:


#5

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.


#6

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


#7

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


#8

Wow! That does look confusing!


#9

Finally got it
@William04GamerA @ThinBuffalo Thanks lots


#10

Wow! That is a great project!


#11

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