11DON’T HIT ME!

If you do much game development, you’ll eventually need to determine when two objects on screen are colliding with one another. While Flash does not automatically notify you of this, there are a number of different methods that can be used to detect it. In this chapter, we’ll look at several types of collision detection and the scenarios in which they work best. We’ll also look at the strategies that can be used with different styles of detection to achieve the desired results.

What You Can Do vs. What You Need

A temptation by some developers, particularly those coming from other game development backgrounds, is to always use the most precise, robust collision detection in all situations. The problem with this approach is the ...

Get Real-World Flash Game Development now with O’Reilly online learning.

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