Tuesday, January 24, 2012

Starship

Starship is a simple asteroids clone. Inspired by the fantastic "Star Control" series of games, which occupied many, many hours of my youth. Starship is written in Javascript, using Canvas. I guess if this were a proper code blog, I'd write about how it works and show code snippets and all that. I don't really feel like doing that, though, so I won't.

The code is here: https://github.com/robin-norwood/Starship

And the runnable version is here: http://starship.neuroid.me/

It doesn't really do much, and has some bugs, but it works, at least in Firefox. For now, the entirety of the game is shooting the target over and over again. I like the music; I found it on Jamendo, and got the sound effects from freesound.org.

It also uses jQuery, but only for some of the nice looping and functional programming constructs; I'd probably use underscore.js these days instead.

The bugs that have me annoyed right now are a couple of issues with the audio. First, unmuting doesn't restart the music. Second, the audio files don't seem to be caching properly, leading to a nasty delay for the sound effects.

I'm sure they're both easily fixed, but debugging takes a sustained amount of time and concentration, which I just don't usually have outside of work. As I hinted before, I'm not coding for a living anymore, so maybe I'll have some of that concentration energy left over.

A little code...

Hi,

A couple of years ago, I got to be pretty good about coding some side projects. I got out of the habit. Now that I no longer code for a living, I've decided to take up the habit again. We'll see how it goes. First, I'll post about some projects I did in 2010 to learn about HTML5, and we'll see what happens from there.