views:

784

answers:

5

A long time ago (5+ years) I read an article about optimal frame rates for the Flash Player. The article reasoned through some calculations that 31 frames per second was the optimal fps to run your movies at and seemed, at the time, logical to me and have been using 31 fps ever since.

However, I have forgotten the reasoning from that article and I was wondering if 31 fps is still considered a good or optimal fps to run your swf's at.

What fps do you prefer for your swf's and why?

+1  A: 

31-33 FPS was the magic number for AS2.

You can smoothly run around 50-60 FPS with AS3, and you'll notice a huge improvement.

deeb
+2  A: 

I'm no Flash expert, but this sounded interesting enough to at least do some Googling. This forum thread implies that the "industry standard" of 31 fps comes from a Flash 5 bug. Since Flash 5 was a while ago, people seem to agree that you're more free to pick a framerate these days, everything doesn't have to be made using 31 fps.

unwind
+2  A: 

Also don't forget that you can set the framerate dynamically at runtime by setting Stage.frameRate property. Some people have implemented reduced framerates when app is not in focus to save on CPU use, or increased it before doing more intensive data processing.

Tehnomaag
+7  A: 

The reason for the 31 fps was that during the time of Flash 5/6 there was an issue with the Mac version of the Flash Player where it would plateau at certain frame rates. That is, if you ran at 12-17 FPS, it would rarely get past 12. However, if you set the fps to 18, it would stick to 18 just fine.

The "sweet spot" plateau was at 31 fps because it offered the smoothest animation (assuming you weren't doing frame-by-frame animation, in which case 31 was just too work intensive) while not being nearly as CPU intensive as the next plateau, which I believe was 61 fps.

Even though those days are behind us it is still important to strike that balance between smooth animations and CPU. Make sure you set some time aside at the beginning of your project (particularly if it will have any hand-done tweening!) to figure out where the sweet spot is for your goals.

Branden Hall
+2  A: 

Usually 12-16 for animation, and 25-30 for coding stuff.

Also, take a look at this class: http://www.gskinner.com/blog/archives/2009/05/idle_cpu_usage.html

It lets you take advantage of high framerates without the consequence of high background CPU usage! Plus, it is easily adaptable for non-air stuff. (just comment out anything that gives you a compiler error).

PiPeep