防止Javascript游戏作弊 [英] Prevent Cheating on Javascript Game

查看:100
本文介绍了防止Javascript游戏作弊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用JavaScript / JQuery开发游戏。这是一个简单的破砖机类型的游戏保持得分,水平等。我正计划实施一个用户可以提交最终得分的排行榜。我看到的唯一问题是用户在大多数浏览器上使用开发人员工具操纵乐谱。我知道保留服务器端将解决大多数这些问题,但是如果用户数量很大,它会在请求时严重打击我的服务器。 Cookies - 轻松改变客户端。老实说,我不赞成推广公平游戏的合乎逻辑的想法,因为总有人试图欺骗/成为排行榜的榜首。有了这样说,什么是一种有效且有效的方法来跟踪用户的分数而不让他们更改它?

I'm currently developing a game using JavaScript/JQuery. It's a simple brick breaker type of game keeping score, levels etc. I'm planning on implementing a leader board that users can submit their final score to. The only problem I see with this is users manipulating the score using developer tools on most browsers. I understand that keeping things server side will resolve most of these issues, however if there is a high volume of users, it will hit my server hard with requests. Cookies - Easily changed client side. I'm honestly out of logical ideas to promote fair game play because there is ALWAYS people who seek to cheat/become top of the leader board. With that said, what's an efficient and effective way to keep track of the user's score without giving them access to changing it?

推荐答案

通过创建一个只能在服务器端计算的公式来模糊他们的分数。

obfuscate their score by creating an equation that can only be calcuated on the server side.

编辑:RobG是正确的,因为它需要在客户端计算。

RobG is correct in that it will need to be calculated on the client side.

我在Chrome上推出了愤怒的小鸟游戏:

I hacked the Angry Birds game when it launched on chrome:

http://wesbos.com/all-levels-html5-angry-birds/

然而,他们已经对代码进行了混淆,以至于无法弄清楚哪个函数计算出哈希..

However, they have since obfuscate the code so much that its impossible to figure out which function calculated hash..

这篇关于防止Javascript游戏作弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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