Off The Lines — A JS13K Game

This was my first ever entry for JS13K Games ( ). JS13K is an annual competition where you have a month to create a game. The catch is the overall game size must be no larger than 13KB, no external libraries/code/assets allowed (except for the WebXR section, or if you include it within your 13KB bundle). The good news is the size limit is once everything is minified and zipped — this makes a huge difference! The theme this year was “Offline”.

The game can be played here:



My biggest limitation was actually time. A month sounds a long time, but commitments get in the way and I had a week in the middle where nothing was worked on, picking it back up again for the final week. I didn’t help the situation by deciding to create a second game! I really wanted to create a game for the WebXR category too, so I had to split my time accordingly.


I used miniMusic for the audio ( ). The output was super-condensed, but I decided to refactor the code so that I understood it and could add more audio as I went along.

Lessons Learned

I also had to re-write the collision detection code. The issue being sometimes a collision was fired more than once (e.g. when scoring points) so I had to do checks that new collisions hadn’t just occured. This didn’t prove to be overly complex in the end, but it took me a while to discover the best way of doing this.

If I had more time

A note on levels: I have allowed people to select any level they like within the levels page. So you can play through each level at a time (and only move on once you’ve scored enough points) if that’s how you like to play, but if you are short of time, or get stuck on one particular level, you still can get to any other level.

It would also have been good to have created some background music. I feel the sound-effects work, but background music would have been nice for this game. I would have put in a menu option to turn this off just in case it got annoying!

My original plan was to do more with the switches, to make it easier to work out which line was being switched to. I didn’t come up with a good solution in the end, but hopefully this doesn’t detract from the game-play.