User Tag List

Results 1 to 4 of 4

Thread: Question about performance regarding the event "Always"

  1. #1
    Clicker Fusion 2.5 MaciOS 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)
    TGeorgeMihai's Avatar
    Join Date
    Nov 2015
    Posts
    122
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Question Question about performance regarding the event "Always"

    I have a curiosity as how should the events are structured, if it affects the performance

    Normally I create events the following way (this is just an example):
    Code:
    Upon pressing "F":
    - Create object "square"
    - Set transparency to "64"
    Would it be a big performance hit if I do the following ?
    Code:
    Upon pressing "F":
    - Create object "square"
    
    Always (or put a condition like If object name = "square")
    - Set transparency to "64"

  2. #2
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    In that case yes because on the first example you set the transparency one time when you press f and create the object. On the second example you set the transparency over and over all the time.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    JoshMakesGames's Avatar
    Join Date
    Jul 2016
    Posts
    108
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you don't need an action to be repeated, then there's no reason to have the Always condition attached to it.

    And for the performance question, it all depends on what you're doing. If you're making a small game, it's probably not much of an issue, but with a larger game that has more stuff going on, the little things will eventually add up.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    503
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Actions like setting a color or transparency or anything you really only need to call once should be done in the same event where they're called in the first place (if you can). If you find for some reason that there's an action that isn't taking with the original action, first check the order of events and make sure that, say, the action on the object isn't being called before the object is created. If all else fails, you can also set a Flag or an Alterable Value on the object, then check for the Flag or Value, use the "Only One Action when Event Loops" function, and call the action there (or use a fast loop). It's an extra line of code, but zero performance hit.

Similar Threads

  1. Replies: 6
    Last Post: 18th August 2015, 02:23 AM
  2. Event Position/"Fusion Event Breaks"
    By casleziro in forum Fusion 2.5
    Replies: 7
    Last Post: 5th August 2014, 08:42 PM
  3. Help! - Multiple "Which animation is playing?" Conditions in same event line.
    By ezzypixel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th October 2013, 02:18 AM
  4. "Only one action when event loops" question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th December 2011, 01:49 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
  •