Molemash is a simple game in which a mole (or a picture of your little brother) jumps randomly around the screen and you try to touch it to get points. Build this game and learn how to add timing and randomness into your apps.
These lessons come from USF Professor David Wolber's AppInventor.org - A great resource for learning App Inventor.
They are copied here simply because YouTube is blocked at our school.
Add a canvas, image sprite, and clock, then code blocks so that the mole moves to a new random spot each interval.
Watch the video and follow along. Any code/settings can be also found below the video.
> Go to http://beta.appinventor.mit.edu/ to begin.
In this step you will need one file (also available on S:\Shared\Students\Tech Ed\App Inventor\Lessons\MoleMash). Click the link to save the file to your desktop.
mole.png
Program the MoleSprite.Touched event to add one to the label showing the score
Watch the video and follow along. Any code/settings can be also found below the video.
Change the if clause in the Canvas.Touched into an if-else
Watch the video and follow along. Any code/settings can be also found below the video.
Drag in a label for the bar and define a variable "energy". When the user misses, subtract from energy and change width of label.
Watch the video and follow along. Any code/settings can be also found below the video.
When energy becomes 0 tell the user (text-to-speech) and disable the clock and behaviors
Watch the video and follow along. Any code/settings can be also found below the video.