A game usually has complementary files, like the save file, settings file, etc. These are usually put in a folder the user controls. However, the user can cheat the game my editing the game files, such as editing how much money he/she has, or what level he/she currently is. Is there is a way to fully prevent that?
How to prevent the player from messing with the game files?
- Edited
You can use encryption.
It's not bullet-proof, since the game needs to have the password somewhere for decryption, but it makes it harder. (kuligs2's first video below discusses that in more detail.)
https://docs.godotengine.org/en/4.4/classes/class_configfile.html#class-configfile-method-save-encrypted-pass
https://docs.godotengine.org/en/4.4/classes/class_fileaccess.html#class-fileaccess-method-open-encrypted-with-pass
and here he looks at second method using resources
Is it a single player game? If, I wouldn't even bother. Let them cheat if it makes them feel happy. Why spend time on something that will not make the game better for those who play by the rules?
axolotl it's a multiplayer game.
UpsetChicken p2p or server based?
Ok if it’s multiplayer then the solution is probably to keep whatever state you don't want them messing with on the server side. Or just replicated on the other peers, depending on how exactly your game works.