Skip to: Site menu | Main content

FAQ

General

Who makes Box2DFlash?

Currently, I, Boris the Brave maintain Box2DFlash, and add new featuers. But credit belongs just as much to Erin Catto, the original creator of Box2D, to Matt Bush and John Nesky for their work in porting.

There's a lot of Box2D projects, what is what?

Yes, there are. Box2D is pretty popular, and easy to port. Many 2d physics engines have drawn from it, too. I cannot go over all of the possible options, so I'll just try to disambiguate some confusion.
The project you are looking at now, Box2DFlash, is the most "official" port available to AS3, in the sense that it has kept up with the C++ version since v1.4.2. It is also referred to as Box2DAS3, and Box2DFlashAS3. The source repository is project box2dflash on sourceforge.

There are other physics engines also labeled Box2D, are in various stages of support and up-to-dateness. Google Code's Box2DFlash is not the same project as this. Nor is it up to date, as of writing (2010/01/09).

Other engines of note in the same family include the unnamed Alchemy based port which is part of the World Construction Kit and Haxe-based libraries Physaxe and Motor2.

Please contact me if you disagree with the above assesment, or would like a mention.

How can I help?

At the moment, this project is pretty much a one-man show, though with much help from the forums. Please contact me, if you are interested in a serious contribution. You can always send me patches, and bug reports.

Troubleshooting

Why is the API so strange?

Box2DAS3 is a port of the C++ version, and has kept the API largely identical. This means it does a lot of things differently to how you might expect. For example most arrays are of fixed size, with a variable elsewhere indicating how many valid items it contains.

Why aren't my bodies moving?

Here are some of the more common pitfalls:

Why are my bodies behaving strangely

Box2D is designed for games, and speed, so it doesn't always simulate physics accurately. Try to follow the following guidelines:

If in doubt, you can always increase the number of iterations passed into your call to Step - this improves the simulation quality, at the expense of speed.

I'm getting compiler errors about angle brackets, "<"!

Sounds like you are trying to compile the Flash 10 version on a Flash 9 compiler. Download the appropriate release of Box2D, or update your compiler.