“g (for jump)” and the engine behind it
Recently I’ve been thinking about the idea of a platformer game engine written entirely in HTML5 and JS.
After making clear the basic rules of the project, like…
- it should be open source, version controlled, hosted on GitHub
- all the graphics elements must be dynamically created – no prerendered images (JPG, PNG) should be used, everything must be created by the engine
- all the sounds and musics must be dynamically created also – no prerendered sounds, samples, musics (WAV, MP3, FLAC) should be stored, they must be rendered by the engine
- later on it should be allowed (for the sake of flexibility) to use prerendered stuffs
- the graphics, sound and level data must be separated from the engine – to be flexible and easily
… and after I realized the Gamedev competition of Function 2012 Demoscene Party is near I started to think a bit… I had 10 to reach a state where the engine (and a game based on it) can be “released”, shown to the public. Minus the daily worktime at the company where I work, of course. Without any deeper knowledge in HTML5 canvas and absolutely no experience in synth programming? Uhh… Well… Seems interesting — challenge accepted!
Long story short, after about one week I’ve had a little game with (mostly) working basic physics (collision detection and handling, gravity), a somewhat working multichannel synth, game and level data represented as an array and an engine to parse it, graphics for the game elements. Not that bad, but I still had no animation handling, no animation graphics, no sounds, no music, no levels… Two days before the compo I created the animations (and the handler for them), created the chiptune-ish effect for the synth. On the day before the compo (and in the morning of it) I created the levels, and just before it (about 40 minutes I guess) I created the “music”.
I still had no splash screen, no sounds, but hey! At least I had some bugs…
The game and the engine was far from “ready”, but it was “representable”. (I hardly believe I will say it is ready in the near future, but I am still working on it.)
Here are some screenshots:
The source code on GitHub: http://github.com/gheja/gforjump/
The version of the game I submitted: http://gforjump.x0.hu/function2012/ (git branch)
The game (updated nightly from GitHub repository): http://gforjump.x0.hu/nightly/