A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: [Feedback] [AS3] Performance Test

  1. #1
    Member
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    75

    [Feedback] [AS3] Performance Test

    Hi, I'm just curious how this little simple demo is performing. On my low end dev kit, it runs ok but really runs nice if quality is at "low". Technically, I'm using nothing but the display.Sprite() object, it's alot slower than copypixels() but surprisingly I'm getting good enough performance with quite a few objects on screen and some heavy scaling,rotation as well.

    http://gameagoo.com/flash/

    You can click on rocks to eplode em.

    Did it run ok? If not, could you please post your browser, cpu/gpu? Thanks for your time.

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    looking at it makes me sick (everything rotates and moves)

    if you want a slightly faster container user the Shape() instead of the Sprite() class - it does not support events though.

    also when using the ...graphics.beginBitmapFill(...) and alike operations you can speed it up using somethig like this:
    PHP Code:
    var g:Graphics sprite.graphics;
    g.moveTo(0,0);
    g.lineStyle(0,0xff0000,1);
    g.beginFill(0xff0000,1);
    ... 
    not so smooth here I guess ~ 20 fps Opera 9.63, FP10, AMD Athlon 64 3500+ ~ 2.2 GHz.
    GPU is bull**** as hardly any GPU hardware is supported in window mode - its only used atm. in fullscreen.

    maybe add a FPS counter - so people can better compare

  3. #3
    talk to the hand! Never_land:('s Avatar
    Join Date
    Nov 2007
    Location
    your mother's bedroom
    Posts
    490
    it ran ok here i guess.

  4. #4
    Senior Member Draxus's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    123
    No FPS meter so it's hard to tell, but it looked smooth to me.

  5. #5
    Member
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    75
    Thanks. Yah..looks like Flash render times can vary wildly. For you more advanced coders, when using delta time movement is it better to set a high project framerate like 600fps (six hundred) like I'm doing now, or is it better to set it at 30'ish fps, which I see no reason for any simple flash game to run faster than 30 anyway. I have seen alot of comments about setting the framerate to 31 btw.

  6. #6
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    the FPS limit is 120 in the IDE (up to 1000 technicly) but because of several reason you usually wont reach such a high value
    Note: Flash Player might not be able to follow high frame rate settings, either because the target platform is not fast enough or the player is synchronized to the vertical blank timing of the display device (usually 60 Hz on LCD devices). In some cases, a target platform might also choose to lower the maximum frame rate if it anticipates high CPU usage.
    http://livedocs.adobe.com/flex/2/lan...html#frameRate

    that beeing said you could easily even kill a computer by setting the value redicously high and expect the CPU to choke though it.

    I have seen alot of comments about setting the framerate to 31 btw.
    that is something of the past where alot of things where often frame dependent (not relative to time) and many computers were slow. 31 and not e.g 30 comes from the mac days where there was a magic framerate for the mac that run well and on the pc as well (the pc always performed better within the flashplayer)- people got often stuck on the 31 as they initially wanted 30 (+~5 fps more as typical TV -animation [24 fps]) but because of the buggy mac player choose 31.
    Apart from that it depends for example if you have frame depending elements like timeline animations fixed to a certain framerate- or code like this:
    PHP Code:
    onEnterFrame = function(){
    player._x+=5;

    which will only work fine if the framerate is constant but if you set the FPS rate very high changes are big that the actual framerate might change alot and vary on many computers hence the animations and movements look odd. This is also a reason why many dos games on modern computers simply run to fast because they dont have a FPS limiter.

  7. #7
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Runs fine to me.

    I have used 30 fps for most game but moved it up to 40 for latest games as more people have better computers and it gives slightly smoother movement. Anything above 75 fps have been crashing browsers or locking up CPU completely so I try to avoid that high values.

  8. #8
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    runs good.

    looks like dog food meaty chunks.
    lather yourself up with soap - soap arcade

  9. #9
    Member
    Join Date
    Jan 2009
    Posts
    90
    Runs okay on my laptop, which is an older 1.5 ghz celeron. Without an FPS counter I can't say, but definitely over 15fps (the point at which things become really choppy).

  10. #10
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    looks fine here. love the background.
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

  11. #11
    Member
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    75
    Thanks for the replies and suggestions. Very much appreciated. Is there a good FPS counter somewhere I can plug in to my app?

  12. #12
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    I use

    http://gamersgarden.com/2009/01/very...e-fps-counter/

    and removed all the mem usage output
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

  13. #13
    Member
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    75
    Here's a copypixel() and draw() version. I use draw() for the rock particles when clicked on.

    http://gameagoo.com/flash/index2.html

    .hooligan, thanks for the link to the fps handler.

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