Hi! I am working on a game, where player has energy, which restores with time. I could use DateTime.Now, but user can easily change datetime on device, so time system must be protected from it (looking for free solutions). Thanks in advance for any help!
Yep. Totally expected, fully understood.
If youâre concerned about the user âhacking your save files,â or âcheating in your game,â which is playing on their computer, just donât be.
Thereâs nothing you can do about it. Nothing is secure, it is not your computer, it is the userâs computer.
If it must be secure from tampering, store it on your own server and have the user connect to download it. Remember they can still change it after they download it and before your program uses it.
If it must have secure user authentication, use Apple login or Google login. Nothing else is worth it.
Anything else is a waste of your time and the only person youâre going to inconvenience is yourself when youâre debugging the game and you have savegame errors. Work on your game instead.
Remember, it only takes one 12-year-old in Finland to write a script to read/write your game files and everybody else can now use that script. Read about Cheat Engine to see more ways you cannot possibly control this.
NOTE: if you begin your response with âSo youâre saying thatâŚâ, then you havenât read the above. Go back and read it carefully or you are going to waste a lot of your own development time for nothing.
Iâm just building on what Kurt mentioned and reinforcing his point. When it comes to client-side games, I do a lot of anti-cheat testing and reverse engineering for testing purposes, even on games with large budgets and big teams. Many of those games can be cheated with relatively little effort and time.
If youâre serious about preventing cheating, server-side time tracking would be your best approach. In fact, even newer AAA games are experimenting with advanced methods, such as blockchain data validation, to secure their values.