I want to generate a string-code for the user that represents his progress in the game (so he can load this state somewhere else). I don't want him to be able to guess the system and thus load a state which he hasn't yet achieved.
The following variables are involved:
- A number X between 1-30 representing the highest level he unlocked.
- For each level lower than X a boolean representing whether he made the level on hard or not.
- For each secret object he could have found (also roughly 30) another boolean.
My idea was to just build a binary number from all these but that's just way too easy for the user to hack. If he beats level 1 and then saves, he will see his code being something like 0x1, while having bet level 10 will be something like 0x200.