User Tag List

Results 1 to 7 of 7

Thread: How MMF reads conditions

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How MMF reads conditions

    Right, say you have lots of events where there are several conditions per event, for example:

    Active collides with qualifier 1
    Counter is greater than Counter 2
    Animation 5 of active is player
    Only one action when event loops

    Does MMF read EVERY condition then decide if it should activate the events, or does it read down one by one then give up if one is false? If so, would it be better if all the simple conditions were on top and the complex ones at the bottom to save MMF the effort of working all the complex bits?

    So if this is all right, what conditions use up the most processing power to work out?

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How MMF reads conditions

    What I expirienced so far is that it goes down the list as you described and looks if all of your statements are true.

    I would start with something that cannot be checked all the time.

    Like a colision for example

    Active collides with qualifier 1
    Counter is greater than Counter 2

    That is the correct order

    Counter is greater than Counter 2
    Active collides with qualifier 1

    Would Always check for the Counter to greater then 2 and then look for a colision after that and would slow down your application I guess.

  3. #3
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: How MMF reads conditions

    It stops evaluating the event when it meets a condition that evaluates to false.
    It is difficult to tell which conditions takes the most processing power, but I think the ones that deal with object selection (the conditions that filter out objects that aren't relevant for the event). So try to keep the simple ones at top and the more processor consuming ones at the bottom to minimize the probability of them being evaluated.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jun 2006
    Location
    Hampshire, UK
    Posts
    963
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How MMF reads conditions

    In reply to mavado, wouldn't checking a counter be 1000 times simpler than checking for a collision?

    Thanks for the reply though guys, I'll go through my event editor and re-order what i can to see if i can increase performance

  5. #5
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How MMF reads conditions

    Well it depends on how often the counter has a value greater 2

    lets imagine 90% of the time its greater 2

    the next step would be checking for a collision. MMF would now check all the time for the counter AND the collision. All the time 90% of the application time.

    If you do it the other way around it would only check on a collision and then verify the counter value.

    I hoestly believe that this will be a lot faster.

    But on the other hand, if the counter value is only like 1% of the application time greater then 2 then this might be faster.

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How MMF reads conditions

    Also, "true events" (red text) need to be at the top to work, even if they're processor intensive sounding like collision.

  7. #7
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How MMF reads conditions

    I usually put on top what is least likely (true events first of course). It is not exactly transparent what takes long to compute, although some common sense helps here.
    I'd say checking a counter against a number should be roughly 1000x less expensive that an overlapping check (if you use the collision thing, that MUST be at the top anyway to avoid wrong results). So I consider the computation time of regular expressions (e.g. x < y or other formula) (if they don't contain special functions that seem expensive) neglectable.

    But in general I'd say it's best to try to get a "false" in the condition check as soon as possible.

Similar Threads

  1. counter issue 8640184.813 reads 8640184.812999999
    By twister in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th January 2013, 09:40 AM
  2. Less VS More conditions
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 6th December 2011, 09:24 AM
  3. AND conditions
    By maestro1 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 24th February 2008, 08:11 AM
  4. AND OR conditions
    By Golds in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th September 2007, 01:21 PM
  5. ini object reads data trough a wormhole?
    By SoftWarewolf in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 14th January 2007, 03: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
  •