Pong Game with SVG.js
We were recently introduced to SVG.js, a library for manipulating and animating SVG (Scalable Vector Graphics). The library boasts of having no dependencies and aims to be the leanest of its kind, doing the same things that Snap.svg and Raphael can do, but with half the amount of code.
To highlight some aspects of the SVG.js library, its creators have given us a neat tutorial on how to make a Pong game within their framework. Look how short the code is for drawing two paddles with different colors:
This version of the classic arcade game has some cool effects.
For example, the ball changes its color into that of the opponent while moving towards the other side.
Also, there is a huge color blast when the opponent fails to hit the ball back.
You can try the game yourself here.
Check out the tutorial here.