Way of an Idea prototype updated to Box2D 2.1a and Nape

Three years ago I published a three steps tutorial about the creation of a Flash game like Way of an Idea.

Following the same concepts I already explained in steps 1, 2 and 3, here is the updated Box2D 2.1a version running together with the Nape version of the game.

This is what we have:

Draw the track with your mouse, press SPACE to play/pause the simulation and delete the chalk pressing 0 (zero) and moving the mouse over the chalk.

You should be able to recognize both debug draws, Box2D and Nape.

This is the source code, with comments to show which part of the code belongs to Box2D and which to Nape:

It would be interesting to know if you ever used Nape in some of your projects, meanwhile download the full source code of the prototype.

  • spets

    Hi, nice work as always, i have managed to separate the circle from its fill somehow thought, while trying to erase a part using the 0 button.

  • Dan W

    @spets
    The circle with the fill is the Box2D’s debug draw… the open circle is the debug draw from the Nape physics engine. I was confused at first, until I read the article and then looked up just what Nape was and looked at the code.

  • Nice! I hadn’t even known about Nape prior to this post.

    The samples on their site are very impressive! Destructible terrain, soft body physics with buoyancy, and all running very quickly.

    Sucks that they don’t have C++/ Java ports yet, but I’m sure the principles in the samples could be applied to box2d as well.

  • Sergey

    How create in box2d effect of crawling up the wall

    example in this game:
    http://fleshki.net/index.php?ev=7&g=881887

  • Arch

    hello, can this code be combined with quickbox2d?
    THANKS!

  • Pingback: Create a Flash game like iOS Pop to Save using Box2D - Emanuele Feronato()