Corona SDK – Box2D – 2,000 physics bodies + artificial intelligence

When I first started working with Corona SDK, several experienced developers told me to limit my physics bodies to under 100. Many experiments, tweaks, and collision filters later, I’ve been able to run 2,000+ physics bodies at 25 – 30 FPS (mostly depending how busy the artificial intelligence module is with all those little guys making decisions).

*Note – this video is from an iPad mini. My physics experiments work perfectly on iOS devices, however, I haven’t had luck with Android devices as they still crash after 50-100 physics bodies (even the good quality Samsungs). My Dynamic Shader also experiences a slowdown on Android devices – although not as noticeable as the physics crashes.