I have spent a lot of time evaluating different options. Crafty is my favorite and the one I'm using for my current project. LimeJS is pretty good but it relies on the Closure framework, which I'm not a fan of. I also liked both EaselJS and CasualJS a lot.
btw one of the most "professional" options is Impact, so you should take a look at that one too. However it doesn't provide many of the features that the various open-source libraries do, and the features Impact provides that the other libraries don't aren't really that valuable. For example, if you need a physics engine for your game (and a platform game probably does) then you can easily integrate Box2D on your own. another Box2D link
That said, doing things from scratch without using a 3rd-party library is not a bad option. The free ebook Dive Into HTML5 does a great job of explaining how the Canvas element works. The thing is, there are a lot of graphics features that a good graphics library will provide that aren't built-in: a display heirarchy allowing Z-order and attaching objects to each other, animation through both tweening objects and spritesheets, mouse events so that you can click on objects, etc..
UPDATE: It's been over a year since I posted that answer and the situation has changed slightly (this is a nascent area of technology.) Although Crafty is still a great choice, in the past year EaselJS has picked up a lot of momentum (especially considering Adobe hopped on the EaselJS train.) I'm gonna switch to that tool for future projects (also note that it has a new website)
UPDATE 2:
EaselJS is still my favorite option, but another great option has cropped up: Phaser. I'm planning to explore this one in the near future.
It doesn't seem like there is a lot of need for a piece of middleware, the platform already takes care of most of the boring stuff, it won't really get easier by using further abstractions.
我对 gameQuery 有一些经验,并进行了侧滚动跳跃并避免 游戏,为一家英国公司提供。我学到了很多东西并且玩得很开心。 gameQuery 引擎提供基本的精灵表动画(精灵表布局受到限制)、图层、游戏循环和一些基本的碰撞检测(仅限边界框)。它以 DOM 为目标,并将您与它紧密联系在一起,这可能不是您想要的。我收集的其他库允许你切换实现吗?
我同意“jocking”,因为你应该尽可能多地利用预先写好的东西。 LimeJS 附带 Box2d 的 javascipt 实现,Box2d 是用于制作《愤怒的小鸟》的引擎。我无法真正评论 Google Closure,但如果它对 Google 来说足够好,那么对我来说也足够好。
I had some experience with gameQuery and made a side scrolling jump and avoid game for a company in the UK. I learnt a lot and had great fun doing it. The gameQuery engine provides basic sprite sheet animation (you are limited in sprite sheet layout), layers, a game loop and some basic collision detection (bounding box only). It targets the DOM and ties you into it heavily which may not be what you want. I gather other libraries allow you to switch implementation?
I agree with jhocking in that you should leverage as much pre-written stuff as you can. LimeJS comes with a javascipt implementation of Box2d, the engine that was used to make Angry Birds. I can't really comment on Google Closure but if its good enough for Google its good enough for me.
发布评论
评论(4)
我花了很多时间评估不同的选择。 Crafty 是我最喜欢的,也是我当前项目中使用的。 LimeJS 相当不错,但它依赖于 Closure 框架,我不喜欢它。我也喜欢 EaselJS 和 CasualJS 很多。
顺便说一句,最“专业”的选项之一是 Impact,所以你也应该看看这个。然而,它没有提供各种开源库提供的许多功能,并且 Impact 提供的其他库没有提供的功能实际上并没有那么有价值。例如,如果您的游戏需要物理引擎(平台游戏可能需要),那么您可以轻松集成 Box2D 靠你自己。 另一个 Box2D 链接
也就是说,不使用第 3 方库从头开始做事情是不错的选择。免费电子书深入了解 HTML5 很好地解释了 Canvas 元素的工作原理。问题是,一个好的图形库会提供许多非内置的图形功能:允许 Z 顺序和对象相互附加的显示层次结构、通过补间对象和 spritesheet 进行动画、鼠标事件这样您就可以单击对象等。
更新:自从我发布该答案以来已经一年多了,情况发生了轻微的变化(这是的一个新兴领域技术。)尽管 Crafty 仍然是一个不错的选择,但在过去的一年中 EaselJS 已经获得了很大的发展势头(特别是考虑到 Adobe 跳上 EaselJS 列车。)我将在未来的项目中切换到该工具(另请注意,它有一个 新网站)
更新2:
EaselJS 仍然是我最喜欢的选择,但是另一个很棒的选择已经出现:Phaser。我计划在不久的将来探索这个。
I have spent a lot of time evaluating different options. Crafty is my favorite and the one I'm using for my current project. LimeJS is pretty good but it relies on the Closure framework, which I'm not a fan of. I also liked both EaselJS and CasualJS a lot.
btw one of the most "professional" options is Impact, so you should take a look at that one too. However it doesn't provide many of the features that the various open-source libraries do, and the features Impact provides that the other libraries don't aren't really that valuable. For example, if you need a physics engine for your game (and a platform game probably does) then you can easily integrate Box2D on your own. another Box2D link
That said, doing things from scratch without using a 3rd-party library is not a bad option. The free ebook Dive Into HTML5 does a great job of explaining how the Canvas element works. The thing is, there are a lot of graphics features that a good graphics library will provide that aren't built-in: a display heirarchy allowing Z-order and attaching objects to each other, animation through both tweening objects and spritesheets, mouse events so that you can click on objects, etc..
UPDATE: It's been over a year since I posted that answer and the situation has changed slightly (this is a nascent area of technology.) Although Crafty is still a great choice, in the past year EaselJS has picked up a lot of momentum (especially considering Adobe hopped on the EaselJS train.) I'm gonna switch to that tool for future projects (also note that it has a new website)
UPDATE 2:
EaselJS is still my favorite option, but another great option has cropped up: Phaser. I'm planning to explore this one in the near future.
似乎并不需要太多中间件,平台已经处理了大部分无聊的事情,通过使用进一步的抽象并不会真正变得更容易。
It doesn't seem like there is a lot of need for a piece of middleware, the platform already takes care of most of the boring stuff, it won't really get easier by using further abstractions.
我对 gameQuery 有一些经验,并进行了侧滚动跳跃并避免 游戏,为一家英国公司提供。我学到了很多东西并且玩得很开心。 gameQuery 引擎提供基本的精灵表动画(精灵表布局受到限制)、图层、游戏循环和一些基本的碰撞检测(仅限边界框)。它以 DOM 为目标,并将您与它紧密联系在一起,这可能不是您想要的。我收集的其他库允许你切换实现吗?
我同意“jocking”,因为你应该尽可能多地利用预先写好的东西。 LimeJS 附带 Box2d 的 javascipt 实现,Box2d 是用于制作《愤怒的小鸟》的引擎。我无法真正评论 Google Closure,但如果它对 Google 来说足够好,那么对我来说也足够好。
I had some experience with gameQuery and made a side scrolling jump and avoid game for a company in the UK. I learnt a lot and had great fun doing it. The gameQuery engine provides basic sprite sheet animation (you are limited in sprite sheet layout), layers, a game loop and some basic collision detection (bounding box only). It targets the DOM and ties you into it heavily which may not be what you want. I gather other libraries allow you to switch implementation?
I agree with jhocking in that you should leverage as much pre-written stuff as you can. LimeJS comes with a javascipt implementation of Box2d, the engine that was used to make Angry Birds. I can't really comment on Google Closure but if its good enough for Google its good enough for me.
您可能想查看 CopperCube。它是一个用于 3D HTML5 和 Flash 开发的 IDE。商业化,但不是太贵。专注于 3D,因此大量使用 WebGL
CopperCube - 适用于 WebGL 和 Flash、Mac OS X、Windows 和移动应用的 3D 编辑器
You might want to check out CopperCube. It's an IDE for 3D HTML5 and Flash development. Commercial, but not too expensive. Focused on 3D, so makes heavy use of WebGL
CopperCube - a 3D editor for WebGL and Flash, Mac OS X, Windows and mobile apps