top of page
Search

Moving Animation

  • Writer: allisongrace807
    allisongrace807
  • Apr 2, 2019
  • 1 min read

Using variables and conditionals (Like we learned using microbits), we learned to move shapes around the screen. First we were shown how to use variables to make a rectangle go right and left. We used a conditional to make the rectangle bounce back and forth when it would hit the edge of the screen. After learning and understanding that, professor Hagan told us to work on trying to make the rectangle hit all four walls by going not only left and right, but also up and down. To go left and right, the conditionals had only the variables "x" and "xSpeed". I knew that if I used the same conditional but changed the "x" to "y" and "xSpeed" to "ySpeed", it would go both up and down and left and right at the same time. After typing out those conditionals, it was only bouncing back and forth in the corners and not all over the place as I wanted. I then went back and changed the "xSpeed" variable and the "ySpeed" variable to different numbers. Then I added a fill to each conditional so that every time it hit a wall, it would change color. Then to try to challenge myself, I added a second rectangle. I used the same conditionals but gave that rectangle all different variables (so instead of "x" it was "xx" etc). I was very worried that it wasn't going to work but I managed to make it work and I am very proud of my results.







 
 
 

Recent Posts

See All
Final Project Idea

I want to make a game like "Alight" by Sphaeri ( https://sphaericactus.itch.io/alight ), but change it to be dance related. I want the...

 
 
 
Final Project Ideas

For my midterm project, I made something that helped with dance technique. For my final I want to do something else with dance, but I am...

 
 
 

Comments


© 2023 by The Artifact. Proudly created with Wix.com

bottom of page