Having a
lot of bodies in the level at the same time can significantly impact
framerates. Especially collision processing is a big burden to process. Add to
that the fact that it’s usually necessary for gameplay to not have all bodies
collide (for instance, bricks flying from a building should not collide with
the player but should collide with the terrain): a way to filter these
collisions is a necessity. Luckily, Box2D has a way to do this.