Build 10 classic Flash games and learn game development along the way with this ultra-fast paced game development course.

If you love this blog, this is the book for you.

Buy the book

Get the source code of 12 commercial Flash games, which have been loaded more than 50 million times!

Learn from real world successful examples.

Get it now

Box2D for Flash Games teaches you how to make Flash physics games from scratch with the most advanced features.

Create the new Flash game smashing hit.

Buy the book

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.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (13 votes, average: 5.00 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 5 comments

  1. spets

    on January 10, 2013 at 11:22 pm

    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.

  2. Dan W

    on January 11, 2013 at 8:37 pm

    @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.

  3. ChrisM

    on January 12, 2013 at 8:25 am

    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.

  4. Sergey

    on January 14, 2013 at 3:29 pm

    How create in box2d effect of crawling up the wall

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

  5. Arch

    on March 14, 2013 at 8:13 pm

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