CHAPTER 7
Writing a Game for the
Motion-Sensing Game Controller
To test our game controller, we’ll program a simple Breakout
1
clone in Java-
Script. The player’s goal is to destroy all bricks in the upper half of the screen
using a ball. It’ll look something like the following figure.
Figure 21—Our Breakout clone
Background image credit: ESA/Hubble, NASA, Digitized SkySurvey, MPG/ESO.
Acknowledgment: Davide de Martin
1.
http://en.wikipedia.org/wiki/Breakout_%28arcade_game%29
report erratum • discuss
www.it-ebooks.info