防止在线街机高分牌的作弊 [英] Preventing cheating for on-line arcade high score board

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

问题描述

我将开发一个用于在即将发布的IDE中编写的HTML5 / Javascript游戏的在线游戏。

I'm going to be developing an online arcade for HTML5/Javascript games written in a to-be-released IDE.

该游戏将使用Ajax请求当人们玩这些游戏时服务器记录分数。

The game will use Ajax requests to the server to record scores when people play these games.

理论上我完全控制了这个设计,包括记录高分的代码的机制,游戏代码,一切。

I theoretically have complete control over the design of this, including the mechanics of the code that logs the high scores, game code, everything.

我知道破解客户端游戏这样或欺骗高分并不是不可能的,但我想让它变得足够困难以至于任何人都有足够的能力不要打扰它(一厢情愿)。

I know it's never impossible to hack client side games such as this or spoof high scores, but I want to make it difficult enough so that anyone competent enough wont be bothered enough to do it (wishful thinking).

我读过:

如何防止伪造出现在全球高分榜上的高分?

这是一个略有的不同问题,因为这是HTML / JS特定的。

Which is a slightly different question as this is HTML/JS specific.

我最初的想法是,ajax请求检查请求的来源是否来自正确的位置,这对于大多数黑客攻击都是一个简单而有效的阻止。

My initial idea is that the ajax request checks the source of the request is from the correct location, which is a simple and effective block for most hacking attempts.

推荐答案

正如之前的回答所说,你不能相信客户,因此你最好的选择是将游戏分成几个级别分类并使服务器控制级别进展。如果服务器正在跟踪每个客户及其进展,则可能会限制可实现的分数范围。这使得欺骗更加繁琐,因为客户必须模拟通过每个级别并在正确的分数范围内表明成就。

As the previous answer stated you cannot trust the client, therefore your best bet is to split a game up into levels of some sort and have the server control level progression. If the server is tracking each client and their progression it can limit the range of scores achievable. This makes it more tedious to cheat as the client has to simulate going through each level and indicate achievement within the correct score range.

这篇关于防止在线街机高分牌的作弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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