开发者

How to optimise a computer for running flash

I'm looking into ways to squeeze performance out of a flash installation.

The installation has a huge stage size, 2800px x 2100px, is on a high spec machine, but I'm experiencing low frame rates.

I'm wondering what the optimal set up is for a machine running this? Would flash prefer it if the system was set to optimise for background processes开发者_C百科 etc?

Any advice great fully received.


It's an interesting question. I don't actually know anything on the hardware front, but one thing I CAN tell you is that if you're having issues with low framerate on a giant stage like that a very common bottleneck is the DisplayList itself.

Depending on what kind of content you're displaying, it might help you significantly if you changed your rendering engine to use blitting. This is generally achieved by using CopyPixels() to change the pixel data in one big Bitmap image that lives on the stage - all other logic is removed, which cuts down a lot on render time. Like, a lot a lot.

Google "blitting in flash" and that should get you started.


Depending on what version of the Flash Player you're using, you can run flash with hardware acceleration. Here's an article about that

Of course, optimization of code is a complicated topic and you could dedicate a whole section of this website to it. In short, you'll want to keep track of the number of objects you have in memory and dispose of anything you're not using. Keep your display list flat and use the simplest possible display object for the job (use sprites instead of movieclips when you're not using the timeline etc.) or draw all your items into a single bitmap (blitting). Make sure you're using strongly-typed actionscript and avoid using any dynamic objects (avoid using Object objects or movieClip["foo"] = "bar" and instead create a closed class). Beyond that, there's a whole host of articles on optimizing flash out there to read.


If you publish to the latest version of Flash Player (fp11 onwards) you have access to the GPU for low level rendering (via Stage3D). Using a framework such as Starling ( http://gamua.com/starling/ ) you can render 2D to the stage using the 3D APIs and easily handle much higher frame rates on most platforms.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