Talking about Breakout game, Actionscript 3, Box2D, Flash, Game development and Users contributions.
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 and right paddle )
( everything is draggable with the mouse )
He used all the basic techiniques you ought to learn before adventuring into professional use of Box2d.
The bricks are hanging by distance joints attached to the body Ground, the paddle is fixed on the x axis by a prismatic joint attached also to the Ground.
The code looks for only 2 collisions, on ball against the paddle an Impulse is applied to the ball and on ball against a brick the brick distant joint is broken and the gravity acts on the brick (which makes it fall down).
Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.