User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: Constant Frame Rate Struggles

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2016
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Constant Frame Rate Struggles

    So this is a pretty general question, not sure what to mention specifically. Guess I'm just looking for any advice or tips you guys might have.

    Frame rate has been a consistent issue for us and I can't figure out what I've been doing wrong. We had to cancel our last project as the frame rate got worse and worse the more we added. We started a new game last month on a much smaller scale and have now started running in to issues with it as well. It dips down to 40-ish frames at times. We aren't even getting close to done on these before it happens. This game is maybe 5% complete at this point and I know the frame rate is gonna get worse the further we move forward. They aren't particularly ambitious games either. I'm not sure if I'm doing something wrong or if CTF just isn't meant for the kind of games we're trying to do with it.
    I've found several posts of how to optimize and I'm following pretty much everything that's advised. We are using a lot of For Each loops and variables, but I see no way around this with the kind of game we're making.

    -The game currently has 924 events.
    -Usually around 300-400 active objects spawned at once. (Most of these are simple things with only a couple events tied to them.)
    -Many of the game's events are de-activated when not in use, re-activated when they become relevant. (I'm sure I could do this more thoroughly, but again, the project isn't even close to done and some things have to be running at all times.)
    -Frame rate struggles the most when there are multiple enemy types spawned. Like if we have 4 of Enemy A and 2 of Enemy B. If there is only one enemy type spawned, we can have dozens of them on screen without as severe a dip. (The frame rate struggles in general, it's just most extreme in this case.)
    -Our enemies each have a Platform Movement Object using For Each. Could this be the problem? I don't feel it is, as the biggest issues come with multiple enemy types, not multiple of one type. If this does have something to do with it, is there any other way of getting platform physics on enemies that work as well as PMO?

    Not sure what else to mention. Let me know what details could be useful. Any help at all would be massively appreciated!

  2. #2
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hmmm from what you say you guys are using MMF should be able to handle that pretty easily.

    Are you using a bunch of alpha channels on your active objects? I had some slowdown issues where I had a large backdrop object on top of the main play area that was using alpha channels and when I got rid of it the problem was fixed.

    There's also a way to increase the number of possible objects in every frame's properties on the left side of the screen. I believe this has to do with memory allocation, you could try that as well. Maybe try different display options also (Direct 3D9 / Standard / etc) and see if that changes anything.

    When all else fails, it COULD be your computer. I've had issues with slowdown on my old laptop that ran Win 8.1 but none with Win 10 and even my old XP computer ran things okay (weird, huh?)

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2016
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep on the alpha channels. Have 150 objects that spawn in and out in the background with alpha. Also have a big one one across the screen. These weren't causing any slow down before and I haven't changed them since, but maybe that could be it. Gonna take that off and see. Thanks!

    I have number of objects set to the max 20000. Should I lower that? Also it's set to 3D9, which seems to be best.

    And good point on the computer! I'll try it out on another and see.

  4. #4
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    wpd's Avatar
    Join Date
    Nov 2015
    Location
    SE Asia
    Posts
    406
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)
    PMO probably...
    useful thing is the - "Only One Action when Event Loops"

    One tip is maybe Only activate Enemy with PMO if it's within frame or near Player.
    Or Divide a Condensed game level with couple frame.

    Optimized and Perfectly executed code is probably the go-to framerate improvement

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    it's probably something to do with the for each looping through your enemy behaviors.. but it's probably some kind of taxing hole in your code somewhere that is pushing things too hard, because from what you've described framerate shouldn't be an issue.

    one question, do you have the debugger running? Have you tried with the debugger turned off?

  6. #6
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It can't hurt to lower the max objects a bit and see what happens.

    MMF is awesome, however sometimes weird bugs do happen. One infamous issue I had before involved two array objects where the application was somehow mixing values from one with the other even though the code wasn't making it happen. Luckily this was with MMF1.5, and 2.5 is much more stable.

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2016
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow! I have been running with the debugger this whole time and turning it off actually does make a big improvement! Why is that!? Awesome though, thank you! It's still not great, but its way better.

  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2016
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wpd View Post
    PMO probably...
    useful thing is the - "Only Activate when Event Loops"

    One tip is maybe Only activate Enemy with PMO if it's within frame or near Player.
    Or Divide a Condensed game level with couple frame.

    Optimized and Perfectly executed code is probably the goto framerate improvement
    What is "Only Activate when Event Loops"? Where can I find that? And already doing the PMO activate on screen thing.

  9. #9
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    wpd's Avatar
    Join Date
    Nov 2015
    Location
    SE Asia
    Posts
    406
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)
    Sorry, I mean - "Only One Action when Event Loops" in the Limit Conditions
    it's a very useful memory saving condition which allows you take the action only Once when an event happens.
    EX:
    Counter = 0 --> Set Alterable Value to 100
    This set it Alterable Value to 100, 60(FPS) times per second if counter is 0

    Counter = 0, Only one action --> Set Alterable Value to 100
    This set it Alterable Value 100, one time if counter is 0


    And yes when it's focused in the debugger the framerate drops, just remove it there and check the FPS with a counter on screen

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    The debugger hurts framerates severely, especially if you display many values at once. Never evaluate performance with an open debugger. I think itīs integration in Fusion is sub-par consuming resources and that wonīt chance anymore in Fusion 2.5s lifecycle.

    In case of tracking down framerate issues you have to look at RAM usage AND CPU load.

    Minimize RAM usage: For big objects make them small and scale up on runtime when this is possible witch the art direction, cut big backdrops into tiles (be careful: many tiles put a load on the CPU). Donīt use alpha channels, if not necessary, stick to the power of two.

    Minimize CPU load: Deactivate unused events whenever possible, create sub-events by using groups to avoid repetition of event-checks, do a manual object scoping using flags and exclude every objects from loops and especially collision detection that are not essentially needed, be humble with pixel perfect collisions/ often box collisions also do the job and are much less expensive (turn of fine detection in the objects properties), be humble with fastloops and for each loops/ often the job can be also done with a cheaper and slightly imperfect approach. Schedule events that don’t have to run every frame tick by using timed groups, itīs often perfectly ok to have your collisions checked 20-30 times/ sec for everything still running fine. Integrating Fusions physics engine also gives a bit of a slowdown. Frequently polling for new gamepads and other devices produces severe slowdowns.

    When using tiles make them small (32x32 to 128 x 128), but donīt make them VERY small. Itīs a calculation of RAM saving vs CUP load that is produced by the engine keeping track of too many backdrop objects.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. How can I fully speed up a frame? (Not just by frame rate...)
    By TheFieryPlumber in forum Fusion 2.5
    Replies: 4
    Last Post: 7th July 2016, 07:24 PM
  2. frame rate
    By TheCrimsonTaco in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 1st December 2012, 12:58 PM
  3. Low Frame Rate at the beginning of the frame
    By LittleTinyBabyMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 6th June 2012, 11:54 AM
  4. frame rate
    By TheCrimsonTaco in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 15th May 2012, 02:04 PM
  5. Frame Rate
    By Bruto in forum Multimedia Fusion 2 - Technical Support
    Replies: 33
    Last Post: 3rd July 2006, 02:38 PM

Posting Permissions

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