Chapter 8. Bullets and Sensors

You know Box2D is able to manage collisions between bodies and solve them at every step. Anyway, during the making of the siege machine in the Angry Birds prototype, something went wrong; as you probably must have noticed sometimes the projectile passes through the castle, ignoring the collision. What happened?

Normally Flash games run between 30 and 60 frames per second, and if we synchronize world step with frame rate, every step represents from 1/30 to 1/60 seconds. A simulation that relies on time steps is called discrete simulation , and it differs from the real world where events happen continuously, making it a continuous simulation .

Being a discrete simulation, we don't know what happens in the time between ...

Get Box2D for Flash Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.