Thursday, September 1, 2011

Developing HTML5 games with ImpactJS

Recently I landed a gig to make 38 minigames in HTML5/javascript. Despite the impossibility of the timeline and the paltry pay, I took it on because... well, I love games and HTML5 is the hotness right now. Plus it finally gives me something to talk about in my blog. Here begins the chronicles of a lowly programmer's journey into the unknown. There will be frustrations, triumphs, tears and lots and lots and lots of debugging. So let's begin.

My first task was to choose a base. I looked over every js game engine out there and even dabbled a bit in WebGL. In the end I chose ImpactJS for several reasons. First, at the time of this writing it's the only javascript game engine in stable release. The Aves engine and Rocket Pack got bought out, Isogenic is too expensive, and none of the rest seem to have solid communities. So I saw ImpactJS reviewed in Game Developer Magazine and jumped on it. I must say, it's been very impressive for prototyping. My only two concerns at this point is that not much has been done with it and there's no scene graph. Most of the games in the engine's forums are clones or very simplistic. None of them come close to what my client has envisioned for these 38 minigames, which will have a top down view with controllable sprites. But, I played with ImpactJS for about 3 hours and had a little warrior running around, crashing into stuff and collecting treasure, so I think I made a good bet.

The other thing ImpactJS offers over other html5/javascript engines is that it has a framework. There's no guessing about where this or that file should go, Impact is simple and tells you exactly where you need to put everything. Entities go in the entities folders. Assets go in the media folder. Levels go in the levels folder. Easy. Plus Impact has been proven to run on mobile devices and a couple of developers, including Dominic, the creator and steward of the project, have converted their games to native iPhone apps!

The short of it: I begin my journey with a solid footing. Next time I'll talk about the games as much as my NDA will allow and some of the challenges/solutions that only a coder would think about when taking direction from creative types.