使用 Opera Unite 构建实时游戏的游戏服务器

发布于 10-31 11:50 字数 590 浏览 3 评论 0原文

我想寻求帮助来构建 Opera Unite 应用程序作为 1 对 1 RTS 游戏的游戏服务器。 (或其他类型的实时游戏)

描述: 该游戏通过 JavaScript 在客户端执行,并连接到 Unite 服务器进行网络游戏。

用户无需安装 Unite,即可在标准浏览器上玩游戏。 Unite 服务器与 2 个玩家保持连接,并在 1 对 1 游戏中同步他们的游戏状态。

它并不是要成为一个支持数千名玩家的大型服务器。它是为了让人们能够以最少的配置组建一个即时的、小型的游戏派对,Opera Unite 非常适合。在这种情况下,服务器和客户端位于同一局域网中,数据传输速率对于游戏来说应该足够快。希望它也能在更广泛的网络中发挥作用。

Unite 应用程序应该:

允许用户登录房间并建立与服务器的连接。当两个用户登录到一个房间时,就可以开始游戏。该连接以 12fps 的高速率在服务器和客户端之间发送和接收数据。该数据是一个大约 200 个字符长的字符串。

您能概述一下这样一个服务器的程序流程吗?即收到请求时应该做什么。如何建立 P2P 连接。如何确保连接处于“同步模式”,即旧数据比新数据更早到达。

我将不胜感激任何帮助。

I want to ask for help in building an Opera Unite application as the game server for a 1 on 1 RTS game. (or other type of game which is real time)

descriptions:
The game is executed on client side by javascript, and connects to an Unite server for network play.

Users can play the game, without installing Unite, on a standard browser. The Unite server stays connected with the 2 players and synchronizes their game states in 1 on 1 gaming.

It is not intended to be a big server supporting thousands of players. It is to allow people to set up an instant, tiny game party with minimal configuration which Opera Unite fits very well. In this case the server and client are in the same local area network which the data transfer rate should be fast enough for gaming. Hope it also works in a wider network.

The Unite application should:

allows users to login into a room and set up a connection with the server. When two users logged into a room the game can then be started. The connection sends and receives data between server and client at a high rate of 12fps. The data is a string for maybe 200 characters long.

Can you outline the program flow of such a server? i.e. What should be done when receiving request. How to set up a P2P connection. How to ensure the connection is in "synchronization mode", that older data arrives earlier than newer data.

I will be grateful for any help.

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

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

发布评论

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

评论(1

心是晴朗的。2024-11-07 11:50:06

您检查过 Opera Unite 部分中的其他游戏吗?您可以通过解压并找到来打开它们了解它们是如何构建的。

Did you check the other games in Opera Unite section You can open them by unzipping and finding out how they have been built.

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