• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

UWP ds_map_secure_save() not currently supported on Windows UAP

Greetings

im getting the error in the topic when i attempt to have the game save information while it is running on the uwp module, making it impossible to save any information about the progression of gameplay.

does an alternative command exist similar to this which will save the information in a secure/encrypted manner? i have not run inot this problem before now and a bit at lost how to address it given how essential ds maps have been to me up till now.

thank you.
 
P

Paolo Mazzon

Guest
You could loop through the map and save it all to an ini, using base64 to "encrypt" the data. (Of course, most modders/programmers will know what it looks like but it's better than nothing)
Code:
var size = ds_map_size(inventory) ;
var first = ds_map_find_first(inventory);
ini_open(save_file);
for (var i = 0; i < size; i++;) {
    ini_write_string("header", first, base64_encode(inventory[first]));
    first = ds_map_find_next(inventory, first);
}
(My code is basically just a modified version of the example found in the docs)
You could write your own encryption or maybe just md5 hash the file and check the hash, but I personally find encryption useless. Who cares if the user edits their save in a singleplayer game? They're ruining it for themselves.
As for the function not working on UDP, I don't have udp so can't help you there; sorry...
 
Top