Hour 4. Getting User Input

What You’ll Learn in This Hour:

Exploring touch screen input

Simulating touch input

Using gestures on the touchscreen

This hour delves into the user input system of XNA Game Studio 4.0, with an emphasis only on those features relevant to the Windows Phone. We actually have a somewhat easier time of it regarding input on the phones, because there’s just one practical form of input—the touchscreen. With just one form of input, our games will have to treat the screen as an array of discrete squares, more like a grid of squares. It will really be next to impossible to get a precise pixel location when using one’s finger! A general position can be determined by taking the center of a small rectangle or circular area ...

Get Sams Teach Yourself Windows® Phone 7 Game Programming in 24 Hours now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.