I have been studying HTML5 and javascript for quite some time. Based on what I knew and a game I liked in Ubuntu, Kollision, I started coding it in JS. The game is almost complete. I need to fine tune it, add more collision corrections. But I have learned a lot from this game. The source for the game is available at GitHub. Here I have used basic vector physics, to check and handle the collisions. Here’s a screenshot and a JSFiddle :