From Seo Wiki - Search Engine Optimization and Programming Languages

Jump to: navigation, search
Developer(s) Erin Catto
Stable release 2.0.1 / April 13, 2008; 445569177 ago[1]
Operating system OS independent
Type middleware
License zlib [2]

Box2D is a free open source 2-dimensional physics simulator engine written in C++ by Erin Catto and published under the zlib license. It has been used in Crayon Physics Deluxe, Rolando, Fantastic Contraption, Incredibots and many online Flash games[3].



Box2D was first released as "Box2D Lite", a demonstration engine to accompany a physics presentation given by Erin Catto at GDC 2006. On September 11, 2007 it was released as open source on Sourceforge.

On March 6, 2008, version 2.0 was launched, introducing continuous collision detection and revamping the API.

Cross-platform availability

Box2D is itself written in platform-independent C++, and is usable on any system with a C++ compiler available. The engine may be compiled in fixed point and floating point modes, and has been used on the Nintendo DS, Wii, and several mobile phones (including the iPhone) as well as most major operating systems.

The engine has been ported to many other programming languages and environments, including Java[4], Adobe Flash (in ActionScript[5] and haXe[6] languages), C#[7], JavaScript[8], and D[9]. Bindings exist to use the compiled library from Python[10] and DarkBasic.

No fixed point Java version of the library exists, so the Java port of Box2D cannot currently be used on Android or J2ME phones. There is a Java Port of Box2D that can be used on Android.[11]


Box2D performs constrained rigid body simulation. It can simulate bodies composed of convex polygons, circles, and edge shapes. Bodies are joined together with joints and acted upon by forces. The engine also applies gravity, friction, and restitution.

Box2D's collision detection and resolution system consists of three pieces: an incremental sweep and prune broadphase, a continuous collision detection unit, and a stable linear-time contact solver. These algorithms allow efficient simulations of fast bodies and large stacks without missing collisions or causing instabilities.[12]

Related Physics Engines

An earlier version of the Box2D engine, now known as Box2D Lite, was released primarily for educational purposes, based on a series of yearly Game Developers Conference presentations that Erin Catto has given. Box2D Lite uses many of the same algorithms as Box2D, but has a smaller feature set.[13]

The Chipmunk physics engine (written in C)[14] and Phys2D (written in Java)[15] are both partially based on Box2D Lite.


External links

Personal tools

Served in 0.662 secs.