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 ( ).


  1. I thought your blog was dead! Thanks again for your chrome flashcards experiment, used it as a launching point for a CS50 project.

  2. Must say you have created a good and simple website for playing rummy card game and we can see the efforts you have put in this website. But here are some suggestions that I would like to give to make your site better. In rummy a player always gets odd number of cards like 13 or 21 cards but in your website a player get 10 cards. Therefore at the end a player plays with just 1 card like I experienced while playing on your website which is wrong. You should check out popular rummy playing websites to know the technicality which will help you perfecting your website. I would suggest you to check out as I feel it has the best UI and UX while playing rummy. Keep up the good work!!

    1. Thanks Rajnish. Are you thinking of a specific variant of rummy? Most rules I have found specify 10 cards when there are 2 players.

  3. Hello,
    This is a nice and handy list of post ideas. Really an amazing list of to-dos in case If anyone is blank of Card Games play ideas, your suggestion will help them with couple of new ideas. Thanks for sharing. I agree with Rajnish that is the best place to have fun along with the chance to earn money. Hope I’ll be more active with my keyboard now.

  4. This comment has been removed by a blog administrator.

  5. This comment has been removed by a blog administrator.