O'Reilly logo

Microsoft® XNA® Game Studio 4.0: Learn Programming Now! by Rob Miles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Motion-Sensitive Games

  • Discover how a device can be sensitive to orientation and movement.

  • Find out how XNA programs can use the accelerometer hardware provided by the Windows Phone.

  • Understand how easy it is to create a simple physics model in XNA.

  • Create the “Cheese Lander” game for Windows Phone.

  • Create a “Shaker” game for Windows Phone.

Introduction

In this chapter, we are going to develop some games for Microsoft Windows Phone 7 that use one of the special input features this platform provides—the accelerometer. We’ll explore the physics behind the sensor in the device and how to make use of the sensor from software. Finally, we’ll create some simple games that use the accelerometer in their gameplay.

The Accelerometer

The first mobile ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required