📜 ⬆️ ⬇️

How I did the Brick Game on Unity3D for Android and got a lock from Google

Wikipedia: Brick Game (“Playing with Bricks”; it is also called “Tetris”) is a gaming device that runs on galvanic elements, equipped with several pre-installed games and a black and white (monochrome) screen. On such devices there is almost always a game similar to Tetris, although with it there are often other games. There are different types of devices with different numbers of games.

I will talk about how (and why) I created the Brick Game simulator on Unity3D for Android with Tetris, snake, races, tanks and other games, about the monetization experiment, and also about what Google Play can block such an application and how then unlock.

Prehistory "Tetris" without Tetris


Once I wanted to play Tetris (at first it was Tetris, not the device that we called Tetris in childhood). Rummaged through Google Play, found only two official versions from EA games. I was amazed at the number of useless (in my opinion) fashionable fiches and the availability of in-game payments. In Tetris! In general, the sensations were "not the same."

And then I remembered such a thing as the Brick Game and how great it was to play Tetris. I thought that there must be a simulator on Google Play, and I was not mistaken. There were many such simulators. I put the most popular and ... did not find Tetris among the games. In addition, in the middle of the small screen there was a menu of buttons with modern smoothed fonts, with which it was necessary to start the game, switch the sound, and so on. Not realistic. Strange, a million downloads and such flaws. I checked the rest of the simulators - even more pitiable and Tetris is almost nowhere to be found, and where it is, it’s crooked, it’s inconvenient to play. Not to mention the realism of the graphic embodiment.
')
In general, I decided to fill the gap and create my own simulator, with a good Tetris and a realistic screen, for myself and for all.

From Wikipedia (and later in my own experience, read about it below) I learned why there is no Tetris game in many popular simulators.

In 1996, the alleged author of Tetris (by the way, came from the USSR), together with a certain Henk Rogers (born Henk Rogers) created abroad the company The Tetris Company LLC and Blue Planet Software, trying to profit from the brand Tetris. The Tetris Company LLC (TTC) has registered the word Tetris as a trademark. Since then, several companies have purchased a trademark license from TTC. According to American laws, the game cannot be protected by copyright (only patented), so the main property of the company is the Tetris trademark. Despite this, TTC pursues clones of the game under names other than Tetris. In May 2010, a TTC lawyer sent a letter to Google demanding that all 35 clones of this game be removed from the Android Market, although their names are not similar to the name “Tetris”.

Development. Tool selection


Initially, I had to choose between 1) Unity3D and 2) Android + any library or on the Android API goal.

I previously had experiments with Unity3D and C # and Java + Android, so I considered these options.

1) Pros:
+ Many ready-made functions that will be useful for such a simulator
+ the ability to instantly test the application in the editor directly on the PC

Minuses:
- big weight of * .apk file - from 20 MB
- longer run
- gluttony (the battery sits faster, more heated)

2) Pros:
+ small weight ("pay" mainly for the weight of graphic files)
+ high startup speed and battery saving

Minuses:
- you have to write more code (more precisely, abstractions, or drown in the procedural code)
- slow testing process on an emulator / device

Surely not everyone will agree with my assessments, this is a matter of personal skills and taste. I donated size and gluttony in favor of speed of development and chose Unity3D.

Development. Graphic presentation


I started by drawing a skin with buttons and a screen. He drew in a vector graphic editor, drawn all the details down to each cube on the screen and the sticks in the digital LCD blocks. Full photorealism could not be achieved, especially with the buttons, but overall it turned out well. Exported to PNG and threw it in Unity, on Quad, as a texture.



Later added two more skins - with a large screen and rotated.
Skin with a large screen (can be convenient on devices with a small display diagonal):



Without hesitation, the screen decided to animate with the help of small squares with inactive pixels. That is, the substrate I have consists of active pixels, and on top of the objects with inactive pixels, which I switch visibility, namely the enable flag. The display class contains the most common modifiable array of 200 elements (10x20) (cell by cell), it is convenient to work with it.



I suffered a little with the alignment, maybe there were small displacements somewhere, but they are not noticeable, because the most important thing is that the active pixels, which are brighter, are placed strictly along the grid and this is sewn into the picture, therefore scaling (using high-quality anti-aliasing) should not spoil the alignment of the squares. I checked - it happened, everything is smooth and neat, it pleases the eye, the solution "in the forehead" worked the first time.

There is a small shadow around the buttons in the unpressed state. To animate the buttons I added a mask with a hole for the button and shading that appear when pressed and make the button visually pressed into the case.



The colliders of buttons are spherical and radius slightly protrude beyond the buttons to make it easier to get into (this is especially true for the top row of small buttons).



Development. Sound


