Dinesh619
Dinesh619

Reputation: 61

How to fix a cheat by changing device time in Offline gameplay?

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

Answers (1)

Simon
Simon

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

Related Questions