A kind of Associative Array

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I'd love for there to be some sort of plugin that lets you give it variables with names, much like MMF's Associative Array (referencing that damn program again), that you then can save to encrypted external files. Basically just variables for that object that are save-able.

    With an Array you can save and all, but everything is reached through the array positions. You'd make some sort of documentation of what goes where, but I think what makes an associative array easier is that you get a variable by its name. With an array you have to reserve spaces in it, and if you want to change maybe the amount of items a list can hold it would be a giant hassle to extend it if the list's values are stored in the middle of the whole thing. I guess multiple save files for one "save slot" helps, BUT STILL!

    It's an easy way to handle saving. I don't know if you can replicate that already, maybe with an INI, but are you able to encrypt anything in Construct?

    EDIT: I suppose one could make a Sprite and make its variables save to an array, and then you call for an array position's string to compare with the name of the variable of that sprite, somehow. Not sure if that would be slow though? And can an array store both strings and variables?

  • I think you're looking for the hash table object . For now you can get some basic encryption with the crc32 plugin.

  • Pffffttt, calling me unattentive, are you?

  • Honestly at first I had no idea what a hash table was until I played around with the plugin randomly one day. Just assumed you didn't know the meaning/usage of hash table at first, like me.

  • The only difference between hash and assarrays is that you have to unfortunately insert keys before you can fiddle around with the values, and I dont think hash tables are as well protected?

  • I assume you mean you have to create a key before you can set it, whereas AssArray created one if you set a key that didn't exist?

  • I assume you mean you have to create a key before you can set it, whereas AssArray created one if you set a key that didn't exist?

    yeah that's what I meant.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you're looking for the hash table object . For now you can get some basic encryption with the crc32 plugin.

    How could you use the crc32 plugin for that?

  • You could hash the ini file, save a hash, then only load the ini if the hash matches the ini.

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