Shooter Game: Build, Conceptualize, Customize


Build It

  1. Open a browser and navigate to http://beta.appinventor.mit.edu. Login with your Google account.
  2. Now build the Shooter Game app. There is no book chapter for this one, so follow the step-by-step video lesson. At each step, try the challenge before watching the video.

Conceptualize It

After completing the Shooter tutorial, discuss these questions with a partner or small group, jotting down notes while you discuss. Later, create a portfolio page with answers to the questions in your own words. Topics: Canvases and drawing, event parameters

  1. When the shooter is touched, we want the bullet to start moving. Yet we don't actually move the bullet in the Touched event. Why?
  2. What does happen when the shooter is touched?
  3. Does the X,Y property of an imageSprite denote its middle? What does it denote?
  4. What if the shooter was on the left edge of the canvas and we shot horizontally across the screen. Show the blocks you would use to move the bullet to the tip of the gun.
  5. If you position the bullet so that it overlaps the shooter, your CollidedWith event will add a point as if the bullet hit the target. Can you program a CollidedWith event so it only does something when two particular sprites collide, e.g., the bullet and target? If so, show the blocks.

Customize It

  1. Add another image sprite, the anti-target, that when hit causes the user to lose a point.
  2. Code the app so that the player starts with a certain amount of energy, loses energy for every missed target, and the game ends when energy is down to zero. Show the energy with a colored bar (you can use a label and change the width).