Best way of saving data, ini file or ds_map_secure_save()

thom

Member
I have always saved data using .ini files until I included IAP in my games and used the ds_map_secure_save() function to save the amount of coins on a .dat file, while saving the remaining on the ini file.

I heard that saving data using ds_map_secure_save() is saver/less likely to be hacked.
So why not always use ds_map_secure_save() to save on a .dat file? What is the advantage of using .ini files?

Also, will data on .ini files get hacked easier?
 

NazGhuL

NazTaiL
Also, will data on .ini files get hacked easier?
Yes! With the poweful program named NOTEPAD! (free!)

So why not always use ds_map_secure_save() to save on a .dat file?
What is the advantage of using .ini files?
Well, ini file can be edited easily.

ds_map_secure_save() is the best choice. The file is hidden (well I think).
 

Yal

GMC Memer
GMC Elder
I think it depends on how much you care about data being hacked. I don't mind players giving themselves tons of money and the best items in a single-player game, they're at most ruining their own fun. I save most of game data into text files with no real measures taken, so you can just edit them... except unlike INI files, you don't get plaintext labels telling you what each number does. Also, in Shattered World and Daemon Detective Gaiden, I used a bit more security (mathematically scrambling numbers and checksums all over the place) since they were considered 'really big' games, but in my Jam games and stuff, I don't bother even when I have the time to pull it off.
 
T

tserek

Guest
This may be late, Yal told much about it. But if you feel nerd, use bin file and the in-built commands. A bin file contains data in hexadecimal value, the data in file can be anything number between 0-255. As a base you need a hex editor to read and edit the file. Because the data is displayed as hexadecimal values, only you know what the values are in the certain cells, untill someone get the logic and hacks your save file.

You can make your bin file more safe by including checksum values. The checksum value can be sum of the game current process and inventory values, or you can make it more complex math system including hp, exp, rooms visited, x & y location of your chatacter when game saved, date & time, etc. You can place the values anywhere in the file to make it more secure, but be sure you have system to write values to certain cells and read them. Try to keep the bin file always the same size, it makes your access more easy and it could be the primitive check for valid file. If the checksum doesn't match with the other values the file is invalid, which makes worthless to edit the values random without knowing the the mechanism beyond.

You can make checksum system with INI files basically the same way.
 
Last edited by a moderator:
Top