Skip to content Skip to sidebar Skip to footer

Changing Time On Device => Cheating In The Game

In some games people can cheat by changing the time. For example: when they have to wait 30 minutes before a building is built. Can i prevent this, assuming that the devices have c

Solution 1:

Store the time they have to wait to on the server (tell the server they perform a task, server will log that time and when they can do it again) and make the client check if the server thinks it can in fact perform the action. Anytime you store something on the client it is likely that there will be a way around it.

Solution 2:

Your best bet would be to use SystemClock.elapsedRealtime() as an assistant to an infrequent server side timecheck.

return the time since the system was booted, and include deep sleep. This clock is guaranteed to be monotonic, and continues to tick even when the CPU is in power saving modes, so is the recommend basis for general purpose interval timing.

After verifying the time from your server, you can do local checks against SystemClock.elapsedRealtime until the next boot up.

Post a Comment for "Changing Time On Device => Cheating In The Game"