5

I'm currently playing around with NSNotification (or local notifications in general terms) for a product management game which relies heavily upon the user's NSDate/Time and then use local notifications to give an alert for when a product is ready.

However, in my experiments with similar games one can beat this system by simply moving the system clock forward and thus speed up the game.

I've noticed some games have stopped this, but I think thy did it by having an internal clock which syncs with an online clock and never uses the iPhone's clock, but this is just a guess as obviousily such a system doesn't work if you have no internet access.

Anyway, and am hopeful someone who has gone down this road can clarify;

  • Whether local notifications (or push notifications) are mature enough by themselves for games that rely on a users NSDate/Time?

  • How to prevent users/cheaters beating NSNotification/NSDates for games?

Is there an article or framework, or something that can explain the best methodologies on this subject?

I found Similar question for Virtual Pet Games, but I am still interested in other suggestions.

4

1 回答 1

5

本地通知将依赖于准确设置用户的时钟。您可以在提供任何奖励之前将用户的时钟与服务器时间进行比较。如果用户的时钟关闭超过几分钟,您可以提醒用户并且在修复之前不允许奖励。

于 2011-09-01T19:41:36.190 回答