Mohammad Haseeb’s Blog | Tag Archive | stress

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