While working on the application, I found a real Brick Game on the city market, brought it home, and recorded the sounds of pressing and releasing real buttons. Many players, by the way, were annoyed by these sounds, I released an update that disables these sounds in Mute mode, but even through the sound of the device itself, the sound of pressing buttons was punched through and people asked to make these sounds quieter. And I liked these sounds so much that I didn’t want to dull them.

Squeak generated in advance by the simplest synthesizer (mixed several types of waves).

Development. Logics


The first game I added to my simulator was, of course, Tetris. Here I tried: a symmetrical system of turns, rebounds from walls and the floor when turning, turning 180 degrees in a narrow well, fair generator of the choice of a figure, sliding after a soft fall, control (good responsiveness in general, a sharp drop by double pressing down, turning back side up) and even the famous T-spin seems to be able to do. As a result, it was more convenient and more pleasant for me to play this game on my simulator in a smartphone than on a real Brick Game. Not to mention the official Tetris for Android which looks more like a circus performance than Tetris (IMHO).



In Unity3D, you can use C # and all the advantages of OOP, which I did. I wrote the base class for all games (with the banal name Game) and added them one by one, inheriting from this class.

I added a snake, races, several more types of Tetris (for example, with figures from 5 blocks), pong, later tanchiki, arkanoid ... I also shoved in a couple of games unusual for this device: Digger and Bomber. Digger turned out to be super-complex and incomprehensible, but decided to leave it as a highlight.

Made a standard screen fill animation when losing (with the representation of the display in the code as an array, it was elementary), explosion animation for racing and a couple of other games. Sprite, AnimatedSprite added to classes. For example, each Tetris figure I have is a Sprite, and after shifting this sprite, you can check for collisions with the playing field and react accordingly.

In general, the development of logic went like clockwork, and a month later, from the start of development, I posted my simulator on Google Play. The first icon was a screenshot from the game, eventually drew a stylized icon more beautifully (while drawing, dreamed about the application with exactly this design, a smaller screen and three buttons which should be enough for a tetris and a snake in principle):



Promotion


Of the 39 thousand, only a couple of hundred people came on the links from the Internet, which I left on various sites dedicated to Android-games. All the rest - independently found the application in Google Play search.

Monetization


I wondered how much money could be earned on such a game, because all simulators were full of advertisements to disgrace, advertisements of all kinds, and it seemed that there was some sense in it. I connected Google AdMob and according to my calculations it turned out that if you close up the entire application with advertising, you can get at least $ 5 for each thousand downloads. Less advertising - less money. Make advertising 5 times less, it will be roughly $ 1 for 1000 downloads. Million downloads = $ 1000. Or $ 5,000, if users manage to feed advertising with small patches of the game itself. This applies only to AdMob, they say there are more generous affiliate programs, and I also had most of the traffic from the CIS countries and Brazil (for some reason), the rates for clicks from these countries are low, this also affects.

You must have been embarrassed that I only consider downloading at my place. As shown by my statistics from regular users, the inflow is small, mostly the newcomers are playing, half of those who download all delete the application immediately or the next day, and those who have left play so rarely that they have little effect on the statistics.

A month later, I decided to turn off advertising in order not to spoil the application. I note that after disabling advertising, the average rating increased and the popularity of the application also went up, users began to note the lack of advertising as one of the exclusive advantages of my simulator.

Lock and unlock




On October 4, the game was blocked and Google Play Support sent me a letter stating that my app “has been removed from Google Play” because it violates our metadata policy. You are a compliant update. ”, Which means something is wrong with the description or title. No details what exactly they did not suit, they did not report. Like, read the rules, guess yourself, correct, or file an appeal.

I immediately suggested that the cause of the Tetris game in the simulator and the mention of it in the description. But this is a device simulator, in which there was always Tetris (there was nothing in the first Brick Game except Tetris)! And it just so happened that the Brick Game device was called “Tetris” here, even though it was wrong, it got acclimatized, it became nominal.

But still I didn’t know for certain the reason, therefore, without changing anything, I appealed.

After 2 days, the answer came:



Translation : We do not allow applications with metadata that are deceptive, irrelevant to the application, redundant or unacceptable. Metadata includes application description, icons, screenshots and promotional images.
For example, the description of your application has references to Tetris.
Please remove extraneous keywords ...

This is such an insanity, you cannot write that you have Tetris in the game, even if it is there, but it is better to remove it at all, probably, so that there will be no problems in the future. It would be possible to save time if they immediately wrote that the point is in the word tetris in the description.

Subject to censored description:



The application is then unblocked. I do not exclude that in the future they can slap a lock for the fact that there is Tetris in the screenshot or that it is in the simulator itself.

Links


Links removed on the advice of one commentator, so as not to break the rules.

Source: https://habr.com/ru/post/312554/


All Articles