Compile the latest Nape Physics

Hello, I find the latest Nape Physics compiled swc is version 2.0.16. (from the site https://joecreates.github.io/napephys/downloads.html)
I check the github and see it has few new comments afterward but no more new released swc anymore.
The Nape Physic’s Haxe version has released to ver.2.0.20…(https://lib.haxe.org/p/nape/versions/)
I’m not familiar with Haxe and don’t truly know how to compile the source code from the github. May I ask for help here, and please compile the latest source code to swc please?

Hello @sipahiro , so you will need to give few infos first

  • which OS are you using? (where you plan to compile)
  • which AIR target(s) do you plan to use it?
    mobile iOS/Android ? desktop Windows/macOS? both?
  • is it for a game?
  • are you absolutely sure you want Nape and not Box2d ?

Hello, I’m using Windows 7.
I’m making a game targeting mobile platforms (iOS and Android).
Nape plays quite an important role in my game so currently switching to Box2d will consume too much work. And also I read few posts which say that nape is much faster compared to box2d (I haven’t personally done the comparison yet)

OK so I would say in your case the best path is to not compile it yourself
and instead use something like Citrus engine

between the sources/examples/wikis

even if a bit old and not really updated (dead links on the website)
at least you will see how they hooked up the different parts
and be able to experiment/test

also have a look at Aymeric Lamboley’s blog on the Nape category (if you didn’t already did)

and after that if you still need to compile Nape from sources
well… from the page https://github.com/deltaluca/nape

Building from source
The supplied Makefile should work fine under *nix systems, commands will be near identical from windows command line, though mingw is probably easiest approach. Caxe will have to be built also, and compiling swcs requires my flib tool.

so not only you will need haxe but also caxe and flib that you will have to compile yourself first

that’s basically how Nape is setup, all around haxe, so for that I will redirect you to talk to people on the haxe forums.

Hello, I have tried Citrus, but their nape has basically the same older version. I really need to recompile the code as it later fixed a memory leaking issue… could you please redirect me to haxe forum and hopefully someone could compile the source to a swc? Many thanks!

OK, then you need to follow what’s indicated in https://github.com/deltaluca/nape
and search for the haxe forum, google is your friend

1 Like

Thanks! I have posted on Haxe’s forum and hopfully someone would help me out…