click here for my current blog

this blog is no longer maintained and is here only for archival purposes

Something old, something new

Here are a couple of JavaScript things I’ve done, one of them about a year ago, another last week. I thought I’d better just write these up while I think of them, lest they disappear forever.

The first (and oldest) is the basis for a browser-based Raiden-esque game that I put together using Prototype. At the time I called it Journey to the Stars, and I’d intended to make it lightweight enough to be used as a loading screen for my (as yet unfinished, or really “unstarted”) web site.  The game was never completed, and the engine notably lacks collision detection among other things. What I like most about the game is its CSS-based sprite engine, which seems to work pretty effectively. (It even supports animated sprites, although I never got around to animating anything.) If I were to do it again, I’d use a more lightweight framework like jQuery. That Prototype ‘extends’ (ie adds a bunch of helper functions to the prototype) of every object you call with its $() function creates a lot of unnecessary memory overheads that must certainly compromise speed.

The second more recent thing is this simple JavasScript implementation of cellular automata. I was prompted to write it after I’d read th wikipedia aricle on Rule 110, and thought “hey, why not?” It would definitely benefit from being rewritten to use the new <canvas /> element, as its current method of flippng the background colours of hundreds of DIV elements is dog slow (and very “old world” in its approach, I think).

I’m highly sceptical that either of these will work in Internet Explorer. I doubt anyone reading this site is running it, anyway.

Leave a Reply