Scribble

It’s the name of the game, I am about to develop now. Time is Sept 10, 2017 7:34 PM IST when I am starting to type this post.

The thought to develop a game first occurred to me after I read this blog post from github. It was about a game development competition called JS13KGAMES. It’s a competition in which a game has to be coded and the source files should be within 13 kilobytes.

I shared this with some of my friends. One of them took time and got his game out.

He happened to write it in under 3 hours and he said it was inspired by the Cross Creeper game that we played in an Arcade outside our office the day before. That’s cool !

The last date for submission is Sept 13, 2017. I had power cut all day. I know that it’s kind of late to start on this project. But, I am not willing to give up. I am going to try.

Gameplay

“Scribble” is a clone of my favorite multiplayer game, which I and my friend used to play a lot during our college days. Unfortunately, the support for playing it on the browser stopped suddenly. That’s quite a disappointment.

Scribble is a minimalistic clone of Draw my thing. Two players join one game. One player will be given a word and he is supposed to express that word by drawing it on a canvas. Whatever he draws will be synced and seen on the canvas of other player in realtime. The other player is supposed to guess the word with the help of the drawer.

Tech

I am going to start with the sandbox server provided for the competition.

Backend is written in Node.js with Socket.IO. For the frontend, I am thinking of writing it in plain javascript or may be use Elm. Oh wait! I came across this post on hackernews today morning.

Reason seems quite interesting, but the learning curve is too much right now. So, I am going to just start with Vanilla JS and throw in something if I really feel like doing so.

Time is Sept 11, 2017 AA:28 AM. I am sitting at my desk in office. Damn, last night was awesome. The experience took me to my college days, where I would spend lot of time at night experimenting news things and writing code without caring much. It’s been 1.7 years and I am feeling it again. “The mixed feeling of want to complete and will I complete?”. Let me get back to work now and continue this in evening.

Time is Sept 11, 2017 9:32 PM. Last night, I was not able to able to correctly program canvas to be used as drawing board. So, today I asked help from my friend at office in evening to help with the piece of code. We did it.

Bare Minimum

I just now completed the bare minimum version of the game and installing heroku cli to deploy it.

User enters the game
Gameplay

To be honest, at this point of time I have this huge chunks of Spaghetti code on both server side and client side. My next top priority is make this game look decent.

At last, I submitted the game in js13kgames and waiting to see if it will be approved as an entry. ( Entry got accepted and here it is — http://js13kgames.com/entries/scribble ). In the meantime here is the github repository containing the source code. The code is definitely lacking few things like code style, basic refactoring, removing logs etc. I suppose this is the side effect of me trying to think fast and do things quickly. Next time, I hope to find more time and do stuff like this in advance. Please bear with me this time!

Currently one game can accommodate only 2 players, but the code is extensible to any number of players. Since I didn’t have time to write UI code, I limited the capacity.

Here is a final look at the game and the size of the game is 6.7kb. Feel free to try it here — https://scribble-game.herokuapp.com/

Final gameplay. Chrome on left and Firefox on right.

Thanks

I personally like to thank Rituraj for telling me to not give up on this project. Thanks to Venkata Krishna for helping beta test the game. I also like to thank the Andrzej Mazur for organising js13kgames.

Moving Forward

Escaping from the normal routine and writing something like this definitely helped me in getting better. The most valuable lesson being “Try to manage time properly. I have to somehow figure this out.”

It’s fascinating to note that a bare minimum version of a massive multiplayer game like Draw My Thing could be developed under 13kb in under 6 hours. The growth of web APIs and the sophistication of frameworks ( like Socket.IO ) is making me awestruck. I am very much interested in the future of the web and the tools that will give us more power.


Thanks for reading. I quote verses from my favourite Tamil literature “Tirukkuṛaḷ” at the end of my blog posts.

“அருவினை யென்ப உளவோ கருவியான்
காலம் அறிந்து செயின்.”
— திருக்குறள்

Translated meaning (in my words): Is something not possible for a man, who knows the right tools and acts at the right time?