We use the single Bitmap > many BitmapData method on expensive animations 
(having pre-cached various timelines as arrays of BitmapData) outputting them 
on the frame rate by reassignment of the Bitmap.bitmapData property. It's been 
a while since I wrote the engine we use for it but I optimised/benchmarked it a 
lot and I think it was the best way - especially if you've multiple instances. 
Many, many times faster than playing a movieclip that's for sure - and faster 
than doing copyPixels from a master sheet. Of course - it can have a hefty 
memory footprint for longer animations so management / cleanup is important. 


On 9 Sep 2010, at 11:29, Henrik Andersson wrote:

allandt bik-elliott (thefieldcomic.com) skriver:
> i was always under the impression that the best way of doing that (for games
> sprite animations for instance) is bitmap 'blitting' where you use a
> tilesheet and then use bitmap draw to pull the current frame you want to
> show into your actual sprite

I think that's not the fastest way. It's still copying the pixels. I am fairly 
sure that not copying the pixels is infinitely faster.

My money is on the one Bitmap/multiple BitmapData solution. It should be using 
the least amount of memory and have no data copying at all.

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to