Missing things TOP3: Solid FPS

A lot of new features are coming up these days, but the main problems for me in 7 years of developing flash havn’t changed. These are not single feature requests, they are essential and annoying in my daily work and it’s overdue to change them.

Solid and unchanged FPS in any enviroment (which has the power to)

Of course a slow computer cannot play a movie with 50 FPS, if he cannot compute every frame in the given timeframe. But I have movies, that can be played with (over) 120 FPS in a standalone player, where the IE constrained FPS to 63 and the Firefox is just dithering about 35. This seems to me improvable. There is a workaround for firefox, but it sucks all CPU and isn’t recommended for every os and browser.

I had some new findings today about firefox, which has to be proofed. Please go through these steps:

Make sure you have a fast computer (+2.5Ghz).
Open a study with IE on my lab, e.g. F8: MATRIX/mode7.
You should have easily about 63 FPS.
Close IE and switch to Firefox to open the same study.
Watch the FPS decreasing to about 35 after 2 seconds.
Open a bookmark in another TAB (make sure, its a big website, which takes some time to load > flashkit).
Switch back to the TAB with the study and watch the FPS increasing to 120 (regarding to mode7 study) while loading another site.
Be suprised. (?) (I tried to fake this behavior by loading and/or requesting files from the swf, but it doesn’t act the same way)

I could imagine, that it is a lot a work to change, cause you have to test a lot of systems, but it worth to do, it is the heart of any project.

23 thoughts on “Missing things TOP3: Solid FPS”

  1. For all my flas I notice that firefox never render > 35 fps. Usually near of 30 fps if there is a lot to render. So I decide to set 31 fps as the default speed for all my new fla. No more deception now…

  2. Thats not the best solution, since firefox may play the SWF with fewer FPS than 31. Did you tested my explanation above ? Firefox is(!) able to render SWF with ‘FullSpeed’. So why don’t implement a ‘BugFix’, that let all browsers display nearly the same FPS without any weird workarounds ?

    Furthermore for a smooth gameplay and solid physics I need more than 31 FPS.

  3. Totally agree with you André.
    I worked on some CPU-expensive projects and while testing it in the IDE, the project seemed to run with an acceptable speed. You can imagine the deception when I tried it to run in the browser.

  4. I tried your findings about firefox, but I don´t get that result at all.

    When trying the mode7-swf I get a fps around 50-60, no change when loading a heavy site in a different tab, except for when it´s done loading the other tab and renders that, then the fps temporarily drops to about 20.

    Using FF, flashplayer 8.

    What flashplayer did you test with? Maybe it´s an 8.5 ‘feature’.. ;)

  5. Andre I’m seeing what you describe regarding FF speeding up while another page is loading in another tab. Very odd.
    I also have data on how much faster the “stand-alone” Flash Player is than the Flash Player 8 being loaded in IE or FF. The sad thing is the microbenchmark tests done by Macromedia to show how the performance gains in Flash Player 8 used the stand-alone players.

  6. Yes, I have tested it on 2 machines (desktop/laptop) and they both have same results. Seems that Firefox delivers more power to the flashplugin, when another TAB is loading. Why ? I cannot see any relation.

    As I said, I tried to fake this behavior in Firefox, but for now, it doesn’t seem to work.

    @Klas: What machine are you working with ?

  7. Now I tried with the 8.5 player at home, and now I see what you mean.. that is really strange :)

    Just after it´s done loading the other tab(probably when it´s rendering), it boosts the swfs fps to 120+. Seems to work like the opposite of player 8…

  8. I don’t like hacks. I prefer stay to 31 fps. This is already good speed. ( video standard is 24 / 25 fps ).
    If you want to do 3d in flash or if you want to create animation running @ 50 fps in browsers, you always will be frustrated. Because flash is not made for this. You want too much and your skills are too high man ;)

  9. J, I do not like hacks too, but 31 FPS isn’t usefull, even human eye cannot ‘see’ more frames. What I want is a very stable and solid FPS about 50FPS. If you are running physical simulation as in games, you note the difference. The lower the FPS, the longer the vector needs to be, which causes a lot of errors, while animating things over time.

    If you are fine with the current status, than please just be silent. I think a lot of people want the player to act the way I have mentioned :)

  10. hmm, tried with the 8-player now and I still get the boost. I wonder why I didn´t get that increase when I tried earlier at work(my first post).

    I have the exact same versions of both FF, the flashplayer and windows, only difference is: amd at home(boost) and intel at work(no boost with player 8). But I don´t see how that could make any difference?

  11. I am on Intel and have boosts with both players (8,8.5).
    I think, its a ‘problem’ on Firefox and not flash itself, but I hope there is a possebility to control Firefox in a way, that helps to have a stable (and higher) FPS. I have no idea.

  12. But then again, Firefox its penetration is about 10%. Of course, we could use the hack for experimental purposes – most of the people interested in (y)our experiments will already have FF installed.

    But we could never ask a visitor to download and install FF just to watch (y)our projects.

    I’m wondering if it is not the browser instead the internal Flash player that causes the problem. Maybe some people could try the Mode7 experiment on different systems/OS’s and most important, browsers!

  13. I believe that it is because you are not “focusing” the mode7 engine, it can go up to 120 fps cause the flash doesn’t really need to render on the “screen” and ignored all drawing function.

    when you focus back to mode7 engine, it displays 120 fps and then drop down deal to it needs to actually render on the screen now

  14. @Unreality: It’s not that simple. The performance boost is while loading another TAB, whatever how much time it takes. I’m already back to flash with keyfocus and moving around.

  15. I could fake it, but it’s a bit ugly.

    Open the mode7 engine in one TAB and open this in another TAB. Switch back to the mode7 study and get more FPS. Weird !

    The other HTML just switches from a.html to b.html and back with a meta refresh tag.

  16. :) Yeah, maybe you could do it in a hidden iframe or something?

    My theory(guess) of why this happens:

    I think this happens because FF temporarily uses more cpu when rendering a new tab and that this is a sideffect of that.

    If you open the taskmanager and look at firefox.exe´s cpu usage when just running the swf. And then when you load a new tab(with heavy content), you can see it increase and then decrease just like the framerate in the swf. So more cpu to FF means more cpu to render the swf aswell…maybe?

    I guess it´s the same effect as using the wmode=transparent thing, that seems to use more cpu, so that´s probably why the swf runs faster then.

    If this is the case, it makes you wonder why it dosen´t allow that much cpu for the swf-rendering all the time..?

  17. Sorry to “bumb” this…

    But André, have you tried this now in the latest firefox( I´m running your mode7 engine in a solid 100+ fps(player8). Seems like they listened and fixed it.. :)

    Sorry if this is old news.

  18. hmm.. yea, nevermind :/

    I guess that was just some similar bug playing a trick on me. I had it going for like ten minutes, opening different swfs like your tilemapping:copypixels and some other stuff, and they all ran like crazy, and didn´t drop the framerate. And cpu usage seemed normal.

    But now can´t seem to be able to recreate it… and I wasn´t doing anything out of the ordinary at the time.

    Sorry, I got a bit excited over nothing it seems :)

  19. hi Andre.

    incase you missed it; Tinic has just posted (Sunday, May 07, 2006) a good writeup about the limitations of plugins like Flash Player with variable frame rates in different browsers/OSes and some of the reasons for it.


  20. FFox will not support framerate > 35 fps


    “What about FireFox? FireFox does not use special timers and made a decision to limit the maximum frame rate for plugins. Why? The thinking is that users constantly complain that plugins take too much CPU time.”

    31 fps seems a good choice :)

Comments are closed.