• 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!

GML Using AES Encryption - Rev 1.0

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:

GML:
key = "5j77jcpnfvctog8kegw125327rt";

fn = "saved";


safe_ini(fn, key);


safe_ini_write_real("player", "gold", global.gold);


safe_ini_close();
and to read my sate back I use:

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();
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
 
Okay, that doesn't help at all. what do you recommend then?
Stop worrying about players cheating, they're only ruining their own experience.

If your game is multiplayer and would cause other people's experiences to be ruined by a cheater, store gold in a server so they cannot change it without your permission.
 
Top