All posts about Box2D

The engine behind Splitter Flash game – new AS3 prototypes

Splitting Box2D objects seem to be the ultimate challenge around here… after The engine behind Splitter Flash game – first AS3 prototype, now we have two updates… the first by Guillaume Pommey, author of the previous prototype and the second one by Bryce Summer. While Guillaume wants to refine a bit the final code before […]

A smart way to manage sleeping objects with Box2D

If you followed Box2D: tutorial for the absolute beginners, then you know you can put some object to “sleep” to improve performance by not simulating inactive bodies. This is CPU saving but can be used for some game concepts too. Just think about Super Stacker, where you have happy and afraid bricks. If you spend […]

Box2D joints: Gear Joints

Here I am with some infos about Gear Joints. Gear joints can be used to create a sophisticated mechanical contraption you might want to use a gears. In principle you can create gears in Box2D by using compound shapes to model gear teeth. This is not very efficient and might be tedious to author. You […]

Creating a sling with Box2D using joints

This is an example about the creation of a sling using joints and motors. Click the mouse to break the joint and release the bullet. Try to hit the stack of boxes. I used a distance joint, a revolute joint and a motor. The code does not need to be commented because there is nothing […]

Box2D breakout prototype

Porting Breakout/Arkanoid with Box2D seems to be an interesting challenge for developers. Some days ago I showed you Phyballs, now it’s time for Andre Vidal to show his work. Andre runs his own blog I suggest you to visit because you will find some interesting source code. This is Andre’s breakout (arrow keys = left […]

Box2D joints: Prismatic Joints

Time to learn something about Box2D prismatic joints. A prismatic joint provides one degree of freedom: translation along an axis fixed relative to the first body. Relative rotation is prevented. In other words, prismatic joints can be used to represent pistons and other sliding objects. In this tutorial I am going to show how to […]

Box2D: tutorial for the absolute beginners – step 2

After understanding the meaning of the first lines in Box2D: tutorial for the absolute beginners, it’s time to explain the rest of the script. Lines 19-27: These lines handle the debug draw. Remember Box2D does not draw anything, it just calculates position, rotation and motion of every object in the world. So it’s up to […]

Box2D: tutorial for the absolute beginners

This is a tutorial about Box2D dedicated to the absolute beginners. I received a lot of request asking for this, so here we go. What is Box2D Box2D is a feature rich 2d rigid body physics engine, written in C++ by Erin Catto. There is a Flash version called Box2DFlashAS3, but among Flash developers it’s […]