Introducing a Minimalist HTML5 Game Template

Today, we’re releasing version 0.1 of an HTML5 game template (the github repo).  This template provides basic infrastructure so that as a game developer, you don’t need to do a bunch of busy work to get started: you can hit the ground coding.  As no particular engine or  framework is assumed, it is usable for any sort of game.

More details, from the README.md:

Fast Start

Easy to Build & Deploy

  • Builds minified game configured for browser appcache using UglifyJS and almond.js
  • Trivial to deploy to a live server (currently supports github-pages)

Default Best Practices Help Your Codebase Scale

  • Structured for maintainability using RequireJS
  • Includes pre-configured QUnit test harness

Easy to Specialize

  • Higher-level, specialized templates can easily be built on top of this. We will build one specifically for the Gladius engine  in the near future.  One could imagine others like a side-scroller  template, or a simple canvas game for new JS developers.

See the “let’s get started” documentation to get a quick sense of how it all fits together.

Note: This template is currently focused entirely on the browser-based pieces of a game. Making it easy for a game to offer a Node-based server-side component is likely to be in scope in the fairly near future.

Your Thoughts & Feedback

We’d be grateful for all feedback about this template, whether in blog comments or github issues, or pull requests.  To help make this template more useful, we’d especially love to get your thoughts on a couple of specific issues:

  • Would you prefer to be responsible for your own game loop, or would you prefer to use a default gameloop provided by the template?  Please add comments to this github issue.
  • If you’ve worked on an HTML5 game, what did you find to be the most annoying hurdle when getting started?  Please add comments to this github issue.

Next Steps

We’ll be evaluating the feedback we get, prioritizing issues into the 0.2 github issue milestone, and then digging into another iteration, to be available in the next several weeks. Feel free to join us in IRC in #games on irc.mozilla.org if you want to discuss further.

4 responses

  1. Ernesto Sepulveda wrote on :

    This will be great! I´ll be waiting for HTML5 templates; It´s very difficult to start a game from zero. Thank you

  2. Paul Batum wrote on :

    No, this not my area of expertise (hence my desire for a template 😛 ).

  3. Paul Batum wrote on :

    This looks like a great start! I would love to see more specific templates/frameworks too, such as “make your own browserquest”. I enjoyed reading the browserquest code and felt that something generally useful could be extracted from that code base.

    1. Dan Mosedale wrote on :

      Yes, completely agreed that it’d be nice to put together specific templates. I’m hoping to start reaching out to folks who might be interested in building such things. Is trying to do that from the BrowserQuest code something you’re inclined to try?