I've been testing performance of the Nape physics engine vs the Box2D AS3 and Alchemy ports and it seems like Nape is a lot slower than both of them. I have read in a few places( here and here ) that it is supposed to be faster. Has anyone done testing between the two and if so what were your results?
Asked
Active
Viewed 4,703 times
2 Answers
4
After talking to the creator of Nape he told me that Nape runs slowly on mobile devices, which is similar to my target device, due to its use of in-lining.

Jordan
- 1,233
- 2
- 12
- 32
-
Just wanted to thank you for this answer... all of the comparisons I've read so far seem to deal with desktop performance only. In my limited testing, the performance increase between Nape and other solutions on mobile devices was insignificant. – producerism Oct 05 '11 at 16:45
1
Hey, found this question from the link to my site. I've been a Box2D AS3, and then a Box2D Alchemy user for a year or so, and I can say with confidence that Nape blows Box2D performance out of the water. My early tests have shown that while Box2D can have 100-150 boxes stacked, Nape can have 500+ with the same performance.
In my recent testing, I can have 1000 bodies in the scene, and I see more lag from display than physics calculations. Default settings should be fine; just make sure you're using a similar physics scale!

Trent Sterling
- 11
- 1
-
I have a feeling I might be doing something funky with Nape. I'm testing these engines on a fairly slow system. I have objects that are around 100 pixels in height and 20 in width falling about 500 pixels onto a static body that is 1280 pixels by 100 pixels. I have the cell size for the space set to 100 and a gravity vector of ( 0, 200 ). All of the objects hit the static body at the same time to put strain on the engine. I see the FPS drop to 8-7 for a few seconds in Nape while the Alchemy port of Box2d only drops to about 21 fps for a second or 2. Any thoughts? – Jordan Apr 01 '11 at 19:29
-
And I only have 10 of the 100 by 20 objects. So I must be doing something wrong. – Jordan Apr 01 '11 at 21:49
-
Don't forget to use release versions of Nape and from Flash Builder, Export Release Build. – analytik Nov 15 '12 at 10:36
-
Also with the latest versions of Flash Builder (4.7 beta 2+), you can use profiling to find the bottleneck. – analytik Nov 15 '12 at 10:41