Reputation: 61
In my game I am using device time for timers and I want to prevent bots and cheats such as changing game time during No Wifi or offline gameplay. How can I achieve this?
Upvotes: 1
Views: 558
Reputation: 9021
Depends really. If putting the time BACK is the issue, then you could store a 'latest time' and check the current time is greater than it. Just keep the stored time up to date during online play and check when offline.
If putting the time FORWARD is the issue then you could just store a counter somewhere from the start of the game, instead of using the realtime clock.
Upvotes: 1