User Tag List

Results 1 to 6 of 6

Thread: Help optimising an event

  1. #1
    Clicker Multimedia Fusion 2 Developer
    alspal's Avatar
    Join Date
    Nov 2007
    Location
    Australia
    Posts
    171
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Red face Help optimising an event

    I'm wondering if this event (2nd one I think) is as efficient as possible (CPU wise), or if it is even an issue to begin with. I'll be performing this almost every tick:

    -Random condition
    > String tokenizer: Split string
    > Start Loop X [tokenizer number of elements] times (about 16 times)


    - On Loop X
    - Active1 variable = TokenizerElement(loopindex) (100 Active1's)
    - Active2 variable = Active1 variable (100 Active2's)
    - Active3 variable = Active1 variable (100 Active3's)
    > Do positioning


    I feel like all the loops and value checking is unnecessary, but I don't understand loops and the object scope list thing well enough to optimize this. I also haven't used the ForEach object before, and I don't know if that will help or not in this situation.

  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)
    16 times shouldn't be a problem, as TokenizerElement() shouldn't be a very time-expensive operation. Is this going to be an EXE project, or Flash, or something else?

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put all of the loops in a deactivated group. Then, to start it, you'd use

    Condition{
    Open group
    Run Fastloop
    Close Group
    }

    Which would make sure MMF never has to read over your loop events except when that loop is running.

  4. #4
    Clicker Multimedia Fusion 2 Developer
    alspal's Avatar
    Join Date
    Nov 2007
    Location
    Australia
    Posts
    171
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah I know about FastGroups thanks. I'm going to be using anaconda. I just thought that all the variable checks combined with the loop would be slow.

  5. #5
    Clicker Multimedia Fusion 2 Developer
    alspal's Avatar
    Join Date
    Nov 2007
    Location
    Australia
    Posts
    171
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Forgot to mention in the first post, there will be about 100 of each Active1, Active2, Active3. So wouldn't all those hundreds of variable checks add up, especially combined with a loop?

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    "Premature optimisation is the root of all evil"

    You'll have to try it and see before you worry about the speed. :-)

Similar Threads

  1. 1 event in first frame activate an event in another frame? Sub-Application Tool
    By CloudExSolider in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th October 2013, 11:23 PM
  2. Replies: 3
    Last Post: 14th October 2013, 12:54 PM
  3. Help with event
    By Kentronisk in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 11th November 2011, 12:53 PM
  4. Replies: 0
    Last Post: 2nd January 2009, 09:50 PM
  5. [Request] Synced Event Editor + Event List Editor
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th March 2008, 07:44 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
  •