top of page
  • Writer's pictureMrs. Merrill

Building games with variables

This we we learned about variables. These allow you to set a value to the script in order to execute a task. This week we had to complete the code of a Whac-a-mole game. The game has the sprite jump from place to place to look like it appearing in a different whole on the stage each time. The user is then able to click to get 'hits' in the game and then when they 'miss' they gain miss points. This game was fun to customize. I usually go for customizing the aesthetics of the game but this one I had a little more fun with. I changed how fast the sprite moves to make the game a little more challenging. Then I added sound effects for when the sprite was clicked and when it was missed. I also set the end of the game when either the hits or misses got to 25. When this happens the sprite stops and says you lose or you win. 25 hits means you win the game!


0 views0 comments

Recent Posts

See All

Comments


bottom of page