22Apr haXe Particles
486 viewsI have been tinkering with haXe a bit more lately trying to get a good handle on how it works on a lower level and seeing just how much faster I can get it to go versus AS3. I hit a couple strange haXe syntax issues like why the heck I can’t declare local class properties with default values. Aside from this, I’m getting used to the language. I implemented the below particle system using a perlinNoise technique to generate motion paths, implemented color sorting with bitwise operators, and used some advaced features like inlining and generics. On my machine, the final SWF uses less than 10% of my processor which is about 4-5% faster than a similar AS3 counterpart. This is not much to write home about, but Flash is always lacking in the performance area so any speed improvements are welcome!
Auto-Generated Related Posts:

April 28th, 2009 at 1:25 am
that is fantastic
June 15th, 2009 at 5:53 pm
A beautiful image of what looks like the stars in a galaxy I wish I could come across that image more often. Thankyou
June 18th, 2009 at 3:32 pm
Hey man, that is some strange result!
I just did a few tries with haxe to see what’s capable of, and I to find it very attractive as a language. Especially because apache mod_neko. That means you can program in the same high-level language both on client and server! But i was expecting to have it run slower than AS3. Neko has a rather different low-level model than Tamarin therefore I guess some conversion code is necessary. Maybe the performance hit you got id from inlining.
Question: in the AS3 version, did you use Vector?
Anyway, if this is realy true, than we need to blame it on this piece of code: http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/modules/asc/src/java/
It means it can be done better…
June 18th, 2009 at 3:36 pm
And by the way, I did a few speed comparisons between neko and tamarin (both shell versions) on linux and windows too. I instantiated about 500000 objects from a class. Result: neko twice as fast!
November 18th, 2009 at 3:04 pm
Cool particles system, what did you use to get it to work? Do you have any code you can share? I’m trying to implement a particle system in my haxe as3 project, I tried Flint but it didn’t work for haxe.
-Leighton