BaconMuncher
Member
Okay, working on my first Steam game and since I already have a wishlist of several thousand for my game before it launches, I want to try and discourage cheaters as much as possible.
The game saves your gold balance and more on a local save file on the players own PC. So obviously, I want to use this AES encryption script I just got and imported to my project.
I guess I'm an idiot, because I don't understand this pdf write up about it at all.
I can make it work and encrypt my save file if I give it a key: here is my code now:
to save my file I use:
and to read my sate back I use:
So it seems that I need to use the aes_generate_iv() command to make a random encryption to make it much safer to being able to be hacked or whatever.
I can't seem to get that right and working.
Can someone PLEASE show me actual code I'd need to use to encrypt this save of gold in a random encrypted local save file and retrieve it, different random key used each time?
..From that I can definitely figure out how to also save and read back all the other saved variables.
Also, is this AES encryption really good for like a Steam game? or is even the random encryption I'm asking for help with not that great for a Steam game? Is there something better available you'd recommend I use instead?
Thanks much for help in advance! <3
The game saves your gold balance and more on a local save file on the players own PC. So obviously, I want to use this AES encryption script I just got and imported to my project.
I guess I'm an idiot, because I don't understand this pdf write up about it at all.
I can make it work and encrypt my save file if I give it a key: here is my code now:
to save my file I use:
GML:
key = "5j77jcpnfvctog8kegw125327rt";
fn = "saved";
safe_ini(fn, key);
safe_ini_write_real("player", "gold", global.gold);
safe_ini_close();
Code:
key = "5j77jcpnfvctog8kegw125327rt";
fn = "saved";
safe_ini_open(fn, key);
global.gold = safe_ini_read_real("player", "gold", 100);
global.user_name = "you";
safe_ini_close();
I can't seem to get that right and working.
Can someone PLEASE show me actual code I'd need to use to encrypt this save of gold in a random encrypted local save file and retrieve it, different random key used each time?
..From that I can definitely figure out how to also save and read back all the other saved variables.
Also, is this AES encryption really good for like a Steam game? or is even the random encryption I'm asking for help with not that great for a Steam game? Is there something better available you'd recommend I use instead?
Thanks much for help in advance! <3