Review of Box2D for Flash Games (Author: Emanuele Feronato)

In Example 3.1, we then learn how to convert mouse input to box2D meters, how to delete a body, and how to selectively get physical information about certain bodies that we are interested in.
(click on certain bodies to destroy them)


Download the source Code and please leave me any comments or feedback you have.

In Example 4.1, we actually get to interact with bodies. Emanuele demonstrates how to move 3 spheres the same way, using forces, impulses and setting the linear velocity directly.
He also shows how these 3 relate to each other, and how to convert between the three, as well as when creating a game, when you would want to set a linear velocity, impulse, or a force.


Download the source Code and please leave me any comments or feedback you have.

In Example 4.2, we actually build a angry birds type level, and slingshot an object into the blocks, “destroying” the level. We build upon example 2.1 (creating the totem level), to quickly create an “Angry Birds” like level.
He then demonstrated how to create and draw the “flinging” controls (which also would make a good touch screen joystick). Finally, we have a complete Angry Birds type level, where you can actually fling an object at the blocks, and knock them down.
(Just like Angry birds, drag back the white circle “bird”, and let go to fling it)


Download the source Code and please leave me any comments or feedback you have.

Leave a Comment

Scroll to Top