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.

1 comment:

  1. Yup, the mute bug was pretty simple. Fixed.

    Next, the caching thing.

    ReplyDelete