Memory Game: Gotta Pair 'Em All!

4 minutes read
Oct 05, 2021

Ready for the new tech challenge? Great! Now, what was it again… hmm… it’s at the tip of our keyboard… we’ll get there in a second, no biggie.

Anyhow, the players should match the corresponding pairs of cards, given that their MEMORY GAME (aha, that’s the name of it!) is better than the one we’ve just demonstrated. Let’s get you briefed up and see if you are up for the task. 


Brief

As you already know, a lot of games come with a set of difficulties. This one’s no exception, and we’ll sort them out by creating three different levels. The number of total cards, i.e. pairs is what sets them apart since the player will need both more concentration and time to finish each round:

  • Level 1: 4x4 pairs

  • Level 2: 6x6 pairs

  • Level 3: 8x8 pairs

Notice that this isn’t classic leveling, meaning that people playing the game can instantly hop on to the final stage (8x8). You should provide them with this option in the main menu, designed by your personal preferences.

Once they make a choice, the appropriate grid will appear on the screen. Now, let’s talk about how the main characters a.k.a cards are supposed to look like. There are two sides:

- Front, that has a picture on it, which should match with its twin

AND

- Back, the unique background for all the cards in the game. 

The next step is to really spice things up for the players, you ready? Every level should start with all the cards turned downwards! We bet that you didn’t expect that kind of plot twist.

Now that we’ve got that covered, let’s give our contestants some true, unrelenting power: when they click on the card, it will flip and show its front side! But, they will be disappointed to know that only two cards can be opened at the same time. We have to nerf them right away, or the game will be too easy.

There’s also a special anti-cheat system implemented: if the user makes no moves for one second, or tries to open the third card, the previous two opened will automatically close. Mind you, this scenario relates to when the shown duo is different from one another.

Once they are the same, we will reward our champions by letting the cards stay on the grid, facing upwards. That’s all there is to the game’s mechanics, so it’s time to redirect our attention to the other possibilities of the main screen.

Normally, the player would like to know how much time elapsed since they first entered the level, as well as the number of clicks (moves) they’ve made. You should also take notice that those are living beings who want to pause the game whenever they feel like it. The reasons could include, but are not limited to:

  • Their moms losing patience after calling them for dinner three times already

  • Relaxing and realizing it’s just a game

  • Taking a deep breath and focusing on beating their previously set record (more info soon)

Once they decide to take a break for whatever reason, they should be able to choose between continuing, resetting the level, or rage quit… khm, stopping and returning to the main menu where they can choose something easier, hah! Joking, joking… 

For those who bravely persevere until the very last pair of twins, the game ends when all the cards are facing upwards! Modest as most gamers are, they should be able to boast about and share their results on social media pages, such as Facebook and Twitter.

Once their fifteen minutes (more like seconds) of fame are over, it’s time to face them with the unrelenting truth called: the ranking list. It should pop up right after they have shared their results, alongside the possibility to enter their name, given that their score is in the top 10.

Please keep track of the scores within a specific file, so that you can always know who are the ten people with the best memory. Who knows, you might get teleported into the past, with no smartphones and a huge grocery list, so keeping track of their success might come in handy!

Of course, the ranking list should differ based on one of the three levels, meaning that there should be three different ones. The first criterium is the number of clicks, while the other one is the elapsed time. Once the players are done with checking out the results, they should be able to return to the main menu, and try to be even better next time!


Bonus

Yes, there’s a bonus involved. We know that everything so far is enough on its own, but feel free to play around more for some extra recognition! You could:

  • Implement an animation for when the cards flip over. 

  • Create custom transitions between the game’s screens


Hopefully, you have remembered (it’s an obvious pun) all the information you need about the game. If not, feel free to go through all of it once again and create a super-duper challenge for future contestants. Most importantly - have fun!

IoT Security Issues