User Tag List

Results 1 to 10 of 10

Thread: Simplest approach for saving game settings?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Simplest approach for saving game settings?

    I am trying to research the best method for saving a player's settings. I don't need multiple profiles, so there is just one set of data. I want to eventually save the following:

    Input: Keyboard/Joystick
    Unlockable Game Mode: Unlocked/Locked
    High Score Table data (NOT the high score object)

    After reading the tutorial, I don't think INI will work since it isn't encrypted. I have read a little about the Save Game object, the Ini++ object and the frame saving/loading feature.

    The player should only be able to adjust the input setting, so I am wondering if I should put that in an ini file and take a different approach for the other items.

    Can anyone offer some suggestions on which approach would best fit my needs?

    Thanks in advance,

    Mobichan


  2. #2
    No Products Registered

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

    Re: Simplest approach for saving game settings?

    INI++ has encryption settings

    you could store the user-changeable stuff in an INI file, since it's the easiest and sometimes people might want to edit them directly from the INI

    Save Game can save active object information in a binary format, but i don't know if it's encrypted or if it can store anything other than AO data... never really used it

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    I've got the keyboard/joystick setting working with a simple ini.

    But ini++ is a bit confusing. I have been unable to run any test cases without my frame crashing. Is anyone familiar with how to use ini++? Or does anyone have any basic examples of how to save and load to files with it? The included examples are overkill for my purposes and a bit over my head.

    I want to try and have 5 string displays/counters that I can populate with high scores. The data would be written to/from the ini++ file. Can anyone offer an approach to help me get started?

    Mobichan

  4. #4
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    scottige's Avatar
    Join Date
    Jul 2006
    Location
    Scotland
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    I tend to use associative array for my loading/saving needs.
    Quite easy to use and it has an option to encrypt your file.

    I don't have MMF2 in front of me at the moment so I'm afraid I can't give you an example but if you play around with it, I'm sure you will find it fairly simple to use.

    The options are pretty self explanatory.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    I've only played around with the Associative Array sample file so far. It looks easy to use, but I would need to sort my data by value. I assume I would save out the array entries as (key = name, value = score). It seems to sort them based on key name (alphabetically). How would I go about sorting them in decending order based on their value?

    Would I need a list object to load them to and then sort them? This is my first attempt at using data managing objects, so I am a little unsure where to start.

  6. #6
    Clicker Multimedia Fusion 2
    dragonguy's Avatar
    Join Date
    Apr 2008
    Location
    RULE BRITANNIA!
    Posts
    3,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    Ive been using the byte array a bit and might be able to do it, it all depends on what you want it to save.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    I don't know why I didn't think to look at this before, but the Hi Score object does all the sorting automatically. And upon further inspection, I can actually read it's entries and put them into an ini file (with ini++ so I can get encryption).

    I noticed there was a way to set the ini file from the hiscore object, but there is no save/load command. This might sound stupid, but do you need to use the ini object in tandem with the hiscore object to get it to save an ini file? Or is there some automated thing the hiscore object is doing?


  8. #8
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    "But ini++ is a bit confusing. I have been unable to run any test cases without my frame crashing. Is anyone familiar with how to use ini++?"

    Hello,

    There will be an update which should make Ini++ easier to use (by hiding the most advanced features if you don't need them).

    However, there should never be any crashes so would you email me any files where this happens. Thank you. The address is in the profile.

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    It looks like the crash was coming from me trying to open an ini file, set its contents and then set a counter to use the ini's contents all in the same line (Start of Frame). When I moved the setting of the counter to a new line (On a key press), the crash stopped.

    I was trying to use the ini++ similarly to the ini object, but the wording is a bit different. Jax, do you have any simpler examples of how to save and load data, without needing a keypress? I was trying to simply back up my hiscore tables to an encrypted ini file.

  10. #10
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Simplest approach for saving game settings?

    I'm afraid I have exams at the moment so I can't prepare one. If you email me, you could send me an example of what you said above, remind me to make an example for you and also suggest how to make it easier.

    That would help me very much and will hopefully help you too

Similar Threads

  1. Simplest question ever asked...
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th May 2012, 03:53 AM
  2. Best Approach for Universal Binary?
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 15th March 2011, 07:41 PM
  3. The simplest custom platform engine?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 23rd July 2009, 05:19 PM
  4. A question on how to approach a project.
    By Jikito in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th January 2008, 10:48 PM
  5. Game Settings
    By PaulW in forum File Archive
    Replies: 12
    Last Post: 24th April 2007, 11:42 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
  •