Introduction
About your App. Andriod Mash
This is a video game app that mimics the Whack a Mole game often found in amusement parks. The user tries to hit a moving image on the screen and gets points for doing so. The image speeds up as the game progresses.
Reflection
Be sure to provide screenshots along with your explanations.
Give brief descriptions of the enhancements you added to your app. Provide screen shots of important blocks and describe how you used them to solve certain programming problems.
Answer
I loaded the logo for my high school as the bot and the background is a picture of my high school. The score is displayed with a label centered below the background image. When the logo is pressed the score updates and a sound plays. The speed of the logo movement is also increased as long as the timer is greater than 300ms. Beyond that, it became too difficult to play the game.
When the score reaches 10, a notifier block tells the user that the game is over. The congratulations is also spoken by the texttospeech object. The score resets to zero and a new game starts. When the new game starts, the logo goes back to moving slowly again.
I used two separate procedures, one to reset the score and the other to make the logo move randomly.
I used a global variable to keep track of the score. I used a label to display the score.
When the user touches an ImageSprite, both the Canvas.Touched and ImageSprite.Touched events are triggered. This is important for more complex games. For instance, suppose there are two "Androids" in your game. If you hit one, you earn a point. If you hit the other, you lose two points. If you hit the Canvas and don't hit any Android, you lose 1 point. How would you code this?
Answer
I would use if else statements and use AND blocks to figure out which combinations of canvass alone, canvass and one bot, or canvass and the other bot has been touched.
How do you speed up the movement of the mole? What is the fastest it could move?
Answer
We can speed up the movement by reducing the cycle time of the timer. 1 ms is the fastest it could go but that is too fast for humans to play.
Final App and Digital Distribution:
How to Install my App: (Scan Here)
Design:
Be sure to provide screenshots along with your explanations for each of the enhancements that you made.
All code organized:
Variables on top
Procedures next.
Event Handlers below.
My Score Variable
The two starting Event Handlers which call procedures.
My Procedures
The main Event Handler