HTML5/WebGL 上 MMO 3D 游戏的可行性

发布于 2024-10-29 05:03:01 字数 1432 浏览 8 评论 0原文

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

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

发布评论

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

评论(6

望她远 2024-11-05 05:03:01

这可能太开放了,但我会尝试一下。

首先,据我所知,没有任何建模程序可以输出您所期望的内容,因为您需要输出 javascript。

有些浏览器会使用硬件来加速图形,但这并不能保证,而且您只能获得一点 cpu,与其他选项卡共享,因此可能不会像您希望的那样流畅。

如果您必须下载大量数据才能运行您的程序,这对用户来说将是一个问题。

我认为建模程序是真正的挑战,因为你基本上必须手动完成所有事情,而且它不会很顺利这一事实将是一个问题,除非你为此进行设计。

但是,对于某些游戏设计来说,WebGL 应该是一个绝佳的选择。

This may be too open-ended, but I will take a stab.

First, there is no modeling programs that will output what you expect, as far as I know, since you will need javascript outputted.

Some browsers will use the hardware to accelerate the graphics, but that isn't a guarantee, and your only getting a bit of the cpu, sharing with the other tabs, so it may not be as smooth as you like.

If you have to download a large amount of data to run your program that will be a problem for the user.

I think the modeling program is the real challenge though, as you will have to basically do everything by hand, and the fact that it won't be very smooth will be an issue, unless you design for this.

But, for some game designs WebGL should be a fantastic choice.

场罚期间 2024-11-05 05:03:01

事实上这是完全有可能的,我们会看到这样的游戏。

我们可以期待像 O3D 这样的库能够解决浏览器的问题。我们已经在桌面平台上遇到了这些问题,并且库负责处理多平台可移植性。

浏览器缓存可能是一个小问题,但不是一个大问题。可以给游戏分配更多的缓存,而且我们还有像squid这样的代理服务器,可以缓存非常大的资源。如果 LAN 上的一组玩家共享一个代理服务器,如果游戏设计良好(即资源不能有多个生成的名称,但可以为所有玩家提供一个公共 URL),他们也将共享大型资源对象

。关于为 Web 应用程序添加本地存储可能性的讨论。
“做好被黑客攻击的准备”并不是市长的问题。没有什么可以阻止黑客操纵 Flash 或 C++ 应用程序,反作弊工具已经变得毫无用处。暴雪已经开始依赖于发现“类似机器人的行为”,而不是尝试更多的反黑客措施。

然而,我并不认为WoW将是第一个基于Flash的游戏。事实上,它将是 Quake (http://playwebgl.com/games/quake-2-webgl/),因为已经有一个用于 WebGL 的 Quake 端口...将会有使用 WebGL 的网页游戏,但是不要指望暴雪会在不久的将来支持它。

IE 是唯一不支持 WebGL 的浏览器,说实话这并不重要。所有其他浏览器都是如此,用户不会介意运行 Chrome 或 Firefox。或者同时运行两者并选择对他们的游戏来说速度更快的一个。

谁关心像 IE 和 Opera 这样的边缘化浏览器。它们同样不重要。除非您算上 IE6,否则它永远不会支持我们正在讨论的任何内容,因为它已停产且不受支持。

In fact it is fully possible, and we will se such games.

We can expect libraries like O3D to take care of the browser quirks. We already have these problems on desktop platforms and libraries takes care of multi-platform portability there.

Browser cache can be a slight problem, but not a big one. It is possible to assign more cache to games, and we also have proxy servers like squid that can cache very large resources. If a group of players on a LAN share a proxy server they will also share large resource objects, if the game are well designed (ie the resource cannot have multiple generated names, but be have a common URL for all players.)

Also there are discussions about adding local storage possibilities for web applications.
And "ready to be hacked" is not a mayor issue. There are nothing to stop hackers from manipulating Flash or C++ applications, anti-cheating tools are already rendered useless. Blizzard is already relying on spotting "bot-like behavour" rather then try more anti-hacking measures.

However, I do not think that WoW will be the first flash-based games. In fact it will be Quake (http://playwebgl.com/games/quake-2-webgl/) as there is already a Quake-port for WebGL... There will be web games that makes use of WebGL, but do not count on Blizzard supporting it in the near future.

IE is the only browser that does not support WebGL and to be honest that does not matter. All other browsers do, and users will not mind running Chrome or Firefox. Or running both and choose the one that is faster for their game.

Who cares of marginalized browsers like IE and Opera. They are equally unimportant. Unless you count IE6 which will never support any of the stuff we are discussing, as it is discontinued and unsupported.

小矜持 2024-11-05 05:03:01

我不认为您的游戏必须超越Heigtaps上的一些立方体。

  • JS中的大量编码乘以浏览器怪癖。 (是的,我知道jQuery,但不是灵丹妙药)
  • 大量资源悬挂在浏览器cache的小线程上,
  • 即将被砍作的客户代码暴露于诸如Firebug这样的许多浏览器工具上,例如Firebug

此类游戏在Flash上​​更为现实,尤其是使用硬件3D的即将发行的11个版本的播放器。

I don't believe it's possible if your game must go beyond some cubes on heigtmaps.

  • Large amounts of coding in JS multiplied by browsers quirks. (Yes, I'm aware of JQuery, but it's not panacea)
  • Large resources hanging on tiny thread of browser cache
  • Ready-to-be-hacked client code exposed to a lot of browser tools like Firebug

Such game is much more realistic on Flash, especially with upcoming 11 version of player with hardware 3D.

软糯酥胸 2024-11-05 05:03:01

要缓存本地文件,您应该查看 Chrome 中现有的文件系统 API。这使您能够以编程方式访问虚拟文件系统,从而控制本地存储的资源。

应用程序缓存可以帮助您获取游戏所需的静态资源,例如 HTML、CSS 和 JavaScript。但是,您需要作为“已安装的网络应用程序”运行(例如通过 Chrome Web Store)才能获得无限存储空间。浏览器正在构建配额管理系统来帮助简化这一过程。

WebGL 很棒,而且不断出现的库可以帮助简化这一过程。没有明确的“赢家”,但有很多选择。

由于 CrankShaft 等改进,如今 JavaScript 已经相当快了。为了获得更好的性能,您可以使用 Native Client 运行 C/C++ 代码并将消息来回发送到 JavaScript。

我可以看到两个大问题。一是帮助中间件公司将他们的工作移植到 JavaScript 或 Native Client。第二个是提高我们将数据从 JavaScript 转移到 WebGL 的速度。

For caching local files, you should look into the File System APIs that are now in Chrome. This gives you programmatic access to a virtual file system, letting you control what resources you store locally.

The Application Cache can help you with static resources like the HTML, CSS, and JavaScript required for the game. However, you need to run as an "installed web app" (via the Chrome Web Store, for example) to get unlimited storage. Browsers are building quota management systems to help make this easier.

WebGL is great, and the libraries are emerging to help make it easier. There's no clear "winner" but lots of options.

JavaScript is pretty fast these days, thanks to improvements like CrankShaft. For even better performance, you can use Native Client to run your C/C++ code and post messages back and forth to JavaScript.

There are two big issues that I can see. One is helping the middleware companies port their work to JavaScript or Native Client. The second is improving the speed with which we can move data from JavaScript into WebGL.

七颜 2024-11-05 05:03:01

Runescape 多年来最受欢迎的浏览器游戏之一正在使用 WebGL 重写其引擎......(他们目前使用 Java 小程序)

Runescape one of the most played browser games for many years is rewriting their engine in with WebGL... (They currently use Java applets)

余生再见 2024-11-05 05:03:01

“如果你能找到一种方法来最大限度地降低运输大量(可能是数十亿)资源的成本”
实际上,http 已经具有传输静态资源的最小成本。凭借其本机资源分配方案 URL,它具有终极的缓存能力。浏览器不仅知道如何通过 URL 缓存静态资源,而且还存在可以处理 TB 数据的快速高效的代理服务器。

其主要秘密是 HTTP HEAD 请求集,代理服务器的浏览器可以有效地检查它是否具有最新版本的资源并重新同步它。还可以通过 HTTP 标头将资源标记为永恒或非常长寿(不可变)。重新同步将是不可能的,而是通过使用新名称创建新资源来完成更新。

有一种误解认为 HTTP 作为资源传输系统在某种程度上效率低下,而事实上它被设计为非常高效。

众所周知,与基于 HTTP 的客户端相比,WoW 和其他使用专有协议的客户端效率低下。这些客户端无法使用代理服务器加速。 Windows 更新、Apt 和 Yum 都有一个共同点,即它们都使用 HTTP 更新操作系统资源,并且能够利用 Akamai 庞大的全球代理服务器网络以及其他类似资源,以便高效地传输每 GB 规模的 URL 资源。客户。

"If you can find a way to minimize the cost of transporting massive amounts (possibly gigs) of resources"
Actually http already has the minimal cost of transporting gigs of static resources. With its native resource allocation scheme, the URL, it has the ultimate caching abilities. Not only does browsers know how to cache static resources by URL, but fast and efficient proxy servers exists that can handle terrabyte of data.

The main secret to this is the HTTP HEAD requeset, where the browser of proxy server efficiently can check if it has the latest version of the resource and re-syncronize it. Also it is possible trough HTTP headers to mark a resource as eternal or very long-living (immutable). re-syncronization will then be impossible, instead updates will be done by creating a new resource with a new name.

There is a myth that HTTP is somehow inefficient as a resource transport system, when in fact it have been designed to be very efficient.

WoW and other clients that use proprietary protocol are notoriously inefficient compared to HTTP-based clients. These client cannot be accelerated using proxy servers. Windows update, Apt and Yum all have in common that they update OS resources with HTTP and have been able to leverage Akamai:s vast global networks of proxy servers among other similar resources in order to efficiently transfer URL resources in the scale of many gigabytes per client.

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