- Home /
How to not let player fiddle with time to get rewards faster?
Hello everyone, today I was looking for a way to implement timed rewards, and found there are two ways: one that is really easy to manipulate (just change the device time) and another that relies on a server to fetch the actual time, which is way better. The catch is, it needs an internet connection or it won't work. How do I prevent the player from manipulating the rewards, in a way that is more secure, or maybe that doesn't require an internet connection? Any input is appreciated.
Other than using a server, maybe make changing the time pointless by saving the date & time when they last played and if the date/time is less than the previous playthrough, award them with negative rewards, punish them or display a popup stating that the save is in the future and they have to wait until realtime catches up. That way, if they move their clock forward, what they get is undone when they move it back.
I like that idea! But what if they move the clock forward to get the reward earlier ins$$anonymous$$d of moving the clock backwards?
It wouldn't matter if you put them in time out and they cannot continue until they get to the realtime they would have got the reward anyway.
Answer by Kishotta · Oct 02, 2019 at 04:44 PM
Always, always, always assume that the client is either wrong, faulty, or malicious.
If these rewards are used in a multiplayer game (and therefor an internet connection is expected), use only the server time. If my device thinks it is 300 years in the future or past, it shouldn't be any business of the server. Just record my login times as they exist on the server.
If these rewards are used in a singleplayer game (and therefor no internet connection is expected), then who cares? The player is spoiling his own fun, and nobody else's.
Personally, in 2019, I think it is reasonable to assume that any player that was able to download your game from an app store also has the ability to be online while playing in order to take advantage of timed rewards, leaderboards, etc.
If you really don't want to go this route and you want to make it more difficult for your players to modify their gamestate manually, you should at least obfuscate your save formats so that system time modifications are the easiest way to "game" your game.
Thank you, @$$anonymous$$ishotta . I agree with everything you said.
Answer by OlivierHoel · Oct 02, 2019 at 04:53 AM
What about a basic Timer class containing a simple unsigned int, and accumulating Time.deltaTime each frame?
Your answer
Follow this Question
Related Questions
Multiply deltaTime to arrive at point2 in 1.5 sec ? 1 Answer
javascript System time and date? 3 Answers
Camera following Bullet 1 Answer
reloadtime 1 Answer
Collision Detection Issues 0 Answers