User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: MMF interface, faster?

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF 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)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    MMF interface, faster?

    I a little scripting engine setup that Retriever2 helped me make, and the way it currently works with mmf is like this:

    function blah(amount,location)
    DoCall("blah",amount,location)
    end

    And then in MMF I check for when "blah" is called and do some actions with the passed values.


    Now would it be faster to use the mmf interface to do these actions instead of using DoCall? Or is there no noticeable difference?

    Thankers!

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    whatever's exposed in the interface is going to be much faster than a docall (or any function call that runs through events)

    whether this is noticeable or not depends on what you're doing; usually the differences don't show up unless you're doing thousands of calls per frame

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF 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)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    Thanks for the reply xyzzy!

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    also i was bored so i threw this together which shows the kind of differences that show up for many objects

    http://file.walagata.com/w/supermetalmario/mmfisp.zip

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF 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)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    Now that's awesome!

    Thanks for that! I'm convinced. I need to move all my code into xlua.

    I only have one object that I need to control from xlua, but many instances of it much like in your example. I have my own ID system for the objects, so how could I reference the objects by their id in order to do stuff to them?

    Thanks a bunch xyzzy, I almost dropped the idea of moving the code to xlua, but that example proves I need to.

  6. #6
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    Quote Originally Posted by UrbanMonk
    I have my own ID system for the objects, so how could I reference the objects by their id in order to do stuff to them?
    what is the id system based on? spread value?

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF 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)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    The ID's are loaded from an array, BUT I suppose I could use spread value though, it wouldn't make a difference.

  8. #8
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    that ipairs loop is basically equivalent to a spread-value/fastloop engine so you have direct access to the objects already

    if you need the ability to, say, get a specific object given a specific id (assuming they're unique), you may want to maintain a reverse lookup table for the object ids

  9. #9
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF 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)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    Hmm ok,

    How would I make that reverse lookup table? I would need a way to get the lua id for the object based on the value of one of it's alterable variables.

  10. #10
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: MMF interface, faster?

    rt = {}
    objects = mmf.newObjectClass("Active").objectList

    for i,v in ipairs(objects) do
    local id = v.values[mmf.ALT_A]
    rt[id] = v
    end

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Faster Runtime
    By FinalSpecimen in forum Multimedia Fusion 2 - Technical Support
    Replies: 22
    Last Post: 7th August 2012, 04:35 PM
  2. A Faster Way for Events
    By evilpantsmaster in forum The Games Factory 2 - Technical Support
    Replies: 0
    Last Post: 15th August 2008, 02:50 AM
  3. No Faster Than Non-HWA Version
    By Tuna in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 21st March 2008, 02:22 AM
  4. Is the EXE version faster?
    By Strawin in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 9th August 2006, 08:21 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
  •