Day twenty one: pong

October 16, 2015

Who doesn’t know about that awesome little game called Pong. Using a paddle to outmaneuver the opponent and win the game. Today I recreate one of the most nostalgic games of all time!

live demo

This is the first game I build and it started off a bit roughly. First of all where to begin? I decided to use an HTML game framework instead of the standard HTML5 canvas. This choice would allow me to focus more on the mechanics of the game and let the framework do the heavy lifting. After reading the docs. Phaser seemed to fit the bill.

I like to do the easiest thing first and in this case it was to get the server up and running. I favor nodejs so the server is build on express. If you are new to nodejs then I would highly recommend checking express out. It’s an elegant way to start off a node app.

The next task was to deploy the application on the live server. Heroku has grown on me with their easy to use build packs and CLI tool. A few minutes later the server was up and running and pong was ready to be created!

Building the game was a bumpy ride. After a lot of tweaking and help from different online sources I got it to work and now people everywhere can enjoy a nice game of pong.

Thank you for reading and please leave a star on the repo.