Tuesday, September 11, 2012

App Inventor: Mole Mash


APP INVENTOR TASK THREE: MOLE MASH

The third game I created using app inventor was Mole Mash. To create this game, there are many different components that are needed to insure that this game can be played correctly. 
These components include: 
- canvas 
- image
- label
- button 
- timer 
-noise

The largest part of the screen is taken up by the canvas which enables to the mole (image) to be able to move around in on the screen. By drawing the canvas is enables to restrict the movement of the mole to a certain section of the screen. The image component must be placed inside the canvas component in order for the mole to move around in it. The label is used to show the score (number of times the mole is touched). A noise is used to identify when the mole is hit, a noise can then be heard by the player. The timer component is used to measure the amount of time the mole stays in one spot on the screen. The button that is used is to make the rest button which resets the score. 


The second major step to this game was to create the scripts for the game to work using the blocks editor. 
There are multiple different scripts used to determine the different parts of the game. The first script made is the one that controls the movement of the mole within the screen. The script for the score is also made. It calculates the change in score each time the mole is touched. The timer script is also made to determine what the moles does at each of the time intervals. 
And finally the rest button script is made that sets the score to zero once again. 


The last step was to connect the game into the the mobile emulator. This enabled me to test my game and see if all the scripts and variables worked as they should.