So earlier I came up with an idea for saving high scores in my game. With my previous game, the high scores, data, etc. would be saved directly into a text file, making it far too accessible. I had a ton of problems with cheaters modifying the high scores within the file. My idea for this next game is to encode the high score and data into something that only the game would know how to decode. So it’s like this: Imagine the high score is..3,000.
Highscore = 3000 // unencoded
Highscore = ((3000 - 20) * 1.65) + 829 // encoded to 5,746
So you see the “Highscore” is mathematically encoded/decoded and only the game knows the values to decode it. The value of the highscore encoded = 5746. This is not the actual value of the score but the game can figure it out by doing the encode math in reverse.
Highscore = ((5746 - 829) / 1.65) + 20 // decoded back to 3,000
As long as you do not know the mathematical values used to encode/decode the highscore, I think it’s almost impossible to hack the game highscore.
Just my idea ;D let me know what you think.