My JS13K Games 2018 Entry: 13Kars
JS13K Games is a JavaScript coding competition that limits your game file size to 13 kilobytes. Theme for this year is offline even thought there is a server category. I wrote 13Kars for desktop category.
Motivation
JS13K has been there for few years but this is the first time I heard about it. File size limit of 13 kilobytes was my main motivation to start writing something. I thought since it’s so small, I can write something small and silly without spending lot of time.
Tools
I used Kontra.js, a lightweight JavaScript game engine. Rest of the code is pure JavaScript, CSS and HTML5. Since I had enough space to include some sound effects, I used jsfxr to generate them.
Takeaways
With all those fancy game engines it is really easy to start developing games. You don’t have to be good with arts, there are great resources like OpenGameArt project which offers graphics and music under free licenses. But in 13Kars, I choose not to use any. :)
When ever I had to use JavaScript/HTML/CSS in my day to day work, I usually use jQuery and Bootstrap. With this project I had to avoid both. Using pure JavaScript instead of jQuery isn’t a problem. But getting a good responsive design without Bootstrap was a major pain. That’s when I start learning about CSS grid. It’s amazing.
But that’s not the only CSS skill that I acquired. Dynamic CSS is fun to work with. Opens up lots of possibilities.
13Kars
I didn’t had any idea on what sort of game I should design. I just started playing around with Kontra.js. and the result was 13Kars. 13kars is a simple car game where you drive against incoming traffic. Colour theme is grayscale and all the graphics in that game is computer generated dynamic graphics. Player’s car is controlled by keyboard and objective of the game is to avoid hitting incoming cars and drive on to fuel cells to keep your car running.
Conclusion
I spend mostly a half of my weekend developing this game. With all the skills that I learned doing that, I’m pretty happy with my effort.