Posts

Showing posts from April, 2011

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 HTML5Gopherwood Studios Blog - creators of Entanglement and working on something coolGame Closure Blog - building a multi-player HTML5 game development toolkitThese 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 animations or pain…