当前位置: 动力学知识库 > 问答 > 编程问答 >

Create HTML5 game using CreateJS and Canvas Boilerplate

问题描述:

I've pretty much set my mind on using CreateJS to create an HTML5 game, but I also came across H5CGB, a boilerplate created specifically for creating HTML5 canvas games. It looks very thorough and I believe the developer when he says it would save me heaps of time writing code I would have had to write anyway.

However, looking at tutorials for both CreateJS and H5CGB, they seem to conflict quite a bit, at least in terms of how these specific tutorials implement their respective tools:

  1. http://hub.tutsplus.com/tutorials/learn-createjs-by-building-an-html5-pong-game--active-11845
  2. http://icecreamyou.github.io/HTML5-Canvas-Game-Boilerplate/docs/#!/guide/walkthrough

I'm basically just trying to understand how to integrate these two systems. For example, both come with their own preloader utility, so I'm not sure which to use and if they would cause issues or if it's just a redundancy resulting in unnecessarily longer loading times.

Has anyone had any experience working with these two tools together?

网友答案:

I believe you should probably just stick to using createJS because the two frameworks do have a lot of overlapping functionality. It wouldn't make sense to use both.

I think you should also check out other game specific frameworks like Crafty.js and possibly watch Google I/O Canvas to get a good idea on the total range of your options!

Crafty http://craftyjs.com/

Google I/O http://blog.sethladd.com/2011/05/source-code-slides-and-video-for-html5.html

Hope this helps and good luck learning canvas! Shalom

网友答案:

I created H5CGB. (Just found this question today via the newly-released Github traffic stats.)

The biggest two reasons to use H5CGB are:

  • You do not have to learn any new APIs to start developing. H5CGB provides a bunch of scaffolding you can use to skip the boring stuff, but you won't get into trouble if you want to implement any part of your app yourself, and you probably can get going immediately just by editing main.js without even reading the documentation.
  • The code base is intended to be boilerplate, so you can use all the utilities and scaffolding H5CGB provides as a starting point and edit it if you want things to work differently.

This is in contrast to most other canvas libraries, which tend to be monolithic black boxes of no-touchiness with sparsely documented APIs.

分享给朋友:
您可能感兴趣的文章:
随机阅读: