By now everyone probably heard of Canabalt and many other clones. The last one I saw is about an unicorn … so I thought why not give it a shot myself! This will be just a fun experiment and I invite everyone to feed me with thoughts suggestions and criticism.

So since it seems I’m having a hard time doing things like most do I decided to stick with a JavaScript game. The concept is simple enough that JavaScript should be doing just fine including sounds and possibly music. That will probably prevent me from distributing the game easily but that’s not really the point anyway. Like I said it’s just to do something fun and simple that I can work on from time to time.

First thing I needed to get out of the way was to get some code to deal with collisions. That sounded boring to code so some quick googling lead me to gameQuery. gameQuery is a JavaScript game engine that deals with some of the boring stuff you usually have to take care yourself. The animation feature is nice and painless and yes there is a module to handle collisions. Nice little tool that will allow me to focus on the game itself.

Graphics? Well I have plenty of files from Golemizer so let’s use that. Story? Doc must escape the X-Rex! Done. Controls? Press W to activate a jetpack. I don’t have jumping animations so that will do. Double-jump? Ok. Hmm … anything’s missing?

Here’s the first prototype of the game. For some reason it doesn’t seem to work in IE so please use a real browser like Firefox or Chrome … k? Click here to play Run Doc Run!

Remember press W to activate the jetpack. You can reactivate the jetpack once while in the air. When the game is over (because you are pushed under the X-Rex) you must refresh the page to start playing again.

This first version is actually based on the tutorial you’ll find on gameQuery’s website. I had to add some stuff to gameQuery to handle the character running into a wall and walking on blocks but it’s really just a slightly different version of the collision code. Code isn’t clean so don’t waste too much time analyzing it as I just wanted to see what it could look like (prototype).

Considering how little time I’ve put into this I’m quite pleased with the result. Like I said everyone is invited to share some thoughts about it and when I have some time I’ll get back with an updated version later. I’ll repeat this process until it feels completed. Remember it must remains simple but I’d still like to have a little something different from other games of this type.

Share