User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Tips for optimizing for Flash Export

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Tips for optimizing for Flash Export

    Hi all,

    I'm tring to convert an old game to run in Flash and have managed to get it working BUT the frame rate is appauling. (Not blamnig MMF mind you) It should be noted this exact same game keeps a solid 50 FPS easily as a PC runtime.

    The game is at 640x480 with 3 layers of scrolling and maybe 40 to 60 active objects in a frame.

    I'm hoping to get the game to run a solid 12 FPS without gutting everything out.

    Does anyone have experience with what changes, cuts or general event making habbits will give me back the most frames per second?

    For instance:

    1) Not using fine collision detection.
    2) Eliminating layers of scrolling.


    Other ideas?

    Does lowering the color depth change anything in Flash?
    Does avoiding using alpha chaneled images (loading in as indexed PNG's with only one transparent color...no semitransparent pixcels)save anything on frame rate?

    Any suggestions and reports on personal experience would be greatly apreciated.

    thanks

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    Try getting rid of the layers for a start - I think that's probably your biggest speed killer. I would try dragging the main gameplay layer down to layer 1, making the other layers invisible, and see what difference that makes.

    Of your other options, I know that colour depth won't make a difference (it's exported the same way whichever option you choose).

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    I noticed something that is making the bad frame rate seem infinately worse. Its the fact that its remembering ALL of my button presses, no matter how long ago they were!

    In other words if I button mash while attacking an enemy (likely to happen when frame rate is this low)the character will continue swinging long after the enemy is dead...stuck there until every last button press that had been que'd up has been satisfied.

    Is there any way to change this or is it built into flash?

    EDIT*

    WOW, I just tried in firefox, and two surprises:

    1) the frame rate is even slightly worse
    2) Despite the frame rate being still worse, it does NOT remember all the button mashing so its much easier and less annoying to play!

    Does this mean the button que'ing thing is built into internet explorer and we cant do anything about it?

    thanks again



  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    The biggest optimization is probably to update to the latest flash player ...

  5. #5
    No Products Registered

    Join Date
    Nov 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    Loops will really slow things down. thats what killed my last game . My current project averages 250 objs on screen and sometimes goes upwards of 500 objs with very little frame rate issues. It could be a certain way you are storing values or an event with no limitations. If your game isn't a super secret I wouldn't mind looking thru your code and potentially solving your problem. but no worries if you need to keep it under you hat. good luck!

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Mantis's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    I would also like advice on how to optimise the file size, rather than performance. PNG graphics have really bloated the size of my program so far, not to mention having a couple of MP3s. MP3 is encoded at 128kbps, personally I wouldn't want to lower this.

    I guess the PNGs are what's really bloating the SWF, but many images I created in Photoshop and as such have alpha channels. Plus, using a soft brush in Photoshop creates anti-aliasing that will look bad if I convert to GIF. Hmmmm. Unless anyone knows how to reduce PNG size I suppose my only option is to do what it takes to convert those that are okay without alpha channels to GIF...

  7. #7
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: Tips for optimizing for Flash Export

    Fastloops tend to reduce the FPS in Flash apps too.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    Thanks much for the replies everyone. For those interrested, I've made some descoveries.

    1) the biggest hit on my FPS was a really stupid fastloop thing I was doing.

    2) After eliminating my own big stupid problem with my fastloop "code" (causing hundreds of loops per frame needlessly) I was able to continue to make optimizations to events and now run my game at a solid 14 FPS while keeping all three scrolling layers!

    3) One of the biggest hits to the FPS in Flash exports seems to be math! Every time I removed an event that made one or more object move in a sinewave or that for some reason used fairly long equations I'd get an entire FPS back!

    4) It seems like keeping math and fastloops as low as possible, followed by number of active objects, you can keep your game running pretty darn well.

    I'm quite pleased so far and have lots more optimizing to go.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Ryan's Avatar
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    1,279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    Did sinewave use the Square Root function? Apparently that can hit performance pretty hard, depending on who you ask of course.

    Active objects is usually the biggest hit I find. 0-100 objects without any kind of assigned movements or events in the editor is fine, 100-200 objects is playable, 200+ and you're eating into your frames-per-second

    Most likely a restriction of Flash itself rather than MMF2, unless a Flash CS5 developer can tell me that it handles 300+ objects fine. I wouldn't really know.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Tips for optimizing for Flash Export

    I think it did indeed use Square root..that or sine maybe both...I dont remember... but yeah.. the number of actives and complicated math seem to be the two biggest factors...so try to optimize them away before removing scrolling layers. (if scrolling layers are important to you as they are to me. )

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Tool Tips not Showing up in Flash (Active System Box)
    By redpandagames in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 9th December 2012, 08:27 AM
  2. Cannot Export to Flash
    By ProdigyX in forum SWF/Flash Export Module Version 2.0
    Replies: 41
    Last Post: 6th November 2012, 09:57 PM
  3. Flash export?
    By grimmy in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th November 2009, 01:39 PM
  4. Flash Export
    By Spike in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 11th July 2009, 08:17 AM

Posting Permissions

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