top of page
Blog: Blog2
Search
  • cory aberle

bouncing ball code

first I created the variable fr all of my basic reusable values like x, y, and their speed. the drew a black circle using those variables

made it so every time the code looks for an x or y value it is increased by 10 for x and 15 for y. after that I made if statements to top the ball at each wall using the size of the canvas and the radius of my ball and when the ball reached the wall I reversed the speed to the opposite direction ad changed the color


5 views0 comments

Recent Posts

See All

assignment 11

for my project I wanted to connect a nerf gun using the micro bit to a game on the computer but am having trouble with the connection it breaks my code so so far I'm building the control and editing t

final project idea

for my final project i wanted to use the same style of code from my micro bit that i used for the final but instead of just lights also have it control an on screen game i build in p5 based of somethi

bottom of page