安全多人游戏开发中的 Comet/JS/PHP/HTML5 与 Flash

发布于 2024-12-02 10:04:47 字数 363 浏览 0 评论 0原文

我想创建一个多人在线游戏(井字游戏/国际象棋),但我不确定使用哪种语言。

我熟悉 JS/PHP 并听说过 comet

彗星有机会对抗吗Flash,如果是的话,除了缺乏像 Flash 这样的流畅动画之外,还有什么限制?

所需资源和内存有何区别?

安全: 是否可以创建 Flash 游戏而无需修改 (flash-)cookie 等......以进行作弊?

我知道很多问题,我确实希望您能提出正确方向的建议。

谢谢4您的时间

I would like to create a multiplayer online game (tic-tac-toe/chess) and i am not sure which language to use.

I am familiar with JS/PHP and heard about comet

Does comet stand a chance against Flash, if yes whats the limitations except the lack of smooth animations like flash allows?

What are the differences regarding resources and memory needed?

SECURITY:
Is it possible to create Flash-games without any chance to modify (flash-)cookies etc... for cheating?

i know lot of questions, i do hope for your recommendations into the reight direction.

Thanks 4 your time

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我偏爱纯白色 2024-12-09 10:04:47

值得一看 使用 HTML5 进行多人游戏:我们准备好了吗? 作者:Mozilla 的 Rob Hawkes。他介绍了 HTML5 游戏技术,并讨论了使用 JavaScript 的安全问题以及这些问题的当前解决方案。

破解 JavaScript 比破解 Flash 更容易。但如果用户足够努力的话,两者都是可以破解的。目前的解决方案是不要让用户在客户端上做对游戏影响太大的事情。服务器仍然需要最终控制并验证任何移动。罗布在视频中讨论了这一点。

我会选择 WebSocket 而不是 Comet,因为它们提供更低的延迟和更快的通信。它们也是我们在网络上进行实时通信的第一个真正的标准。非常令人兴奋!

您可以使用 Flash 作为 Comet 或 WebSockets 的前端技术。我工作的 Pusher 有一个 ActionScript 库,这意味着您可以使用我们的实时 WebSockets 平台为你打造游戏。其他技术也将提供不同语言的类似库。

对于像井字游戏这样简单的事情,我绝对肯定不会有内存或资源问题需要考虑。

It's worth watching Multiplayer Gaming with HTML5: Are We Ready? by Rob Hawkes of Mozilla. He covers HTML5 gaming technologies and discusses the security concerns with using JavaScript and the current solutions to these problems.

It's easier to hack JavaScript than it is Flash. But both are hackable if the user tries hard enough. The solution for the moment is don't let users do things on the client that can influence the game too much. The server still needs to ultimately be in control and validate any move. Rob discusses this in the video.

I would go with WebSockets rather than Comet as they offer lower latency and faster communication. They are also the first true standard we've got for realtime communication on the Web. Very exciting!

You can use Flash as your front-end technology with Comet or WebSockets. Pusher, who I work for, has an ActionScript library which means you can use our realtime WebSockets platform to build you game. Other technologies will also offer similar libraries in different languages.

For something as simple as tic-tac-toe I'm absolutely positive there will be no memory or resource problems to consider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文