So what is a physics engine?

The famous Isaac Newton said: every action has a reaction. Right after he said who the hell threw that apple?

So far in our games we have covered very simple collision systems, basically only ever checking to see if simple shapes (circles and rectangles) overlapped each other. The reaction from these collisions also were very simple in our games so far, using vector inversions or simply by making things disappear once they touch. With Box2D you get much more!

Box2D is a very robust collision detection engine and can certainly be used just for that purpose. But the simulation will also process and return a bunch of information derived from the collisions and the interactions between bodies, including how the objects ...

Get Cocos2d-x by Example Beginner's Guide now with O’Reilly online learning.

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