Bouncing Ball
- cbelizaire76
- Dec 21, 2021
- 1 min read
The bouncing ball sketch was not easy to figure out at first. I went through a lot of trial and error but finally had a breakthrough.I set my x and y positions and used the ellipse function to represent my ball. I kept the ball at a medium size, forty pixels wide, and forty pixels tall. I used conditionals by implementing "if "statements for my x and y positions.The only thing I wish I was able to figure out was making the color of the ball change with each bounce. That part was challenging, I tried to repeat the same conditionals and just alter the fill function but that didn't work.I found out how to make the ball move faster by changing my speed variables dx and dy to 15 and 10. Overall, It was fun to finally get it to bounce from different sides.


Comments