Skip to Content
App Inventor 2, 2nd Edition
book

App Inventor 2, 2nd Edition

by David Wolber, Hal Abelson, Ellen Spertus, Liz Looney
October 2014
Beginner to intermediate
360 pages
9h 3m
English
O'Reilly Media, Inc.
Content preview from App Inventor 2, 2nd Edition

Chapter 5. Ladybug Chase

Figure 5-0.
LadyBug

Games are among the most exciting mobile device apps, both to play and to create. The recent smash hit Angry Birds was downloaded 50 million times in its first year and is played more than a million hours every day, according to Rovio, its developer. (There is even talk of making it into a feature film!) Although we can’t guarantee that kind of success, we can help you create your own games with App Inventor, including this one involving a ladybug eating aphids while avoiding a frog.

What You’ll Build

In this “first-person chewer” game, the user will be represented by a ladybug, whose movement will be controlled by the device’s tilt. This brings the user into the game in a different way from MoleMash (Chapter 3), in which the user was outside the device, reaching in.

The Ladybug Chase app is shown in Figure 5-1. The user can:

The Ladybug Chase game in the Designer
Figure 5-1. The Ladybug Chase game in the Designer
  • Control a ladybug by tilting the device.
  • View an energy-level bar on the screen, which decreases over time, leading to the ladybug’s starvation.
  • Make the ladybug chase and eat aphids to gain energy and prevent starvation.
  • Help the ladybug avoid a frog that wants to eat it.

What You’ll Learn

You should work through the MoleMash app in Chapter 3 before delving into ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

App Inventor

App Inventor

David Wolber, Hal Abelson, Ellen Spertus, Liz Looney
App Inventor 2 Essentials

App Inventor 2 Essentials

Felicia Kamriani, Krishnendu Roy
Hello App Inventor!

Hello App Inventor!

Carl Simmons, Paula Beer

Publisher Resources

ISBN: 9781491907214Errata Page