Ram Maheshwari Logo Image
Mohammad Shahriari

Versus

A turn-based strategy idle RPG.

Project Image

Project Overview

The first Rooster Wars game, was a HUGE hit in Iran's local mobile game market, cafebazaar. After about 7 years from the first game(which I wasn't a part of it's dev team), we started working on Rooster Wars 2 mobile game at Medrick Games.
After a while and for marketing reasons, the domestic game's name has been changed to "Versus" and the global version's name is "Mighty Wars".

I've been chosen as the tech-lead of the project. At the begining and in the prototype phase, I started to design the overall architecture. I have chosen Zenject as the dependecy injection framework and the back-bone of the code-base.

For the server-side, we used Nakama. Nakama saved us a lot of time at the begining. We didn't have to write the back-end code for player management and all these stuff. Besides, Nakama provides an interface for developers so they can extend the server's functionality by adding custom modules. We are currently using lot's of features provided by Nakama like groups, chats, storgae objects, leaderboards and... . We also extended Nakama's basic functionality with thousands of lines of back-end codes(typeScript).
Besides of it's benefits, Nakama(and generally, every other pre-built servers) bring it's own limits in comparission to a server app that you are developing from scratch.
Anyways, Nakama stayed in our project and currently is being used as our back-end application.

Project Image

The game is being played like this:
You will choose a deck of cards(heroes) plus a warlord(the boss of your team) and enter a match. In your turn, you will place one of your cards on one of the available cells of the game field. After that, your input will be locked, and all your "deployed" characters (the one you played this turn and turns before) start attacking. After each character attack ends, the turn will change. The match will be ended if one team's warlord dies.
You are playing against another user's profile which is given to you by the matchmaking system. Your opponent is not actually playing and no, the game is not real-time. You play agaisnt AI. Although we where thinking about a Mini-Max algorithm or something like that, we end up with a greedy AI, which actually plays really good!
At the time of writing these sentences, the game has more than 100 unique heroes. Beside their art, heroes has their own stats and skills. There are about 40 unique skill in the game - which I call them Base Skills. Each hero has a number of base skills, with it's own conditions, which determines how and when the skill will be triggered and how the skill affects the heroes on the field, or generally, the game state.
I am aware about event-based architectures and it's limits, but for the sake of speed, I have designed a gameplay system with an event system in it's core. There are events and event-listeners. We have events for every important thing that will happen during the gameplay. Like when a hero gets deployed, when a hero attack or when a hero gets healed. Listeners will(obviusly) listen to these events and they will do an action based on some conditions!
In this system, skills are event listeners. Consider a hero with Heal skill. Let's say this skill is described like this:
"When an ally hero deployed, heals all allies in it's column".
This skill will be triggered when a "Hero Deployed" event is fired. Then it will check the even's parameters to check if the deplyed hero is an ally. Then if all the consitions are satisfied, the "Heal Skill" will get all the ally heroes with it's same column (consider a grid-based game field) and heals them with the determined value.
I have also followed unit testing and practices of TDD for some parts of the project. e.g: skill system.

Project Image

Above paragraphs was the boldest things I wanted to mention. But we developed lots of interesting features which I can write about them in like 10 more pages! Thing like: - implementing analytics SDKs (Adjust, Flurry, Firebase, Crashlytics)
- conditional special offers customized for different types of players, based on their purchase patterns and their progression in the game. - liveops game modes like season pass. - Segmentation and Dynamic Discounts. - A/B test infrastructure - Cohort Management - DDA (dynamic difficulty adjustment) - Localization: using Unity's localization system, we localized the game for more that 6 different languages.


Make sure to check this article I have written about how we turned Versus offline version to online.

Project Image

Tools/Things to Mention

Unity
C#
Nakama
Zenject
Addressable Assets
Unity Localization
TDD
Git
Spine
Android
IOS