- Home /
Question is off-topic or not relevant
Obscuring Data - General Tips & Suggestions?
I'm working on a standalone game and was wondering what the pros have to say about obscuring important data to prevent easy fiddling. I'm currently storing most of my data via SQL but have been considering using PlayerPrefs for some data that may not be changed/sent very often to avoid excessive SQL queries.
I'm aware that client side calculations can easily be compromised with de-compilers and such since one can virtually see your code. Additionally I am aware that the PlayerPrefs file can be accessed and changed. And of course, I'm aware of hex editing.
In general I was thinking I could create a hash using user specific data + a random integer and check against it. But I'm not sure how far that'll get me.
Additionally was was thinking I could develop a kind of CRC. What I had in mind was something like this:
We have a some data fields: Level, Atk, Def.
Level is used as the common multiplier for Atk & Def. So Level x SomeAmbiguousNumber should equal Atk. So if one tries to edit Atk, when the CRC hits, it'll be obvious the calculation is incorrect and will revert back to the original value. It would also work the other way around. If they try to edit Level, it'll be obvious that the other vars, Atk & Def, do not correspond to the sum of the calculation.
This is just an idea I had. Not sure if there is an easy, effective, or built in way to do this but I'm shooting for it. Let me know what your thoughts are. Would like to know if something similar has been done or if there are more effective methods out there.
Thanks in advance.
This should be posted on the forums, since it's a discussion question, not really appropriate for UnityAnswers.
Understood. Sorry about that. Discussion link: http://forum.unity3d.com/threads/130763-Obscuring-Data-General-Tips-amp-$$anonymous$$gestions-Anyone