The new chess experience: a platform handling hundreds of 4-players chess games online

Quaternity

Quaternity is a chess game online. The mechanics of the pieces follow that of regular chess. That’s it for the similarities! Because Quaternity brings a new chess experience to its users, being played on a 12×12 board and with  4 players.

About the project

When Quaternity approached us, they had an offline, physical version of the chess game and wanted to bring it online. We started with developing the back-end of the app, with a complex game engine at its heart. Later on, the whole front-end development was moved to Neoteric as well so we could take care of the platform development holistically.

Our tasks

Conducting R&D around the engine

There are many engines for 2-player chess online but no clear benchmarks when it comes to the 4-player games so everything had to be designed from scratch.

Backend development

The main task was to build a rules engine for Quaternity and a computer-based player following these rules.

Creating a computer player

At this stage, the bot is not expected to be a good player –  just good enough to occupy a seat at the table following the engine rules. In the future, it will be possible to choose a player of a certain level.

Frontend development

As the engine is the heart of the platform, it’s the frontend part that lets the users play and interact with it. Based on the delivered designs, we created the user interface.

01

Challenges

1. Lack of existing engines for 4-players chess

With no existing engines for 4-players chess, it was necessary to write everything from scratch. Every rule of the game had to be taken into account and validated by the engine. The engine was supposed to suggest the possible moves, prevent users from making forbidden moves, and keep control over the time and the order of the moves.

The bot – known as a computer player – also needed to follow these rules, making it possible to play the game even without having 4 real players as opponents.

2. Engine’s efficiency

In the case of an online game, it’s not enough for the engine to work based on the set of rules. It needs to do it almost in no time so the users don’t experience any lags. That’s why the engine’s performance and efficiency were of the highest priority. Our goal was to validate moves in less than 0.5 seconds.

3. Scalability

In order to support Quaternity’s business goals, the platform needed to scale to handle more games at the same time, with thousands of users playing simultaneously, and still keep high its performance and efficiency. The aim of the system was to be able to horizontally scale to 10k people.

4. Ensuring users’ engagement

One of the goals was to build a strong community of engaged users around Quaternity. In order to achieve this, we needed to provide users with different sorts of interactions – with real players who can be invited to join the game or with the bots – and enable running chess tournaments.

Neoteric is a critical player in this project. This project is in a complicated niche, and their team did extensive R&D for it. They're a trusted vendor who makes a significant impact.
Shreyas Kumar - Quaternity
Shreyas Kumar, Head of Product & Engineering, Quaternity

02

Solutions

1. Building an engine for 4-players chess from scratch

As there were no existing engines to integrate with, we developed a new one. The engine is based on a set of rules, both “standard” chess rules and the ones specific only to 4-players chess. With every change on the chessboard, it needs to validate the possible moves, suggest them to the user, block the forbidden moves – and do it in no time (0.5 seconds, to be precise) so that users do not experience any delays. Additionally, it controls the order of the moves and time limits.

The players can invite each other to join the game and if they don’t have enough people to start the game – a bot will join them.

2. Autoscalable engine

The system that we created uses as many instances as required to handle all the games going on. When the traffic is lower, the number of used instances decreases. Thanks to that, the engine remains efficient even with thousands of chess games going on.

3. Testing the platform with early adopters

Before the official release, access to the platform was granted to those who have already played the board version of the game. As they already knew the mechanics of the game, the entry-level was relatively low for them.

4. NFT-powered payments

To support the development of the game in a crowdfunding-like way, users can buy art tokens.  The tokens will have their representation in the game – the players will be able to integrate their wallets with Quaternity and set the artworks as a background for the chessboard in the games they create.

Technology we used
Java
Spring
React
AWS
03

Project Results

Successful release and positive reception

The platform was already released and the feedback from users is positive. Among the players, there are even chess masters such as Alexander Morozevich – a Grandmaster, a two-time World Championship candidate, two-time Russian champion who has represented Russia in seven Chess Olympiads, winning numerous team and board medals. His Quaternity game stream was watched by over 4000 people.

High efficiency scores

The validation of moves responds in less than 0.5 seconds. With such a short engine response time, the users do not frustrate over the lags so they can fully focus on winning the game. What’s most important here, though, is that as we eliminated all the logical errors from the engine, the system itself does not affect the game and its final results.

Running chess tournaments

The first four-player chess tournaments have been already hosted on the Quaternity platform.

It is such an interesting project and yet so much more is there to come! We’re working on the lobby feature to help people meet and play against each other, the tournament mode, and official ranks. I’m really proud to be a part of this project.

Dawid Zwoliński, Software engineer, Neoteric

Discover our
other projects

Helping the world’s data connectivity leader boost their sales with a new demo tool
Find out how we helped the world’s data connectivity leader boost their sales with a new demo tool. Ready to boost yours too?...
Migrating the biggest online yoga studio in Europe from Teachable to a custom platform
Read the story of migrating an online yoga studio from Teachable to a custom platform that resulted in 10x times churn reduction....
Using predictive models to reduce customer churn by more than 20%
Read the case study and learn how to use predictive models to reduce churn by more than 20% and get 10x return on your investment....
clutch logoTop Artificial Intelligence Companies 2023
clutch logoTop AI Companies 2023
clutch logoTop Web Developers 2023
clutch logoTop Web Developers 2023