Mar 23, 2009 8
Optimizing the Alchemy Particle Emitter
30,000 simultaneously moving particles with a decent frame rate. Not bad at all.
Improving the performance of my Particle Systems API port involved completely rewriting the way data was being marshaled from C++ to AS. The original emitter passed two ByteArrays, one for positions and one for colors, and had AS step through each to draw individual pixels as well as handle 2D projection. This resulted in a steady 20fps (on my Macbook Pro) with roughly 5,000 simultaneous particles.



