Citizens Cup is a skill based gaming app where you compete with other players by completing simple drawings. Player who achieves better results is a winner. There are options to compete for real money or just for fun.

Citizens Cup App Development

Core gameplay

There are game sessions which are happening daily at certain time. Time of the next game is available on the main screen of the app.

Each game starts from $1 stake from each player. If player wins the round against their opponent, this player is able to cash out $2 (initial stake + stake of the opponent).
Loser player is able to buyback into the next round, by putting $2 stake now, as next round is going to be played for x2 amount of the previous round.

Winner player decides if they want to continue playing into the next round or cash out and quit today's game session.  

Current game session is going to continue while there are at least 2 players who're willing to continue playing with each other. Though, loser player is able to buyback one time only, so player would not lose too much of their funds.

Technologies

We use Unity / C# for client side development and dotnet core / MariaDB / C# for server side business logic.  

For server-client communication we use HTTP requests and Websockets for bidirectional messages. We were thinking of using MQTT protocol specifically for that case, but considering the scope and nature of our gameplay logic we decided it's not going to be perfectly suitable for our needs. In case if we decide to decompose server side logic into micro services somewhere further in the development cycle we might reconsider using MQTT.  

On the client side we did implement bunch of UI components and used our material design implementation for Unity.

Challenges

There are 3 main technical challenges we encountered so far:

  1. Stable client-server communication using mixed protocols approach with websockets and http.
  2. Performant solution for real-time drawing on mobile devices.
  3. Scalability of the server side to be able to support thousands of players in real-time play sessions.  

We are going to describe solutions to the these challenges in separate blog posts.

Citizens Cup is currently available on the AppStore in the US region.