scriptNode

Web development with a focus on JavaScript RSS

Spacius! A Space Adventure

Advanced Matt Hackett Published July 8th, 2008 by Matt Hackett

Spacius! A Space Adventure

I must have been feeling nostalgic, missing my wasted hours playing old Nintendo games as a kid, because last weekend I put together Spacius! A Space Adventure. My goal was to make a fun, simple game using only JavaScript that would work in any browser. That's right folks, this game was made using just div elements! Really, there's nothing hardcore in here that would require canvas, so I guess that shouldn't blow any minds. But this game has been tested and works in IE6, IE7, FireFox 2/3, Opera 9.5 and Safari 3.

My one cop-out was falling back on flash for the audio, but until all browsers support HTML5 (or some mad genius makes a JavaScript-only audio player), this is the best I could do. Spacius! uses Scott Schiller's fantastic Sound Manager 2 to enable sound. There's a little latency, but it otherwise works like a charm.

Spacius! A Space Adventure

One really cool thing about the way Spacius! works is that it takes the shape of its containing element. So it was really trivial to make an 800x600 pixel version.

Here's how to play: Press the space bar to begin the game. Use the arrow keys to move the ship. Once playing, use the space bar to shoot balls of excitement. The S key toggles sound on/off.

There are six waves in Spacius!. The last one begins at 10,000 points, and it's really hard so only total badasses will be able to get super high scores (yes, that's a challenge).

Here are the UFO scores:

Bomber Bomber: 15 points

Bogey Bogey: 20 points

Meteor Meteor: 50 points

Death Star "Death Star": 25 points

So what're you waiting for?? PLAY NOW!

Read other articles tagged: , , ,

Comments (32)

Thoughts?

(required)

(not shared)

© 2010 scriptNode