System time and cheating

In my game, there’s a resource that’s handed out every so often. If the user closed the application, turned off his phone - I need to hand that resource out according to the time the application hasn’t been running.

Is there anything I can do to prevent users from closing my application, changing the system time, then opening my application, without forcing users to have an internet connection at start time?

(I’m asking this, because the semantics of the various time functions in the API aren’t 100% clear on this particular matter) [import]uid: 8145 topic_id: 3132 reply_id: 303132[/import]

Hi Wizem,
You are trying to create an offline Farmville? For those types of apps, the servers run most of the code and handle the time, etc. In your case you want to have your machine do the same. One way would be to hand out the resources only while the app is running, so if the app is non active, the resources cease to be handed out. It would be the same as active gaming, but if you want to have real-time passive gaming, like Zynga, ngmoco, etc and ensure that there is no tampering with the devices like system date, time, etc; have a server handle all of that.

No amount of API’s can resolve your issue. The only one way to prevent cheating is to save the data on the device and the “last time” do this for a couple of turns, that way if the user changes to a future date, gets zillions of resources and then changes back to present, you can penalise the user for cheating. You can also have a prompt in at the start asking them if the current date and time is correct, once they confirm that, save it, so if the user sets the date to 1 year from hence and the resources generated are in excess of 365 * resources_per_day you can display a prompt stating that since you haven’t used the app for xx days, the app has put you on hold and shall resume from now on.

Anti-cheat methods have nothing to do with Corona, you will have to come up with one that fits what you are after.

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 3132 reply_id: 9169[/import]

I was hoping the iPhone had some kind of time mechanism that was independent of user settings; not thinking that there’s a logical way to bypass this situation - obviously it needs some clever hardware solution, or a clever way to track changes to user settings.

I’m not so much creating an “offline Farmville”, as I wanted to let my users use the app offline with as little difference as possible from the online mode. I’m already tracking changes from the server; what I was hoping for is that this obvious cheat alone would not force me to disable purely-offline mode for when my users don’t have access to the internet.

If there’s no way to track a user-settings-independent time, I guess I’ll need to force my users to turn the app on only when they’re online. [import]uid: 8145 topic_id: 3132 reply_id: 9175[/import]