Porting Box2D to Android

With the STL in our basket, we are ready to port almost any library to Android. Actually, many third-party libraries are already ported and many more are coming. However, when nothing is available, you have to rely on our own skills.

To see how to handle this situation, we are now going to port Box2D with the NDK. Box2D is a highly popular physics simulation engine initiated by Erin Catto in 2006. Many 2D games, either amateur or professional like Angry Birds, embed this powerful open source library. It is available in several languages, including Java, though its primary language is C++.

Box2D is an answer to the complex subject, that is, physics simulation. Maths, numerical integration, software optimization, and so on ...

Get Android NDK Beginner's Guide - Second Edition 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.