WCK vs NAPE

Update:  The NAPE demo is updated for rotation as pointed out by a reader. However, I see that it made no difference to the benchmark. Let me know, how it works for you guys.

I don’t like to deliver useless speeches on current affairs and by that I definitely mean the Flash death fiasco that spawned a while back. Adobe announced that that they were making Alchemy a commercial product that rang my ears because we were using Alchemy in a project and it’s about to go into production. Adobe announced recently that older Alchemy products will not work in Flash Player 11.2+. This was definitely a painful decision to make but we had to look for alternatives, e.g. Apparat, Haxe etc.

I searched for alternatives to WCK and stumbled upon NAPE in the next search. It was surprising how many good reports I saw about Nape and the absence of a native Flash Physics engine. I know about APE but it’s outdated and isn’t in active development any more. I had to test NAPE before I could make a decision. So, I searched for a test and I found this. The test is good and shows the comparison between WCK and NAPE on Desktops and Mobile platforms. However, there is one thing missing from this test that I had to test myself. For 2D accelerated APIs, I had Starling and ND2D in the contender list but I chose the former for its better API. I’ll check Starling later as well. The test below was originally posted on ND2D site but doesn’t work anymore. I recreated it to work on current FP11 releases. For now, check out the two demos:

 

 

 

 

 

 

 

 

 

 

 

 

To test these demos, you must be on FP11.1 for WCK. FP11.2+ will not run WCK or any Alchemy SWF, so if you get a blank screen, it’s definitely because you’re running FP11.2. For me the results of these demos are somewhat strange. The demo has 1000 balls in it. The Machine I am running these demos on:

Processor: Intel Core i5 2500k 4.6Ghz
RAM: 16GB DDR3 1833Mhz RAM
GPU: GTX 560 Ti DF 1GHz 1280MB

WCK:

FPS:  Initial 25-26, Settling 33-36, Settled 52-60 (Note:  Messing with the settled balls brings the FPS down to 35FPS for 3-6 seconds)
Memory: Initial 23-28MB, Minimum 22MB, Maximum 36MB
GPU Load: Initial 12%, Movement 3%, Settled 26%
GPU Memory: 286MB
SWF Size: 361KB

NAPE:

FPS:   Initial 35-40, Settling 52-53, Settled 60 (Note:  Messing with the settled balls keeps the FPS at 60FPS, which is amazing)
Memory: Initial 15-16.1MB, Minimum 15MB, Maximum 33.4MB
GPU Load: Initial 1-3%, Movement 12%, Settled 26%
GPU Memory: 268MB
SWF Size: 309KB

NAPE is the definite winner. You may download the sources for yourself and test the demos. I’d be glad to know results in different browsers from users or mobile machines.

WCK Sources
NAPE Sources

Related posts:

  1. Next Gen Flash? What do I want to see?
  2. Spring Physics in AS3
Read full story »

3 Comments

Leave a comment
  1. Baatish
    06. Dec, 2011 at 3:24 am #

    Processor: Intel Core 2Duo E7400 2.8Ghz
    RAM: 2GB DDR2 Hyper X 800Mhz RAM
    GPU: GeForce 9500GT 512MB

    NAPE:

    FPS: Initial 25-26, Settling 38-40, Settled 47-49 (Note: Messing with the settled balls brings the FPS down to 43FPS for 1 second or less)
    Memory: Initial 257.21MB, Minimum 257MB, Maximum 280.1MB
    GPU Memory: 286MB

    WCK:

    FPS: Initial 10-12, Settling 14-15, Settled 17.5 (Note: Messing with the settled balls keeps the FPS at 19FPS)
    Memory: Initial 241.88MB, Maximum 249.97MB
    GPU Load: Initial 1-3%, Movement 12%, Settled 26%
    GPU Memory: 268MB

  2. greg
    28. Dec, 2011 at 3:53 am #

    Hey, why balls are not rotating in the nape sample? I think this may affect the performance.. could you update the nape demo?

    • MHAQS
      06. Jan, 2012 at 3:13 pm #

      Hey, sorry for not responding earlier. I had updated the demo locally after you posted the comment. I just never got to post it online. I didn’t see any performance difference though.

Leave a Reply