User Tag List

Results 1 to 3 of 3

Thread: specs for CNC ARRAY format?

  1. #1
    No Products Registered

    Join Date
    Sep 2007
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    specs for CNC ARRAY format?

    Hello everyone, long time no see. Please excuse the long introduction, but it's important to get to my point, so read on

    It's been many years since I've made a game with a Clickteam product, but earlier in the summer I tried to restart it again for a little mascot competition where the prize was a copy of MMF2. Now, I still have interest in finishing the game, even though I didn't get near finishing it at that time. However, in the process of building I have come up against several hurdles.

    In my game, the character uses force vectors to collide with objects and provide realistic bouncing angles against background objects and shaped enemies. It also uses a tile engine to dynamically load the levels at runtime. The tilemap creation software was programmed in another language (.NET), to provide automated features which would have been very difficult to achieve using MMF fast loops.

    However, the size of the levels required and the fact I couldn't simply use background objects for the collisions I wanted (since I not only need to check IF the character collided with a tile, but WHAT KIND of tile they collided with) meant that loading all the tiles into memory at once would be quite impossible for MMF to do. Some quick calculations showed potentially over 500,000 tiles on a medium sized stage, which is unacceptable.

    I recently came up with a novel way around this problem, and that is to dynamically load small pieces of the level at runtime outside of the frame, and unload them when they are beyond a certain culling distance. However, the implementation of this plan would be a LOT easier with 2d array support, since I could reference the general area around the character directly in an intuitive manner rather than relying on MMF code and fastloops to constantly re-parse a string in memory. MMF's built in Array object would be perfect for this job.

    I've dealt with CNC ARRAY objects before a lot in my earlier games, and it's a really simple way to store a lot of data. However, I've never really tried to access these files outside of MMF, nor do I know what kind of files they actually are. Before I go and waste a lot of time reverse-engineering the format so I can get my VB.NET tilemapper to spit out CNC ARRAY files, I was hoping that someone else had maybe done it before me, or if clickteam had a readable spec on the format for developers.

    Thanks a lot for the help, and any information on the format will be useful. If no spec is available, just a few tips to get me started parsing the file would be nice! (Delimiters, header chunk sizes, etc)

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: specs for CNC ARRAY format?

    CNC Arrays are uber simple.
    I'm pretty sure this is right, but if any problems with it, correct me.
    Code:
    offset  type    details
    -----------------------
      - HEADER CHUNK -
    0000    ascii   "CNC ARRAY"
    0009    byte    Null
    000A    dword   Always '2' for some reason. Maybe version number?
    000E    dword   X dimension size
    0012    dword   Y dimension size
    0016    dword   Z dimension size
    001A    dword   Settings (see note 1)
    001E    (Data chunks follow from here)
    
      - DATA CHUNK (number array) -
    0000    dword   value of this item in the array.
    
    This repeats for every element in the array, until it reaches
    the end of the file. There is one dword per element.
    
      - DATA CHUNK (text array) -
    0000    dword   Length of text
    0004    ascii   Stored text
    
      - Note 1 (Flags/Settings) -
    This shows the meaning of the various bits in the flag byte:
    
    -------- -------- -------- ----gbtn
    g = Global Array (1 = yes)
    b = 1-Based Array (1 = yes)
    t = Text Array (1 = yes)
    n = Number Array (1 = yes)
    - = Bit is not used.

  3. #3
    No Products Registered

    Join Date
    Sep 2007
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: specs for CNC ARRAY format?

    thanks!

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. iOS preferred specs for audio files
    By Olivier in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 18th April 2012, 06:41 AM
  3. Minimum specs for an app?
    By Pablo in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 10th January 2012, 02:47 PM
  4. 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
  5. Determining recommended and minimum specs?
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th December 2008, 08:41 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
  •