Skip to content

Flambe with Nape

Mark Knol edited this page Mar 25, 2014 · 5 revisions
### Physics engine that works with Flambe _Nape is a powerful, fast, and friendly 2D Rigid Body physics engine for AS3/Haxe. Nape is open-source and free to use for personal and commercial projects._

nape

With Flambe, you can use all none-rendering related features of Haxe NAPE.

Installation

Install from commandline: haxelib install nape

In your flambe.yaml, add a haxelib to your project by changing the haxe_flags line:

 haxe_flags: -lib nape -D NAPE_RELEASE_BUILD 

(-D NAPE_RELEASE_BUILD enables aggressive optimization in Nape, though you may want to remove it for debugging)

To get Nape showing up in code completion, you'll have to include it in the project (as classpath) of the IDE you're using.

Debugging view

To see the debug view of Nape, you should test using the Flash target.

You can add this component to your game:
https://gist.github.com/markknol/6932447

You can use it like this:
System.root.add(new NapeDebugView());

Links

Clone this wiki locally