A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: No more "framerate loss" in Firefox 3?

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    38

    No more "framerate loss" in Firefox 3?

    Hello,

    I can almost believe it.. Champagne !!

    Probably, as game developpers (and perhaps framerate-sensitive developpers), you had noticed that both IE and FF caused a huge framerate drop for flash movie..

    For example, a movie originally at 120 fps will display at 60 fps.
    A movie originally at 60 fps will display at 40 fps.
    A movie originally at 30 fps will display at 24 fps.
    (I tested this with empty flash movies containing only a script displaying the actual framerate)

    There is a similar issue in exe wrappers.
    It could be called a "framerate tax" of 30%-50%.

    An explanation was that the activeX system causes this, I've never been quite sure about this. Tinic Uro said that FF consciously limited flash framerates in FF, but other softwares (Zinc, Swfkit, etc..) embeding flash using activeX had a similar limitation. A exe-wrapper like Jugglor successfully bypassed this by using the standalone player instead of activeX.

    But recently I noticed that Firefox 3 just play flash movies as the standalone player does!! No framerate loss !! Hurrah!

    I sadly observed the 50% performance loss on a recent experiment (90fps becoming 40fps), but after installing Firefox 3 the movie played marvelously well !!

    Bad new: IE7 still removes 50% of fps.

    some questions:
    - why don't developper at Zinc, Swfkit, etc.. do the same as Firefox3?
    - does Firefox 3 use active X?
    - does anyone know if activeX has some hidden parameter allowing to limit the timer frequency?

    Any ideas?

  2. #2
    5+5=55 Schfifty Five's Avatar
    Join Date
    Jun 2006
    Posts
    698
    Try setting the frame rate to 120, and then use a function like this one:
    http://code.google.com/p/hotruby/sou...imiter.as?r=20

    to set the frame rate to whatever you want.

    If you wanted an fps of 40, just call limitFrame(40) every frame and it should work fine. Even if IE7 cuts the frame rate in half, you'll still be left with a max fps of 60, so your swf will run smoothly at 40.

  3. #3
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Yeah it's funny that it's not been flagged up here before, but FF3 does perform really well ( Even without resorting to different wmode settings ).

    Schfifty as an alternative to your link, I'm using this timer by jeff @8bitrocket,
    http://www.8bitrocket.com/newsdispla...newspage=10248

    Which works really well, and you can set your fps at a more manageable 30 or so like normal, but have the main loop running at 60fps.
    It's proved silky smooth and pretty rock solid for me so far.

    Squize.

  4. #4
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Its not simply FF vs IE, Flash player itself has several version, some working better with some browsers and other version better with other. Browsers have different versions, plus there are also for example Safari and Opera, there are Mac and Linux versions etc. Not to mention computers can be hugely different on the CPU, memory, Video and everything else that can affect the perfomance.

    - does Firefox 3 use active X?
    I dont think FF ever used activeX, activeX is exclusively used by IE. All Mozilla based browsers use plugins (Netscape, FF, Opera).

  5. #5
    Member
    Join Date
    Dec 2007
    Posts
    38
    @Schfifty Five: Yes thx, I constantly use a similar script for decreasing the FPS. But I try to avoid setting 120 fps because it takes more CPU. For example if I want 30 fps, I set 50 fps, then I use a function setFPS(30):

    PHP Code:
    // achieves pFPS frame per second framerate.
    function setFPS (pFPS:Number) {
            
    _root.createEmptyMovieClip("FPS_mc"_root.getNextHighestDepth());
            var 
    lMC:MovieClip _root.FPS_mc;
            
    lMC.time getTimer() + 1000/pFPS;
            
    lMC.onEnterFrame = function() {
                   
    // perform stupid math to slow down if necessary:
                   
    while(getTimer() < lMC.time) {
                          
    Math.cos(Math.sin(Math.tan(Math.random()*Math.PI)));
                   }
                   
    lMC.time getTimer() + 1000/pFPS;
            }

    It's a bit clumsy but it works

    Actually I'm requesting informations about the activeX issue.

    @tonypa: thx, interesting to know that FF doesn't use activeX. However, Zinc and Swfkit use it. I'm still interested in understanding why active arbitrarily reduces the FPS.

  6. #6
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    oh boy, FF3 has been out for months already. I always hated the terrible performance in FF2 but thanks to FF3 its again useable.

    The downside of the performance gain is that if you use 3 or more tabs with framerate intense movies the browser can crash (happens often here with FF3 and Opera).
    A good way thus is to check if the flash movie is active, e.g if the mouse touches the stage and if not pause the game or engine.

    edit:
    btw today there is a first snippet of Googles browser "chrome" in a web comic by comic legend scott mcLoud
    http://blogoscoped.com/google-chrome/
    very interesting stuff regarding the multi threaded stuff
    Last edited by renderhjs; 09-01-2008 at 03:10 PM.

  7. #7
    5+5=55 Schfifty Five's Avatar
    Join Date
    Jun 2006
    Posts
    698
    Quote Originally Posted by Squize
    Yeah it's funny that it's not been flagged up here before, but FF3 does perform really well ( Even without resorting to different wmode settings ).

    Schfifty as an alternative to your link, I'm using this timer by jeff @8bitrocket,
    http://www.8bitrocket.com/newsdispla...newspage=10248

    Which works really well, and you can set your fps at a more manageable 30 or so like normal, but have the main loop running at 60fps.
    It's proved silky smooth and pretty rock solid for me so far.

    Squize.
    Thanks for that link, I hadn't seen that one before.

  8. #8
    Professional Flash Developer
    Join Date
    Aug 2007
    Location
    California
    Posts
    105

    Thanks, Squize!

    Thanks for the pimp, Squize! Also, FF3 has proven to be very reliable for me so far Frame rate wise - even on a Mac! Chrome in Windows runs like a dog's ass on my machine -- slow and runny and sometimes it seems to scrape itself on the carpet.

  9. #9
    doItLikeThis
    Join Date
    Jan 2004
    Location
    :noitacoL
    Posts
    1,080
    Wow, even I did'nt notice the performance increase in FF3, thanks gludion
    -Aditya

  10. #10
    Senior Member The Helmsman's Avatar
    Join Date
    Aug 2005
    Location
    _root
    Posts
    449
    Quote Originally Posted by renderhjs
    edit:
    btw today there is a first snippet of Googles browser "chrome" in a web comic by comic legend scott mcLoud
    http://blogoscoped.com/google-chrome/
    very interesting stuff regarding the multi threaded stuff
    Thank you very much renderhjs for sharing this article.

  11. #11
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    Quote Originally Posted by The Helmsman
    Thank you very much renderhjs for sharing this article.
    related FK thread:
    http://board.flashkit.com/board/showthread.php?t=776390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center