Friday, June 24, 2011

Gripes and Complaints

In just under a week, assuming all goes well, I'll be launching a version of Creatures & Castles on the Chrome Web Store.

For me, this was very much a learning experience. And as part of that learning experience, I can report that HTML5 in combination with JavaScript is very very close to being ready for primetime.

Almost, but not quite... As far as canvas support goes, Google Chrome, IE9, Safari and Firefox 4 all seem to have the bases covered. I ran into no significant cross-platform issues. Performance was more than acceptable - especially on Windows - even though I was making fairly heavy use of alpha blending. It's a shame that Mac Chrome doesn't offer hardware acceleration on the Canvas.

The biggest hindrance to the development of the game was JavaScript itself. Being more used to strongly typed languages that enforce data types, program structure and variable names, the freedom offered by JavaScript is more than enough rope to hang yourself with; for Creatures & Castles I was fortunate in that I had a version of the game written in a strongly typed language to as a template. Apart from that, I'd have to say that if the web version of the game has a class hierarchy, it is enforced only in my head.

There are tools such as Monkey that provide a more structured language (and can export to a number of target platforms including HTML5). I did not have time to test this tool, but the results look quite promising. I suspect it will be more useful as a prototyping tool than anything else. However given the pedigree behind it, I wouldn't be unduly surprised to see it used for more.

What Is really needed is for JavaScript to be given an industrial strength overhaul to add true object orientation, type safety and polymorphism. Personally, I would love to see something based on C# used as a JavaScript replacement, but I don't think I'm likely to be seeing that any time soon.
Post a Comment