Bouncy Ball
- sparvez7
- Apr 12, 2022
- 1 min read
For our homework, we had to create a ball that bounces off each 4 sides and basically changed colors each time it did (didn't matter if it repeated).
We had learned how to make it bounce left and right and we needed to make it bounce from the top and bottom as well so I basically copied the code we learned for y and changed width to height and added variables needed for y such as yspeed and y1 and that basically made it bounce from each side. Then for the color changing aspect, I just did a random r,g,b value so each time it bounces it randomizes the r,g,b values.
Comments