Tank Masters - a mobile puzzle about tanks

The story of how the creators of Berserk Online decided to transfer to tanks and what came of it.
As you know, any self-respecting game company should make a game about tanks. We were no exception - “Bytex”.
The game Tank Masters is a variation on the theme of the old classic DOS game “Alchemy”, but uses a setting of the history of the development of tank building. The game is very simple, the rules are elementary, so the list of elements and “recipes”, thoughtful gameplay, as well as graphics and sound are of primary importance in the game.
The idea
The general idea was formed very quickly, but the details changed repeatedly at the pre-production stage. Initially, one large branch was planned, in which all the large tank nations were mixed. This idea was quickly abandoned, realizing the need to display a huge number of elements in the interface, and settled on another option: one nation = one campaign in the game. As a result, "shoveling" a lot of interface sketches, we got an assessment in terms of interface convenience - a maximum of 12 groups of 10 elements.
Variants of the main game screen:

Then came the selection of elements that were destined to enter the game.
Since Bytex is a Russian gaming company, it was decided to start with the USSR tank school as the closest and most familiar. The selection of the main groups, including tanks, was not difficult. This immediately included cars familiar to many from the online game World of Tanks. Starting with the legendary "thirty-fours" and ISs and ending with prototypes A-20, A-44 and KV-13 that did not go into the series. Further, no less obvious “spare parts” for tanks were added: various elements of the chassis, engine and transmission compartment, guns, etc.




To increase historical diversity, eminent designers and famous events were added, one way or another connected with tank building:


Start
The most difficult and interesting, of course, was the process of compiling the reactions. Some of the already planned elements had to be removed, replaced by others to build more logical connections. Not without seemingly strange, but quite logical reactions.

When creating the reaction list, we also did not forget about the addictiveness of the gameplay, the involvement of the player and the motivation to use the tips. The number of available reactions at the beginning of the game is constantly growing, so the player just needs to collect the first 10-15 elements to get carried away by the process. This continues until the creation of the first tank, which, according to the canons of the World of Tanks, is the MC-1. Then the number of possible reactions is gradually reduced, so that after the discovery of a new key element, increase again and reward the player with the possibility of rapid progress in the game for his efforts. When there are few unknown elements, it becomes very difficult to find acceptable combinations.
The list of elements was originally compiled on a piece of paper in a box, which was very inconvenient for modification and verification. Therefore, almost immediately a tool was implemented for visual editing of sets and reactions.

Since we took such a large combine as Grails for a simple task, it is easy to guess that the framework features were used to a large extent. For the convenience of a game designer, you can edit elements using AJAX:

