How can I write data to a file that users can't easily edit?
Posted
by
ThePlan
on Game Development
See other posts from Game Development
or by ThePlan
Published on 2012-10-13T18:04:21Z
Indexed on
2012/10/13
21:53 UTC
Read the original article
Hit count: 235
While working on game saving and loading I figured I could just write all the variable values to a file and then load that file from it's default location anytime.
However from the very beginning it sounded like an odd job. I know about serialization and boost, but that seems so complicated, I figured I'd keep it simple, but I've ran across this huge issue: No matter what file I can write with C++, the user can get their hands on it, they can edit their position, they can remove a boss, or add new weapons for themselves.
My question here is: How can I create a file in C++ which cannot be editted or openned with a text editor such as Notepad (I'm not trying to make a file which is impossible to open, but a file which will give the user a headache if he tries to edit it through usual methods.)
© Game Development or respective owner