top of page

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.


 
 
 

Recent Posts

See All
Final Project Idea

For my project, I want to remake flappy bird. I think with all the things we learned, flappy bird has all the elements with a moving...

 
 
 
Maria Ressa - Response

What problems is the author discussing in this article? - The problem that the author is discussing is the fact of technology ruining...

 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2022 by Sabreena's Blog. Proudly created with Wix.com

bottom of page