如何prevent基于时间的骗子以时间为基础的模拟游戏? [英] How to prevent time-based cheats on a time-based simulation game?

查看:170
本文介绍了如何prevent基于时间的骗子以时间为基础的模拟游戏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone游戏微型塔,我猜它使用了某种形式的模拟基于上次播放和当前时间之间花费的时间,因为你可以设置当前时间向前,你会得到的好处从假经历的时间跨度。

In the iphone game "Tiny Tower", I'm guessing it uses some kind of simulation based on the time spent between the last play and the current time, because you can set the current time forward and you will get the benefit from the fake elapsed time span.

有一个算法,我可以使用prevent这样的事情? (或者至少使其难以足够一般用户的决绝!)

Is there an algorithm that I can use to prevent this sort of thing? (Or at least make it difficult enough for the average user to pull off!)

编辑:谢谢,我的理解是,尽管我的措辞,也没有办法给你存储在客户端prevent的事情,但我想让它至少难度要比修改时间来破解它!

thanks, I understand that, despite my wording, there's no way to prevent things you store on the client side, but I want to make it at least more difficult than "changing the time" to hack it!

推荐答案

GameCube游戏机有办法做到这一点所以它必须是可能的。

The gamecube had a way to do this so it must be possible.

有一个事件触发时iphone时间设置?在这种情况下,你可以反应这一点。

Is there an event triggered when the iphone time is set ? In that case you can react that.

另一种解决方案是要求是在线游戏时启动,这样你就可以检查时间在远程服务器上

Another solution is to require to be online when the game is launched, this way you can check time on a remote server.

您可以具有良好的检查,如果你有在电话注册的事件或唤醒反应,因此,大大节省了时间在那一刻在你的数据库。你将不得不在最后一个非修改时间。

You could has well check if you got an event on the phone login or wake up react to it, saving the time at that moment in your DB. You would have the last non modified time.

最后一个可能的诀窍是为检查您知道是怎么回事的文件之前要时间的变化(如登录)修改按一个动作,并选中最后一次修改日期。

A last possible trick is to check for a file you know is going to be modified by an action prior to time change (such as login), and check the 'last modification' date.

您可以调查在GPS方向作为良好。的GPS需要与卫星它接触被同步,所以它必须跟踪时间以某种方式,也许有一个API为该

You can investigate in the GPS direction as well. A GPS need to be synchronised with the satellite it contact, so it must keep track of time in some way, and maybe there is an API for that.

不幸的是,你是在iPhone,这意味着由于应用了很少的权利你的可能性是有限的,在沙盒。

Unfortunatly you are on an iphone, which mean your possibilities are limited since applications got very few rights and are sandboxed.

编辑:

只是虽然这件事,但是,你能创建事件在iPhone日历?并检查是否已trigered?因为你可以设置一个假的会议或某事的每一天。不干净,而是创意。

Just though about it but, can you create event in the iphone calendar ? And check if it has been trigered ? Cause you could set a fake meeting or something for every day. Not clean, but creative.

编辑2:您可以设置一个计时器为$ C $下IOS到在60分钟内执行?如果可以,设置定时器的值,通过预计当这code运行,那么当code运行,比较并告知你的程序的时间。

EDIT 2: can you set a timer as a code for IOS to execute in 60 minutes ? If you can, set this timer, pass the time expected to be when this code run, then when the code run, compare and inform your program.

这篇关于如何prevent基于时间的骗子以时间为基础的模拟游戏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