App Inventor 2 provides easy to use features for creating games. These features have proven popular for introducing programming concepts to students in K-12, especially at the elementary and middle school level. While our focus is oriented towards practical applications rather than games, we can have a little fun too!
The purpose of the sample app in this blog post is to illustrate the basic programming concepts of a bouncing ball animation.
Well, its not much of a game! To keep the programming simple, all this does is enable a ball to bounce around on the screen, to change its heading or trajectory, and to make it travel faster or slower. When the ball hits the edge of the screen, it rebounds in an appropriate direction. Here’s the user interface as seen on the smart phone:
Press the Start button to make the ball start moving; press Stop to end the movement.
To change the speed of movement press the Faster or Slower buttons. Pretty easy?
To change the trajectory, you may enter a heading value in degrees, in the field next to the Set heading button, and then press the Set heading button.