在设备上更改时间=>在游戏中作弊 [英] Changing time on device => cheating in the game
问题描述
在某些游戏中,人们可以通过改变时间来作弊.例如:当他们必须等待30分钟才能建造建筑物时. 假设设备已与服务器建立连接,我是否可以防止这种情况发生? 我正在使用libGDX库在Java中进行编程. 在iOS和Android上都可以使用的解决方案吗?
In some games people can cheat by changing the time. For example: when they have to wait 30 minutes before a building is built. Can i prevent this, assuming that the devices have connection with my server? I am programming in java using the libGDX library. Any solutions that work both on IOS and Android?
推荐答案
在服务器上存储他们必须等待的时间(告诉服务器他们正在执行任务,服务器将记录该时间以及何时可以再次执行该操作)并让客户端检查服务器是否认为它实际上可以执行该操作.每当您在客户端上存储某些内容时,都有可能解决它.
Store the time they have to wait to on the server (tell the server they perform a task, server will log that time and when they can do it again) and make the client check if the server thinks it can in fact perform the action. Anytime you store something on the client it is likely that there will be a way around it.
这篇关于在设备上更改时间=>在游戏中作弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!