tl;dr: I made a Spot it game clone. Go give it a try
Our family purchased the original Spot it game a while back and after playing it for a while I started trying to figure out how it worked. Â I was fascinated by how there could only be one match no matter what two cards you looked at.
From their website: “There is always one, and only one, matching symbol between any two cards!” Wait, out of 55 cards if you grab any two cards there is only one match between them? How is that possible?
Finding out how it works
I went to the internet to find out how it worked. I found several discussions about it that were all above my mental capacities for math. Then I bumped into an article called Spot-it – How’d They Do That by RadiganEngineering that had examples of what the cards would be for different item counts. Well, if I didn’t have to figure things out, I could do something with that.
Making my own version
I thought it would be really cool to make my own Spot It game with my own pictures. So I started digging into making a web version that could accept input and generate the game for me to be printed out. After way too many hours of playing with the code and neglecting my family, I was able to create a Spot it game clone. It allows you to provide your own images or words and cards will be “randomly” generated. I used the structure from RadiganEngineering but randomize the card order and randomize the order of the items within each card.
Naturally I had to keep adding functionality, demo content, saving the data locally, pass content in via the URL, load demos via URL, drag and drop images, etc. The basic card generation and game I had done in a day, all the other stuff took too many weekends.
I hope this is of benefit to others. I found this blog post about creating a Spot It game with family pictures. It looks like it took a LOT of work to make that happen. Hopefully my site allows similar creations in a fraction of the time.
Technical details
I don’t pretend to think this is perfect. It was hacked together pretty quickly despite it taking so long. I debated between using newer technologies (SASS, ES6, etc) to help myself improve in those areas, but for now I decided to leave it as basic JavaScript so that it is easier for others to understand. Some day I may make it fancier. So for all my techy friends, don’t mock my lack of using the latest and greatest, it was for the greater good 🙂 Some day it will bother me enough to update everything, but for now it is what it is.
It is entirely done client-side via JavaScript. Nothing is sent to the server. Â Most of it is custom written, but I did find an amazing drag and drop library called Dropzone that helped out a lot with some cross browser issues.
If you have any feedback, questions, etc you can find me on twitter, post a comment below, or give feedback on the GitHub project.