用于 JavaScript 的 2D 引擎 [英] 2D engines for JavaScript

查看:30
本文介绍了用于 JavaScript 的 2D 引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 HTML5 画布在 JavaScript 中构建基于图块的游戏.有许多引擎可供选择,例如

I'm attempting to build a tile-based game in JavaScript, using HTML5 canvas. There are many engines to choose from, such as

...而且这个列表还在继续.

... and the list goes on and on.

然而,在所有这些不同的实现中似乎没有一个事实上的标准.本质上,我正在寻找 JavaScript 游戏引擎的 jQuery.由(更大的)社区支持,拥有出色的文档并得到积极维护.其中大部分对我来说似乎只是一个人的项目.

However, there does not seem to be one de facto standard among all these different implementations. Essentially I am looking for the jQuery of JavaScript game engines. One that is backed by a (larger) community, has excellent documentation and is actively maintained. Most of these just seem like one-man projects to me.

JavaScript 中 2D 游戏引擎的实际标准是什么?

What is the de facto standard for 2D game engines in JavaScript?

此外,我对实际实现的经验非常感兴趣(除了演示 Pong吃豆人 游戏).

Additionally, I would be very interested in experiences with actual implementations (other than demo Pong and Pac-Man games).

推荐答案

现在没有,我会继续说可能永远不会有,就像有是 jQuery,因为一个简单的事实是,大多数(商业)游戏都希望获得无情的性能,这意味着尽可能少地使用额外的 cruft,并且其中许多库在可能不需要的地方添加了不必要的东西或性能下降.

There isn't one right now and I would go on to say that there may never be one in the same way that there is jQuery, for the simple fact that most (commercial) games are going to want to be mercilessly performant, which means using as little extra cruft as possible, and many of these libraries add unnecessary things or performance hits where it may not be desired.

这并不是说它们根本不会被使用.上述所有库可能都适用于大量小型(呃)游戏.

That is not to say they won't be used at all. All of the above libraries are probably good for a great deal of small(er) games.

但我想在大型项目中,许多工作室会发现自己从一个库开始,直到遇到性能瓶颈,然后自己编写库中使用的所有组件,以便只保留他们需要的细小部分.

But I imagine on large projects many studios will find themselves starting with a library until they hit a performance wall, and then writing all the components they used in the library themselves in order to keep only the thin bits that they need.

如果有一个流行起来,它几乎肯定会像 MooTools(第二个最流行的 JavaScript 库)一样是模块化的,它试图变得紧凑和 让您只选择要使用的组件.我想你将来会发现很多游戏都有一个非常小的引擎只是用于处理声音或只是用于处理图像或 2D 同构板,而不是具有(大型)库的游戏,尝试处理各种可能的 2D 游戏.

If there is one that becomes popular it will almost certainly be be modular like MooTools (the second most popular JavaScript library), where it tries to be compact and lets you select only the components you want to use. I imagine you'll find a lot of games in the future that have a very small engine just for handling sound or just for handling images or a 2D isomorphic board, instead of games that have a (large) library that attempts to handle every possible kind of 2D game.

无论如何,如果您只是想找到最受欢迎的 JavaScript 引擎,那么在接下来的几个月里,您最好的选择是使用 Google(页面排名)来确定最受欢迎的引擎.搜索2D 游戏引擎 JavaScript/Canvas"将让您很好地了解在任何给定时间哪个是链接最多(流行)的库.

Anyway, if you simply want to find the most popular JavaScript engine then your best bet over the coming months is to use Google (page rank) to determine most popular. Searching for "2D game engines JavaScript/Canvas" will give you a pretty good idea of which is the most linked-to (popular) library at any given time.

(毕竟,尝试在 Google 上搜索JavaScript 库".您可以猜到我打赌的第一个结果!)

(After all, try searching Google for "JavaScript library". You can guess the first result I bet!)

这篇关于用于 JavaScript 的 2D 引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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