which data object to use for save system?

This forum is currently in read-only mode.
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Out of Hash Table, Array, and INI-- are they all just as quick, and it comes down to your preference in how you like to store data?

    I have a simple save system in mind-- the game saves when you leave a layout, I have maybe 50 variables to be loaded when you enter that layout again (locked doors, opened chests, etc.) Also a simple Zelda style inventory (either you have the item or you don't)...

    Easy to keep track of no matter which data object I use.

  • I'd say, time does not play a role in this scenario. Of all three, ini is the slowest, because it needs to convert strings, but that's a matter of milliseconds per line. As long as the amount of data stays that small you're free to use whatever pleases you the most.

  • personally I prefer arrays,

    but in-truth i don't know much about using .ini

    only seems they way to go if your using it for text or something that you manually need to change often.

    plus .ini files are easy to modify and cheat.

  • There are ways to scramble and protect your INI files from the prying eyes of players. Even then, wouldn't they have to understand my idiosyncratic PV naming? Thank you.

  • That's funny, lol. I was just searching about a very similar question, hash tables vs arrays. I didn't find that much yet, just checking the Help Section for some recent things, and I see a topic about almost exactly my question.

  • tulamide: Time to post your links about arrays and hash tables. <img src="smileys/smiley16.gif" border="0" align="middle" />

    Too busy right now to find them all.

  • Arrays and hash tables have different benefits usability wise. An array is basically a big grid of values with no names. Hash tables have named values, but no real grid.

    I got the benefits of both by using both and when saving, running a loop for each key in the hash table, saving its name and value into the array, and when loading, running a loop to create the keys.

    If you use this method, just remember to make sure that the array is big enough to store all of the keys from the hash table.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here is a link about arrays and hashtables, incl caps demonstrating them:

    http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=8400

    --------------------------------------------------------------

    Arima, I wonder why you do it so complicated? Without any further info it seems to be unneccessary (you can just save any hash table to file with the same ease as saving an array).

  • To have one save file with both array and hash table data. It's actually not nearly as complex as it sounds.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)