O'Reilly logo

Sams Teach Yourself Windows® Phone 7 Game Programming in 24 Hours by Jonathan S. Harbour

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

Hour 10. When Objects Collide

What You’ll Learn in This Hour:

Boundary collision detection

Radial collision detection

Assessing the damage

Thus far, we have learned a lot about drawing things on the small but high-resolution screen of WP7 devices. Drawing is only the first step in making a game. There must be some way for objects to interact, to affect each other during gameplay. This interaction usually involves bumping into each other, which might be a rocket hitting an alien ship, a soldier jumping on top of a crate, a plumber bonking evil turtles, a blue hedgehog grabbing coins, a yellow mouth eating dots. The list goes on and on. In every case, there is a situation in which one sprite “touches” another, triggering some event. Detecting ...

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