Flash physics draw game with a car using QuickB2

QuickB2 is a complete abstraction of Box2D, providing grouped hierarchies, extensible classes, and event-driven callbacks.

The high-level interface enables developers to create physics simulations that are impractical to write using Box2D’s API alone.

It takes care of things that you don’t want to, so that you can concentrate on your game.

Among its top features we can find:

* Soft-bodies.
* Top-down car physics.
* Friction in z-direction (top-down friction).
* Pixel-based units.
* Individual polygons may be concave and have any number of vertices.
* All kinds of joints, including built-in spring joints.
* WYSIWYG editing environment for Flash CS5.

Combining one of the official examples with the drawing concept introduced during the creation of Way of an Idea Box2D prototype I ended up with this script:

which once executed produces this result:

Control the car with left and right arrow keys, and draw ramps with the mouse.

Now I am doing the same thing with the normal Box2D library to show you the differences.

  • itsme

    Very nice :), but could you please add the leaning feature

  • leon

    grrr I can’t stop falling upside down lol.
    nice tutorial x)

  • Wow, very nice find!!

    I had decided to write some box2d articles, and realized again how annoying not using “pixel based units” were.

    It looks like it’s open sourced too, wicked cool!

  • I encounter this error when I compiled the source of QuickB2:
    Can not find the definition of cmodule.Box2D

  • Hawdon

    Incredible.

  • I like it…the only thing I don’t like is that by using it you are adding another layer to your system…but that is a cost that I’m willing to accept :)

  • joy

    wow, what box2d version this library use ? is this another wrapper like quickbox2d ?

    so to summarize, now we can use box2d physics with just box2d, wck, quickbox2d (2.0 only), or QuickB2

  • This is great…. nice work. Quick question, quickb2 has better performance than box2d?

  • Balsa

    Umm, this has nothing to do with the tut but how do you made those boxes in like RRODE before the start of each level ?

  • QuickBox2D doesn’t seem to be maintained anymore, so it’s definitely nice to see another library that simplifies Box2D.

  • superb nice …………nice

  • Balsa

    I’ve noticed that you can have one wheel on the ramp and still be able to move

  • ryan

    What’s the as3math package? I can’t seem to find any info on it, and don’t see it included in the quickb2 source.

  • Thanks! Now I can build some bike games for fun ^^

  • santosh

    how we can show our own defined shapes in box2d….

  • Pingback: BaconTech - BaconCasinos Techblog()

  • MaR

    Would be nice to see this example with custom graphics.

  • prabakaran

    very nice could you explain me how to create ellipse shape dynamic body in normal box2d version 2.1