User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13

Thread: De/Activate group by expression

  1. #11
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export ModuleFirefly 3D 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)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    209
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Expensive if used every tick
    Optimised if used sparingly



    https://community.clickteam.com/threads/101380-The-Clickteam-Fusion-2-5-optimisation-amp-performance-Hard-Data-thread?highlight=group





    https://discord.com/channels/1905521...17930573676566

    Uppernate (BartekB)30/12/2019
    Do not activate/deactivate groups. That is slow

    It's better to just run through 100 conditions, or more


    Uppernate (BartekB)30/12/2019
    Zvoc, probably, sometimes the easiest/least complicated solution is the fastest. But you'll never know if you don't profile it (e.g. with Microtimer if you don't have 2.5+)

    Ian, it's not an issue if you do it rarely (we're talking times per game tick), once a second is 0.0166, that's classified as pretty rare.
    The problem arises when you use that as state controllers so we're talking maybe 500.0 per game tick (activations and deactivations).

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Jun 2014
    Posts
    52
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I just did a little experiment on one of my projects, where I ran a fastloop 128 times every frame/tick, which every 5-6 iterations triggers another loop, whose own "on loop" events were in groups & were only activated when their specific loop was called, & then deactivated again once the loop was finished. Then I ran the same test with the "on loop" groups activated at the start of frame, & then never deactivated again.
    Tested at 144fps, the deactivating/reactivating method was slightly faster averaging around ~55fps, the 'always activated' method drops me down to about ~51fps. The massive fall in fps from 144 to 50-55 is mostly down to the amount of nested loops being run per-frame. There's also a lot of other stuff happening in the background. Under normal circumstances this nested loop would not be running 128 times a frame.

    The "on loop" events themselves are mostly integer comparisons between Active object alterable values (e.g Alt Value A is => Alt Value B...things like that) & the actions are mostly writes to arrays + one large expression which is calculated from multiple values from an array (the default clickteam array object), so that's writing + reading array values dozens of times per frame. Obviously my results are going to be heavily project-specific, but it seems to reflect the conclusion that was arrived at regarding group activation in the Clickteam performance thread. Thanks for posting that btw, very useful info in there

  3. #13
    Clicker 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)

    Join Date
    Aug 2020
    Location
    Canada
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lots of good info in this thread, thanks everyone

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. activate group every half second or faster
    By anatol in forum Fusion 2.5
    Replies: 6
    Last Post: 7th June 2018, 04:54 PM
  2. Replies: 2
    Last Post: 6th May 2017, 12:54 AM
  3. activate group via expression?
    By oasuke in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 26th January 2012, 03:11 AM
  4. Activate group {name} with expression?
    By Kingoftaurus in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 27th May 2010, 02:09 AM
  5. 'Activate a Group of Events' causes MMF to CRASH
    By Mico in forum Multimedia Fusion 2 - Technical Support
    Replies: 19
    Last Post: 22nd April 2009, 05:26 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
  •