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.
11 Likes
Keep working on it.
Don’t give up.
4 Likes
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
11 Likes
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:
https://c.gethopscotch.com/p/ykfzfwocn
6 Likes
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.
2 Likes
Thanks cool game it really helps me out this looks similar to one of my earlier solutions.
1 Like
Okay, I am glad that you could use it and learn about it!
2 Likes
Wow! That does look confusing!
1 Like
Wow! That is a great project!
2 Likes
Well done. I like how the text box wiggles a bit when the ball bounces off it.
1 Like