How to keep essential Data and Values safe in program and prevent them from cheating?
Hello guys. Thx 4 your time. For example consider we have an offline Game that has one essential value, named "Gold". Generally, we can use Gold to buy some items in our game and if user wants, he/she can buy some Golds from shop to make game process faster. As you know it's not hard to change program values (specially offline ones) with some cheat tools by accessing to variables memory address and some privileges or etc. Now, the questions are: How to keep safe our Gold parameter? (And other essential data.) Does Data encapsulation and defining some Access Controls with Accessors help us and enough to restrict & prevent them from unwanted changes? Or encapsulation is just for slicing code and makes it easier to write code & prevents us from confusing variable names & etc? Is there any Technique to take care of it? Can we bring 100% security? (I don't think so) What about online games? Thank you guys. I'll be appreciated. If you'd Like Share your ideas, Experience and Solutions.