WebGameStub, or, So You Want a Quick Start on a 2D Canvas Game

Today we’re releasing WebGameStub version 0.2. It helps you get a quick and easy start on writing an HTML5 game with 2D canvas with a simple template and a few tools. WebGameStub offers a good starting point for the game itself and smoothes off a variety of the rough edges associated with writing and publishing a Web app.

WebGameStub is about saving you time and effort so that you can focus on writing your game. It’s about not having to write the most basic game infrastructure pieces, like canvas setup and an update/render loop. It’s about having an easier starting point than empty HTML and JS files. It’s about not having to spend your time stitching together the usual cross-browser bits associated with bootstrapping an app on the web.

Simple canvas game, courtesy of Matt Hackett and Lost Decade Games.

What WebGameStub 0.2 Gets You

  • A simple update/render loop and canvas, based on the game above
  • A copy of the example game that you can inspect and extend
  • Links to helpful game docs, API docs, and open art resources so you don’t have to hunt for them
  • HTML & CSS based on HTML5 Boilerplate for speed, robustness, and futureproofing
  • (Optional, requires node.js): automated optimization, deployment to github pages, and library installation with volo

Here are a few examples of what one can build using this template: a snake game built by Frederick Wenzel at the recent MDN hack day as well as an extended version of the example goblin game where one shoots at Twitter avatars.

Getting Started

If you would like to start working on a game, and have some experience with web development and JavaScript, give WebGameStub a try. The README on Github is a good place to start.

Feedback and Helping Out

Your feedback on how WebGameStub was helpful (or could have been more helpful) in starting a simple web game would be tremendously valuable in helping make it better. Please let us know how it went by opening a github issue or leaving a comment on this blog. We’re also often available in #games on irc.mozilla.org.

More Info

Dan Mosedale, on behalf of the WebGameStub team (Alan Kligman, David Perit, James Long)