User Tag List

Results 1 to 6 of 6

Thread: Quick Array population

  1. #1
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quick Array population

    I am setting up my game whereby all the coding 'action' occurs in a single frame. I have done this couple of times before with some success, and although it requires more setting-up, in the long-run I have found it easier to manage the coding into groups which are enabled/disabled as required.

    I now want to manage the scoring in a two-dimensional array, whereby the level is held in 1 column and the target score is the second (plus other information as required in future revisions). This means that to create a new level, (in simple terms) I just need to add a row to the array with the level number and target score. I can also specify things like number of lives, enemies on-screen, etc.

    I know that I can load data into an array from a file, but this is going to be a Flash game, so file-loading is not an option.

    Can anyone advise an efficient method of populating an array at the start of the frame?

  2. #2
    Clicker

    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,731
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Quick Array population

    Use the INI, as it saves and loads in the the computer's cache.

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

  3. #3
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Quick Array population

    Quote Originally Posted by nivram
    Use the INI, as it saves and loads in the the computer's cache.
    Thanks for the reply.

    On the basis that this is going to be a Flash game, is this still possible?

    Also, I need the data in the array at the start of the game; it's not data that will be created during the game for subsequent saving.

    I'm looking for a method of populating an array with known data, in a manner that is easier than using the point and click interface.

  4. #4
    Clicker

    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,731
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Quick Array population

    You can popualte an array. How will the user be able to use it. How will you save it? How will you load it? It will just set in your program and do nothing. Yes,the INI works for Flash.

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

  5. #5
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Quick Array population

    Quote Originally Posted by nivram
    You can popualte an array. How will the user be able to use it. How will you save it? How will you load it? It will just set in your program and do nothing. Yes,the INI works for Flash.Marv
    It won't sit in my program and do nothing!

    The array will always be the same every time the game is run, so I don't actually need to load and save it. It will contain level information, e.g...
    Code:
    Level   Target Score  No of enemies
    1            10            5
    2            15            10
    3            25            20
    Each time 'Level' is incremented, the frame will use the information in the relevant array location to determine the (for example) target score and the number of enemies on that level.

    I can populate the array in a 'start of frame' condition, but that it quite time consuming and not particularly easy to manage. I was wondering if there was an easier way to populate an array at run-time; a bit like the 'data' function in ye old days of basic.

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Quick Array population

    I think you would have better luck using a few list objects. Also you don't even need to have the level #, because that is just the ID of the item.
    Working as fast as I can on Fusion 3

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, 05:54 AM
  2. Quick question- 1 dimension array or list?
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th December 2012, 03:47 PM
  3. Quick Array Object question - Current Position/FastLoops
    By uncleswell in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 9th August 2012, 03:33 AM
  4. Number Distribution and/or Population Density Map
    By CoachLaw in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th December 2010, 07:54 PM
  5. Quick Dynamic Array question
    By Kalnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th January 2008, 06:08 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
  •