{"id":8700,"date":"2012-07-19T21:38:47","date_gmt":"2012-07-19T21:38:47","guid":{"rendered":"http:\/\/blog.mozilla.org\/labs\/?p=8700"},"modified":"2012-09-10T22:00:27","modified_gmt":"2012-09-10T22:00:27","slug":"webgamestub-or-so-you-want-a-quick-start-on-a-2d-canvas-game","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/labs\/2012\/07\/webgamestub-or-so-you-want-a-quick-start-on-a-2d-canvas-game\/","title":{"rendered":"WebGameStub, or, So You Want a Quick Start on a 2D Canvas Game"},"content":{"rendered":"<p>\nToday we&#8217;re releasing <a href=\"https:\/\/github.com\/mozilla\/WebGameStub\/\">WebGameStub<\/a> 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.\n<\/p>\n<p>\nWebGameStub is about saving you time and effort so that you can focus on writing your game. It&#8217;s about not having to write the most basic game infrastructure pieces, like canvas setup and an update\/render loop. It&#8217;s about having an easier starting point than empty HTML and JS files. It&#8217;s about not having to spend your time stitching together the usual cross-browser bits associated with bootstrapping an app on the web.\n<\/p>\n<p><iframe loading=\"lazy\" scrolling=\"no\" style=\"overflow:hidden; border: 0;\" width=\"540\" height=\"490\" src=\"http:\/\/dmose.github.com\/WebGameStub\/\"><\/iframe><\/p>\n<p>Simple canvas game, courtesy of <a href=\"https:\/\/twitter.com\/richtaur\">Matt Hackett<\/a> and <a href=\"https:\/\/twitter.com\/LostDecadeGames\">Lost Decade Games<\/a>.<\/p>\n<h4>What WebGameStub 0.2 Gets You<\/h4>\n<p><\/p>\n<ul>\n<li>A simple update\/render loop and canvas, based on the game above<\/li>\n<li>A copy of the example game that you can inspect and extend<\/li>\n<li>Links to helpful game docs, API docs, and open art resources so you don&#8217;t have to hunt for them<\/li>\n<li>HTML &amp; CSS based on HTML5 Boilerplate for speed, robustness, and futureproofing<\/li>\n<li>(Optional, requires node.js): automated optimization, deployment to github pages, and library installation with volo<\/li>\n<\/ul>\n<p>\nHere are a few examples of what one can build using this template: <a href=\"http:\/\/fwenzel.github.com\/serpent\/\">a snake game<\/a> built by Frederick Wenzel at the recent MDN hack day as well as an  extended version of the example goblin game where one <a href=\"http:\/\/dmose.github.com\/WGS-game-jam\/\">shoots at Twitter avatars<\/a>.\n<\/p>\n<h4>Getting Started<\/h4>\n<p><\/p>\n<p>\nIf you would like to start working on a game, and have some experience with web development and JavaScript, give WebGameStub a try. The <a href=\"https:\/\/github.com\/mozilla\/WebGameStub\/blob\/develop\/README.md\">README on Github<\/a> is a good place to start.\n<\/p>\n<h4>Feedback and Helping Out<\/h4>\n<p><\/p>\n<p>\nYour 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 <a href=\"https:\/\/github.com\/mozilla\/WebGameStub\/issues?state=open\">github issue<\/a> or leaving a comment on this blog. We&#8217;re also often available in <a href=\"irc:\/\/irc.mozilla.org\/#games\">#games on irc.mozilla.org<\/a>.\n<\/p>\n<h4>More Info<\/h4>\n<p><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/mozilla\/WebGameStub\/\">WebGameStub&#8217;s github repo<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mozilla\/WebGameStub\/wiki\/Frequently-Asked-Questions\">Frequently Asked Questions<\/a>, including info about what this means for the Minimalist HTML5 Game Template<\/li>\n<li>Lost Decade&#8217;s <a href=\"http:\/\/www.lostdecadegames.com\/how-to-make-a-simple-html5-canvas-game\/\">excellent tutorial<\/a> on how they built the simple canvas game<\/li>\n<li><a href=\"http:\/\/html5boilerplate.com\/\">HTML5 Boilerplate<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/volojs\/volo\/blob\/master\/README.md\">volo<\/a>, a node.js-based JavaScript dependency manager and project automation tool<\/li>\n<\/ul>\n<p>&#8211;<a href=\"https:\/\/twitter.com\/dmose\/\">Dan Mosedale<\/a>, on behalf of the WebGameStub team (<a href=\"https:\/\/twitter.com\/alankligman\">Alan Kligman<\/a>, <a href=\"https:\/\/twitter.com\/dperit\">David Perit<\/a>, <a href=\"https:\/\/twitter.com\/jlongster\">James Long<\/a>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we&#8217;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. <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/labs\/2012\/07\/webgamestub-or-so-you-want-a-quick-start-on-a-2d-canvas-game\/\">Continue reading<\/a><\/p>\n","protected":false},"author":336,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20250,19270,19291],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/posts\/8700"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/users\/336"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/comments?post=8700"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/posts\/8700\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/media?parent=8700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/categories?post=8700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/tags?post=8700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}