Thursday, May 15, 2014

The making of my Rummy game

Most good developers have at some time in their life created a game.  I decided I wanted to join that group so I set out to make something.

While a scroller could provide some problems I haven't solved before, or something 3D could give me a opportunity to use WebGL, I ultimately landed on a simple rummy card game.

My first draft used Canvas with GSAP, which worked well.  However I eventually found it is hard to determine what elements were clicked on when everything is drawn to canvases.  So... I reverted back to plain HTML and CSS transitions/transforms.

I also took the opportunity to write it with purely functional vanilla JavaScript.  In the past with anything of much complexity I always fell back to my OOP roots, but this worked well.

Something unique to this game is that the entire state is always saved in localStorage so anytime you navigate away from the page, you can navigate back and everything will be exactly as it was left.

So, here is my rummy game ( http://www.cecese.com/rummy/ ).