This one's for the casual game developers and the SVG folks
I've been working off and on (okay, mostly off) on a simple puzzle game done in
SVG and Javascript. I started on it almost a year ago and the idea was to just put up something simple as a guide to building
SVG games. I got something that sort of worked pretty easily, but each time I added a feature it seemed like I had to rewrite the whole game. I guess that's just part of developing in a green field. One of the issues that bothered me most throughout the work I did was that I was transforming level files from a generic
XML to
SVG in the browser. I knew that every browser that downloads the level would perform the exact same transformations and every user would have to wait a few seconds while it happened. I also had to deal with the rather hairy Javascript code that handled those transformations and debug it every time it broke on one of the platforms I'm trying to support. Not every browser has a debugger as accessible as
Venkman (and at the time I don't think there was a Venkman version for Deer Park).
I'd rewrite the code, get a little more capability in it and tweak it for a day or two, then shelf it again until
Jeff or
Candace bugged me again to stop talking about it and get something done. Okay, so I finally did another rewrite on it a month or so ago that fixes the issue that I'd avoided for so long. See, I'd wanted to keep it in just Javascript and
SVG since I thought that made things simpler. There's no build step that way and the design of the game is more obvious. Scripting languages don't generally need the kind of development pipeline that compiled languages do. In C or C++ the source code has to be built before results can be seen. In Javascript or
HTML, the source is the executable. When
XML is used to store information though, there's always some kind of interpretation that happens to display it. That can happen right when it's accessed (like viewing an
SVG or
XHTML document) or there can be interpretation first that creates another document that's actually viewed. The latter transformation can be done with
XSLT.