User Tag List

Page 5 of 5 FirstFirst ... 3 4 5
Results 41 to 49 of 49

Thread: Make a time machine run with lower time complexity

  1. #41
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Pixelthief, did you find a way to make the Binary Array 3D? If so, how was it done?

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  2. #42
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Well, the answer is yes and no.
    The binary object has a "Combine X/Y/Z coordinates" function that can be used to simulate a 3d Array. All it really does is just write the values along the 1d Array at the simulated coordinate. And I got it running up and fine! But sadly, it wasn't a terrible amount of difference. See, with the MMF2 Array method, I could get 200ish objects. With the Binary Array, I could get 300ish objects. But with the help of the newly updated xLua extension, I now have an engine that is capable of reading/writing 10000+ objects without any slowdown at all.



    I've been testing it out, and I haven't managed to slow the darn thing down yet. Weeding out a few crashes, but it looks like it will be stable, fast and sleek.

  3. #43
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Ok and thanks. Good job on xLua script.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #44
    No Products Registered

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

    Re: Make a time machine run with lower time comple

    Quote Originally Posted by Pixelthief
    But with the help of the newly updated xLua extension, I now have an engine that is capable of reading/writing 10000+ objects without any slowdown at all.
    i think you can see why i'm always bugging the lua extension developers to add more and more interface functions, since each missing interface function you have to instead implement in the event list is a potential performance bottleneck (and a guaranteed one if you have even a couple hundred objects)

  5. #45
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Pixelthief, any chance sharing how you did that?

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #46
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Quote Originally Posted by nivram
    Pixelthief, any chance sharing how you did that?

    Marv
    Yeah, I would be very grateful to know as well. :grin:
    Your work on this engine has been amazing! Glad you didn't give up.

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  7. #47
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Which part did you want to know? The whole rigmarole of how the entire system with its stacks of events occuring, stacks of pointers to objects, arrays of objects, 3d arrays of object properties, etc, is far too complex and confusing to explain But for the individual parts its not terrible.

    I'm not using the binary array anymore, but if you want to know how to use it, heres a little miniguide;

    The whole saved binary is nothing but one very very long string of 1's and 0's, not arranged in a 2d or 3d matrix at all but just one long 1-dimensional string. So when you use the function inside the binary array object "Combine XYZ", all it does is multiply & mod the x,y & z values to create a point on the 1 dimensional list to correspond to it.

    You can change the size of the X & Y axises by using the "Set virtual height & width" function. This doesn't change the set of data in any way, it just changes what the Combine XYZ gives for its result.

    Combine XYZ = X + (Height * Y) + (Height * Width) * Z

    So thats pretty simple even if it sounds complex. If you want a 500x300x100 array, you just set Height = 500, Width = 300. You don't have to set the Z variable because the function is open-ended, so a 500x300x100 array uses the same thing as a 500x300x200 array. You just need to remember to give it a proper amount of size for the array (resize).


    But the problem was I wanted to have a (Time,ID,Property) array, where each property is an integer. But an integer takes up 4 bytes. And when it writes an integer, it writes them to a contiguous 4 bytes. So if I did them in that order, it would overwrite the first 3 bytes of the next ID, and it wouldn't work.

    The trick was to just make sure to write it in reverse order, since bytes in the X category are contiguous. So for a 3 dimensional array, you should do this:


    Resize(X_size * 4 * Y_size * Z_size) ex. Resize(500*4*300*100)
    Write Integer(Value, Combine(X * 4, Y, Z))
    Value = Read Integer Unsigned(Combine(X * 4, Y, Z))

    if you don't make sure its writing in 4 byte intervals, it might overwrite the beginning of the next integer.

  8. #48
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Thanks for that Pixelthief. Appreciate it.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  9. #49
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Make a time machine run with lower time comple

    Quote Originally Posted by Pixelthief
    The trick was to just make sure to write it in reverse order, since bytes in the X category are contiguous. So for a 3 dimensional array, you should do this:


    Resize(X_size * 4 * Y_size * Z_size) ex. Resize(500*4*300*100)
    Write Integer(Value, Combine(X * 4, Y, Z))
    Value = Read Integer Unsigned(Combine(X * 4, Y, Z))
    There's my problem! :grin:
    Thanks for the info. Much appreciated!

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


Page 5 of 5 FirstFirst ... 3 4 5

Similar Threads

  1. time/split time for racing game
    By ptiseigneur in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 24th September 2012, 06:05 PM
  2. Time Machine Particle - Contest Entry
    By Nifflas in forum Widgets
    Replies: 17
    Last Post: 25th October 2008, 01:52 PM
  3. How to make a real time audio EQ display?
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 3rd November 2006, 03:54 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
  •