Posts

Follow these 3 new HTML5 game development blogs

Whether you are new to HTML5 game development or an experienced practitioner, these blogs are publishing some great posts recently. I recommend following these HTML5 game development blogs to keep your finger on the pulse and learn some new HTML5 tips and tricks. Hiive Blog - porting Creatures and Castles to HTML5 Gopherwood Studios Blog - creators of Entanglement and working on something cool Game Closure Blog - building a multi-player HTML5 game development toolkit These blogs are active now and highly recommended. What are your favorite HTML5 game development blogs?

HTML5 Games and Consistent Timers

Due to the wide array of CPUs, graphics cards, and hardware acceleration options, HTML5 games need to deal with varying performance conditions.  This implies that HTML5 games need to track their internal game times to ensure everything happens in a predictable and deterministic manner. An "internal game time" is a clock that the game maintains, independent of the system's clock.  The internal game time can start at zero when the game starts and tick itself forward as the game progresses. To illustrate why the internal game time is important, consider the case of requestAnimationFrame .  Both Chrome and Mozilla have implemented requestAnimationFrame , a mechanism to hand off the animation frequency and sync to the browser.  This is A Good Thing, because the browser reduces or eliminates tearing effects because requestAnimationFrame is called when the browser is ready to paint the screen. requestAnimationFrame is also very smart, as the browser will not run anim...

Who are the HTML5 Game Developers?

An HTML5 game is classified as a game that: runs in a modern web browser is written in JavaScript uses Canvas or WebGL for graphics While there is a large and growing collection of HTML5 Game Engines and Frameworks , who out there has actually written a non-trivial, professional HTML5 game?  Here's my quick list: Lost Decade Games made Onslaught Impact made Biolab Disaster Gopherwood Studios made Entanglement EA made Poppit Pagoda Software made Wordico Grant Skinner made Pirates Love Daisies Massively Fun made Word Squared Hakim El Hattab made Sinuous Bocoup builds some serious JavaScript apps and demos, but haven't produced a straight up game (yet) Subsonic Games made Sonar Who did I miss?   What are some of your favorite HTML5 Game Developers?

Measuring HTML5 Browser FPS, or, You're Not Measuring What You Think You're Measuring

Update: Ilmari Heikkinen has written a helpful Browser Rendering Loop blog entry. Everything you know is a lie. OK, not everything.  But everything you know about measuring the FPS for your HTML5 game is probably wrong.  Turns out that measuring the frame rate, or FPS, for an HTML5 game written in Canvas or WebGL is surprisingly difficult. http://weblogs.mozillazine.org/roc/archives/2010/11/measuring_fps.html  will tell you that trying to measure framerate by counting how often your setTimeout runs is not accurate. The browser can run your Timeout callback multiple times between screen paints.  All you're probably doing is measuring how often your game loop runs, which is not FPS. Turns out Mozilla has a window.mozPaintCount  available, which should provide an accurate FPS. However, this only works for Mozilla. There's an open issue for a clone of window.mozPaintCount for Chrome , but doesn't look like there's much traction there. A manual way to check f...

HTML5 Game Talk at Google IO

Good news!  I'll be presenting on HTML5 Games at Google I/O, to be held May 10-11, 2011 in San Francisco.  I know it was very hard to get a ticket to Google I/O this year, but if you were lucky enough to grab a ticket I'm really looking forward to meeting you and talking HTML5 for Games. The title for the talk is " Super Browser 2 Turbo HD Remix: Introduction to HTML5 Game Development ".  I'm working on both the game and the agenda for the talk, but my basic premise will be "it's easier than you think" and I'll be aiming at the beginner/intermediate JavaScript and web programmer.  You'll come away with the confidence and tips to build your first HTML5 game, along with perspective for distribution and monetization.  Plus, we'll look at some fun games! :) My initial agenda looks a little something like this: Why games are different than traditional web programming Game loop Input detection Animation Coordinate system Asset loading...

HTML5 Storage and Offline Presentation

I was lucky enough to be able to present HTML5 Storage and Offline Technologies at the Bocoup Loft in Boston on March 10th, 2011.  Bocoup is a really cool web development agency, and I appreciate their offer to host and facilitate the talk. Many thanks go out to Mr. Eric Bidelman for putting together the awesome slides from which I poached and remixed.  And by remixed I mean more or less stole. HTML5 enables offline applications and local data storage and caching.  This leads to quicker start up times, faster processing and less network and server utilization (always a good thing).  With offline and storage, we have many technologies at our disposal: App Cache for cached static assets like images, CSS, and JavaScript Local Storage, basically replacing cookies WebSQL DB for full relational SQL Indexed DB for a very JavaScript-y object storage and retrieval system File System APIs for sandboxes, virtualized filesystems accessible from your web app If you'...

HTML5 Audio Needs Your Help

HTML5 is gaining traction as a gaming platform, but there's still one problem before we can achieve the vision of a great native-to-the-browser gaming experience.  HTML5 audio, specifically the <audio> tag and its implementations across browsers, is more or less broken for games. For details on the HTML5 audio problem, learn about The State of HTML5 Audio (hint: not good) and the troubles with Multiple Channels for HTML5 audio .  Dominic, the author of those posts, knows what he's talking about: he created Impact , the JavaScript game engine. We need your help!  Star these issues, add comments, and even better add test cases.  Tell Chrome that you care about HTML5 audio and these issues are important! http://code.g oogle.com/p/chromium /issues/detail?id=47 381 http://code.googl e.com/p/chromium/iss ues/detail?id=47761 h ttp://code.google.co m/p/chromium/issues/ detail?id=59369 http: //code.google.com/p/ chromium/issues/deta il?id=59370 http://co de.g...