开发者

What are the major performance tricks for writing your own renderer in Flash?

开发者 https://www.devze.com 2023-02-11 09:37 出处:网络
Does anyone have hands-on experience on this? EDIT: Specifically, I am talking abou开发者_C百科t rendering 2D graphics directly onto one bitmap buffer.Are you are talking about 2D drawing?

Does anyone have hands-on experience on this?

EDIT: Specifically, I am talking abou开发者_C百科t rendering 2D graphics directly onto one bitmap buffer.


Are you are talking about 2D drawing?

If so, then only one piece of advice is necessary. Instead of using MovieClips, you will have a phenomenal speed increase from prerendering your content into BitmapData instances and then using copyPixels to draw them to the screen surface.

You won't get any speed increase whatsoever from draw. Has to be copyPixels.

A good example of this at work: http://www.electrotank.com/junk/mike/flash/copyPixel/


Using sprite sheets is a handy technique that can work well, too.

0

精彩评论

暂无评论...
验证码 换一张
取 消