We began to deal with future errors in the backend using validation mechanisms. Also, in order to avoid problems in the future, filters were written that help find possible errors (broken pictures, forgotten descriptions); or a filter that displays items that do not belong to any groups.
It turned out to be useful to write scripts to search for elements that, in principle, cannot be obtained. The presence of such elements is a very big mistake. Initial elements (which also cannot be obtained from others) were marked with the “basic” flag.
Mobile app
The application is implemented in C # using Unity3D. Despite the presence of the 3D suffix, Unity is quite suitable for the development of two-dimensional games. The most important thing: if some functionality is missing in the Unity framework itself, you can find the plugin in the Unity Asset Store. Many of the plugins are free.
The choice of game architecture is one of the most important decisions that is made before the start of development. We studied a lot of similar games and decided that the option of creating different screens in different scenes does not suit us. This would not allow achieving the necessary smoothness of switching between screens and would greatly complicate the addition of transitions when changing them.
We realized something similar to the scenes, but by our own means. We have a screen manager, which has its own state machine, which can switch between screens. Each screen implements an interface with Hide, Show methods and has several events of the type: OnShow, OnHide. This provided us with the opportunity to use Mecanim to create animations of transitions between screens and simplified the work with them.
At the beginning of development, we had a difficult choice: to use well-known libraries that simplify 2D development (for example, ngui), or take a chance and try to implement everything using the Unity UI system that just appeared. We chose the second and almost did not regret it, although in the end the game turned out to be a mixture of sprite (used in the game process itself) and canvas (used in the menu, header, tooltips).
The application is extremely simple. In total there are 7 game screens that correspond to 7 controllers - MonoBehaviour. On the one hand, they subscribe to events from invisible objects, for example, to the events of a game store. On the other hand, if necessary, create pop-ups and dialogs, control sounds and music.
A bit about the libraries used. We selected plugins according to the following characteristics:
● the plug-in is developing, there is a community - Unity does not stand still, I don’t want to face the problem of incompatibility of the old version of the plug-in with the new Unity and the lack of desire for developers to upgrade the plug-in;
● the plugin is free, or there is a “free” (shareware) version for testing - to buy the plugin only in order to understand that it does not fit, it did not suit us;
● open source - not a prerequisite, but highly desirable. Sometimes it’s urgent to fix some kind of found bug, and it’s not always possible to spend a week waiting for edits from developers.
To store data, we use JSON, which is convenient to view through the eyes and easy to export from the reaction editor. To work with JSON inside Unity, our choice fell on JSONObject - it has everything you need and has a fairly high speed, a list with a reaction history, consisting of 2-3 thousand elements, it automatically processes in less than one second.
Android Immersive Mode- This is a very small, but very important plugin that increases the immersion of the player in the game; accordingly, the time spent in the game also increases. This is a required plugin for Android, so I had to dig into the source a bit, add "#if UNITY_ANDROID": without them, the plugin prevented the build of an iOS project. Dive mode is a mode in which your program is shown to the user in full screen, while no system panels are visible, including the navigation panel.
Facebookcan be used as a universal solution. Linking a player to a Facebook account allows you to publish achievements through the Graph API. In addition, social networks can be used to communicate with the player. In the case when a player has several devices (for example, a laptop with Windows, an Android tablet and an iOS phone), it is most convenient to do authorization through social networks. The FB team greatly simplified the life of developers by releasing a plug-in for Unity. Authorization / sharing - everything works out of the box.
Dotween- all animations inside the application were made using standard Unity, Mecanim tools and occasionally legacy animations, but it turned out to be easier to make the movement of elements in a spiral during the reactions with third-party plug-ins, for this, before starting the movement, several points are created along which DOTween builds a path for the object to move.
Soomla is a "showcase" that allows you to connect the program to several "markets" at once: Google Play Market, iTunes App Store, Amazon Appstore, Windows Phone Store. In our opinion, this is the only plugin that combines support for so many stores, has a good community, is rapidly developing, and even free.
To translate the application, the SmartLocalization library was used.. There are source codes on the github, many positive reviews in the asset store. There is export / import to csv, it works almost without comment. Initially, the translation of elements was performed in the element editor, but then the export was written in haste to the XML that is understandable for SmartLocaliztion.
response.addHeader("Content-Type", "text/xml; charset=utf-8")
def xml = new MarkupBuilder(response.writer)
xml.root() {
for (def o : objects) {
data(["name": o.key, "xml:space": "preserve"]) {
value(o.value)
}
}
}
response.writer.flush()
Further, the translations were imported into the Unity environment and edited on the spot. Thanks to this, it was possible to see if the translated text somewhere went beyond the scope, and how everything would look in the end.
Art style
After the list of game elements became known, two of our artists began work on the graphic design.
First, several sketches of the game windows were drawn to determine the appearance of the game. As a result, the main colors in the design of the game were light gray tones and khaki so that the small text was easy to read, illustrations on a light background were clearly visible, and shades of green caused the player to associate with a tank theme.
Choosing a suitable visual style, we began to draw the remaining windows of the interface and work on illustrations of objects in parallel. It was decided to portray tanks and other objects in the style of comics to match the simple mechanics and general mood of the game. For tonal transitions, strokes were used instead of gradients (we borrowed this technique from illustrations of the old technical literature). So that the small details of the tank were visible on the phone screen, in the illustrations we enlarged them a little, the chosen style did not contradict this.




As soon as ready, graphic content was transmitted to programmers and miraculously appeared in the game. Day after day, the number of elements in the game grew. Subsequently, each tank acquired camouflage, which diversified the game graphics.
All the animation in the game is made on Unity, which suits both programmers and artists. Artists liked the convenience of working with a timeline window, similar to the Adobe AfterEffects or Photoshop CS6 window, programmers - no need to look for ways to import animations into Unity.
Voice acting
At the beginning of development, we took the voice acting and music from our other project. The final version we ordered a freelancer. When he provided the first options for voice acting, it turned out that the sounds differ in duration. And worst of all, their duration was different from the sounds we used and, accordingly, the animation did not fit. At this stage, we gave the freelancer an application with the provided set of sounds. Subsequently, all sounds were normalized in duration and volume, and several new voice ideas were proposed.
Readiness No. 1 and release
As a result, combining all these parts, we got our game. Next, the assembled application was sent for testing to get through fire and water. Testing was conducted on more than 30 different devices. As a result, we had to compress some pictures, since only an artist could notice the difference by eye - this saved us about 40MB of RAM. Then we combined the pictures of the elements with sprite sheets, which allowed us to reduce the number of draw call calls c ~ 430 to ~ 80. They added the removal of objects located outside the scene, although they were not visible, each of them added additional draw call. Now the game feels good on the iPhone 4, and works on Android with 512MB of RAM.
Now that the vigilant and meticulous testers are happy with everything, it remains only to fill in the application on various trading platforms and wait for an exciting moment of launch.
Try to plunge into the wonderful era of the first half of the twentieth century, when tanks turned from huge monsters into real war heroes: tankmasters.ru/?utm_source=w1
And your questions, impressions and comments, as usual, are accepted below.