dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Performance on Mac

  1. #1
    Senior Member maksum's Avatar
    Join Date
    Oct 2002
    Location
    Portland, OR
    Posts
    118

    Performance on Mac

    Has anyone else noticed that games (and any flash for that matter) performs significantly slower on Macs?

    I have what I think is a fairly un-intensive game and when I see it on a mac (os x, 500 MHZ 512MB ram) it just bogs down extraordinarily.

    Does anyone know of certain things to look out for or to avoid to make games perform better?

    Thanks,

    Mike

  2. #2
    jtnw's Avatar
    Join Date
    May 2002
    Posts
    1,328
    Set the frame rate to 21 or 31, and make sure you have the latest player.

    jtnw

  3. #3
    Senior Member maksum's Avatar
    Join Date
    Oct 2002
    Location
    Portland, OR
    Posts
    118
    That didn't seem to make any difference at all. Any other thoughts?

    Am I alone in experiencing this? Has anyone else seen this happen.

    Thanks,

    Mike

  4. #4
    Junior Senior
    Join Date
    Nov 2000
    Location
    sydney
    Posts
    565
    Nope you're not alone.

    This game : http://www.evilbastard.org/slight/cc2b.html flies like a bat out of hell on below average PC's, but crawls along like a crippled slug on any mac.

    FYI, it's set to run at 50fps.

  5. #5
    Senior Member maksum's Avatar
    Join Date
    Oct 2002
    Location
    Portland, OR
    Posts
    118
    Indeed, I see that. Man, so what have people done to improve this and make it not quite so bad? I'm working on this game that I have planned to port to mac (I'm creating installable executable files from my .swf) and after I create those, it's the exact same thing, just fine on the PC, way too slow on the mac. I'm thinking if I could somehow get the .swf to perform reasonably on the mac then the executable will be improved I'm sure.

    Any help at all would be very much appreciated.

    Mike

  6. #6
    juggernart me2222's Avatar
    Join Date
    Jun 2000
    Posts
    1,322
    Currently there is no help, maybe Version 8 (as macromedia promised at tokyo)

    Some tips:
    set FPS to 30 to make the movie play with a max of 25FPS (with Flash plugin 7)
    Any FPS set higher than 50 will play with a max of 50 FPS (if the CPU can do)

    Use Bitmaps instead of Vectorshapes, they are drawn much faster
    PNG Bitmaps with alpha chanel still draw much faster

    Don't use _alpha tweens or other _alpha settings on stuff

    Make the movie dimensions smaller

    Set quality to medium or low
    juggernart.com

  7. #7
    I'm your boogie man!
    Join Date
    Aug 2003
    Location
    Where hope and daylight dies
    Posts
    21
    Also the Linux version of the Flash player is not optimized
    -> web || blog <-

  8. #8
    This problem exists since the beginning of Flash, but it looks like the flash player 8 will fix everything.

    In the mean time try coding everything you can instead of using tween animations and use bitmaps instead of vector graphics, also the best FPS setting to improve performance is 31 FPS, don't ask me why but this setting helps.(do a search about FPS).

    And, If you can make your games feel smooth on a Mac,then you will know that on Pc will perform ok.

    btw, I use Mac to develop flash stuff always.


    Flash Rules!!!

  9. #9
    relax, I wont sting!
    Join Date
    Jul 2000
    Posts
    73
    Originally posted by me2222
    Currently there is no help, maybe Version 8 (as macromedia promised at tokyo)

    Some tips:
    set FPS to 30 to make the movie play with a max of 25FPS (with Flash plugin 7)
    Any FPS set higher than 50 will play with a max of 50 FPS (if the CPU can do)

    Use Bitmaps instead of Vectorshapes, they are drawn much faster
    PNG Bitmaps with alpha chanel still draw much faster

    Don't use _alpha tweens or other _alpha settings on stuff

    Make the movie dimensions smaller

    Set quality to medium or low

    Hmmm a question on the framerate. When my framerate is set to 30fps, I always get 25fps with the mac flashplayer7 plugin (30fps solid in the standalone player). Only when I set the fla to 40-something fps, do I ever see above 25fps (in which case I see that 40-something). So like... what if I want spot on 30? 31-39 dont seem to do anything for me, they still show 25fps...

    Also, is this the same on windows? Like if I author my stuff at 30fps, does the windows plugin run at 30fps too, or does it do this bizarre thing like the mac plugin and lock it at 25fps, unless its >40fps in which case it lets it be >40fps?

    As a mac user I know this is frustrating, heh. Here's hoping player 8 solves some problems.


    Also here's a theoretical question (dont have time to test it just now, I'll try in a few days). If I have roughly 70 movieclips on screen that are 20x20 tiles that are -vector shapes- (with 130 blank ones, so never mind them), and they move around @ 30fps (screen res of 320x240), if I was to change them to -png's- realistically how many more could I throw on screen? Is going from vectors to png's that much quicker? (would be fantastic if so... if I could put 3x as many png's on screen as I do with basic vectors and still have the same speed)

    Also, with regards to png's, are they much slower than say jpegs? If we want some transparency, would it be better going with gif's, or is there only a negligible speed benefit?

    Interesting topic

  10. #10
    relax, I wont sting!
    Join Date
    Jul 2000
    Posts
    73
    OK well screw other assignments for uni, this is more interesting Just did a fair bit of testing with pngs vs vectors in ninjamans' gotoandstop tile engine. The results are interesting!

    First up, with a 320x240 game window, with one quarter of the screen covered in visible tiles (ninjaman has roughly 33% of the screen as visible tiles). That's 48 tiles in total (16 columns wide, 12 columns high - so 16x3 = 48 tiles rendered in total). Setting the fps to 120 and running a timedemo:
    27fps with vectors
    38fps with 24bit png's (0.5fps less with 8bit ones?)
    png's are 44% faster

    The tile in question consists of a 20x20 block, which is comprised of 4 shapes and 2 lines (corner of a wooden box)

    Moving up to filling half the screen with tiles (so 16x6 = 96 tiles on
    screen)
    21.5fps with vectors
    36.5fps with png's (same value with jpgs, 0.5 less with 8 bit png's and gifs)
    png's are 70% faster (notice they doubled in quantity yet only dropped by 4% in speed, yet vectors dropped by 20%)

    Moving up again, the hardcore test with a 640x480 window, 32 columns and 24 rows, 8 of which are filled (so 32x8 for 33% screen fillage, 'realistic' for my game), 256 tiles drawn in total (!)
    13fps with vectors
    22.5fps with png's
    png's are 73% faster

    And the final test, a realistic upgrade from 320x240 with 16x12 columns -> to 480x360 with 24x18 columns, 6 of which rendered, so 24x6 = 144 tiles on screen
    16fps with vectors
    27fps with pngs




    Bottom line: with 144 tiles on screen at a screen res of 480x360, png's rendered at the same speed as vectors did with 48 tiles on screen with a screen resolution of 320x240.

    Excellent Minimal file size uppage too

    1ghz G4 running flashplayer standalone 7.


    Conclusion: use png's over vectors where possible for tiles in tile based games

  11. #11
    juggernart me2222's Avatar
    Join Date
    Jun 2000
    Posts
    1,322
    Originally posted by Hornet
    Conclusion: use png's over vectors where possible for tiles in tile based games
    As I said, use PNGs wherever possible (not only on tile based games).

    The 25/50 FPS behaviour is happening with the Flash Plugin 7 in IE and Safari on Mac OSX.
    I wasn't able to get a framerate higher than 25 or 50 on my G4 DP 500 (which is about 800-900 Mhz)
    Setting the FPS from 25 to 47 the resulting FPS was 25. At the 48FPS setting the FPS suddenly jumps to 50 FPS in any FPS from 49 to 120 outputs 50 FPS in the Browser.

    I don't know how the behaviour on Win PC is.
    I have a Pentium3 500 Mhz Notebook where I test my stuff on.
    I tested a game I made, where the FPS is set to 31 FPS and it showed a wild FPS jumping between 21 and 30 in IE 6 with Plugin 7.
    juggernart.com

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