< Back to blog
Sergey GornostaevSergey Gornostaev Full-Stack Developer

KeenEthics Experience-Sharing: “Find the Same”

“Give a man a game and he’ll have fun for a day. Teach a man to make games and he’ll never have fun again” (Reddit community).


How It All Started

I have decided to launch my own project to have a rest from work and to build an application that I like. My first idea was to create something similar to the app Quiz your English with a detailed analysis and explanation of each task after the game is over.

I have chosen the technology stack that is the clearest and most convenient for me in order to focus on the idea instead of reading through documentation and best practices. I had experience in working with Meteor, and I have developed a few apps for clients. Moreover, I consider Meteor to be the best solution for building up prototypes or for developing a reactive system.

This is why I started with Meteor and React, which I have been working with for a few years while developing software commercially at KeenEthics. Also, I tested a few ideas from Cult of Coders, so I chose Grapher over the publish/subscribe model.

Having worked on the idea for two months, I realized that I had no motivation to finish even the minimal functions of the project. The changelog was growing at a rapid pace, and I sometimes tried looking for a person to assist me with the project. Yet, eventually, it seemed that my path came to a dead end, so I decided to give up on this idea. As for the application basis that I had developed by that point, I decided to use it for something simpler, which would not require any content management.

Me and my children, we often play a game where each player opens two cards and has to spot a pair of the same pictures. One time playing this game, I understood that this idea could be implemented in the app.

Searching for such apps in Play Store, I did not find a lot of competitors. On the one hand, it raised doubts “Why nobody has developed it yet, what is wrong with this idea?”. On the other hand, I realized that I could enter an almost free niche and easily reach my target users.

Technical Aspects

According to my idea, the game should feature two real-time players and the playing field of 16 cards. Each player has some time to open two cards, and if a player finds the same pictures, he or she holds the right to continue playing their turn. Otherwise, it is the other player’s turn.

This part of mechanics is where the most typical problems of real-time games appear. The app should follow players’ pings and make predictions for the interface to be as responsive as possible. The basic behavior of Meteor apps with their Optimistic UI did not suit my needs because I wanted to create a monolith server to control everything on the client. On the one hand, it would make the system better protected, and on the other hand, it would let me fully use the basic possibilities of Meteor.

One should not care about when and how to send data to the client. Instead, it is necessary to write proper requests only once, which would track all the data changes. In this way, I created the basic mechanics of the app in a few days, and it was truly inspiring.

Also, I had something new to learn. I faced a problem that I never experienced before. That is, the completion of functions on the server was delayed. To send the player’s action automatically to the server, I needed to create a mechanism that would keep track of time and, at a certain point in time, run the necessary functions. Having checked different options, I decided to use Redis to store tasks and Bull to manage the queues of these tasks. This is how I developed a larger but more fault-tolerant system than setTimeout.

With the help of Bull, I can delay the completion of tasks, set repetitive events, and monitor the statuses of all task queues. At this point, I am using three queues: for the timer during a search, for the timer that manages all game timings, and for the bot timer.

Keeping track of task statuses is one of the most important functions, which helped me to make the application fault-tolerant. If for some reason one of the tasks cannot complete the function, Bull reports the event, which makes it possible to record the error, to analyze why the error occurred, and to reload the task or the process. In this way, you always have a chance to fix the situation.

Today, I continue working on the game, but now it is more than just developing the application. I am working on the design, improving systems responsible for real-time functioning, and doing stress-tests to identify the weaknesses of the app.

Organizational Aspects

Throughout the development process, a few questions have appeared, which, to be honest, I should have answered before I started to develop the app. These questions are related to positioning, to the audience that I want to target. The motivational mechanics of the game and the visual component in particular greatly depend on target users. Yet, I am not a start-upper and I do not aim to build a business, so I did not have enough experience to predict these issues.

Later, I chose to enter the broadest niche possible and to target children in the age of 8+. I decided to make the card pictures really childish for the youngest players. At the same time, they would resemble familiar stickers in messengers so that teenagers or adults would also enjoy playing the game. Luckily, when I just started working on the game, my old friend, whom I worked in a game development company with, came back from China to Lviv. She is an artist, and she gladly agreed to help me with the game design.

Some aspects I have copied from Golf Battle, so I got a few card stacks with a different plot and value. I decided to give points to players not only for winning the game but also for spotting the pairs of the same cards. This is how the user would get motivated not to finish the game when the majority of cards was already opened by their opponent, and the player would receive an award for their effort.

From the very beginning, I aimed not to use aggressive monetization. I had an idea to offer players to watch an ad after the game, which would give them a few extra points. For now, I did not change my mind, but it is still only in my plans.

Today, I am at the primary stages of game development even though it has been almost half a year since I started this project. There are a lot of plans ahead, and I hope to implement all of them.