User Tag List

Results 1 to 7 of 7

Thread: Four dimensional array

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Four dimensional array

    Does it exist? Is there an extension that can do this?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do this easily for example with the Named Variable object.

    So you can define variable names like 1-1-23-8 for a specific position (in this case 4-dimensional) as string or value.
    If you want to split the variable names again easily use the String Tokenizer object and use "-" as delimiter.
    So you can add even more dimensions if you want.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Just use a 1-dimensional array to simulate a 4d array - the maths for converting between 1-d index and n-d array coordinates is not too difficult:

    w = i mod dimw
    x = i mod (dimw*dimx*dimy) mod (dimw*dimx) / dimw
    y = i mod (dimw*dimx*dimy) / (dimw*dimx)
    z = i / (dimw*dimx*dimy)

    i = (z * dimw*dimx*dimy) + (y * dimw*dimx) + (x * dimw) + w

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,964
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    There's that, I guess. Also the Dynamic Array object supports up to 10D without fancy multiplying dimensions and stuff.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Another question... Which would be quicker, loading and writing/reading to many different small array files quickly, or loading and writing/reading from a giant one?

    I'm going to guess the former, but I would love to hear some reasoning. I might not need a 4d array at all, I might just need to store a lot of small arrays in their own files.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA 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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suppose another solution is to use a new array object for every iteration of 4th dimension you wanted to use...

    this is kinda troubling for me since I really need a 4-dimension array for my game and the Dynamic Array extension isn't compatible with most exporters

    the converting 1d to 4d seems really complicated to me

    sigh lol

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA 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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    realized I didn't need 4-dimension array after all. learned a lot. love mmf!

Similar Threads

  1. Dynamic Array - Sort 2 dimension array by Column 1
    By Ryan in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th December 2012, 04:54 AM
  2. Dynamic Array to Binary Array problems
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd March 2010, 10:48 PM
  3. Array help
    By Zabooza in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 21st April 2009, 03:02 AM
  4. [Request] Array of array - possible for $$$
    By Blizna in forum Extension Development
    Replies: 9
    Last Post: 29th December 2007, 11:13 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
  •