📜 ⬆️ ⬇️

As I entered the mobile gaming market, I stood and left. Yandex Workshop

Hi, my name is Vsevolod Shmyrov. In Yandex, I develop interfaces. But this post is devoted to how I just for fun tried to enter the market of games under Windows Phone. I developed a small arkanoid game. About a year ago I prepared a small report on this and presented it to my colleagues. The report covers all four stages that I had to go through: preparation, development, publication and after publication. Today I want to share this story with you. Immediately make a reservation that this is not a success story. My game never became popular, so I gave up the idea of ​​making money on it and made the game free.



To begin to present my game. It is called Pixelnoid . The gameplay is absolutely classic for arkanoid: the player controls the platform, beats the balls, the balls knock the blocks. The goal of each level is to destroy all available blocks. The game has a very unusual graphics, instead of a ball, a pixel, instead of a block, there is a larger pixel, all the pixels are multi-colored, and therefore it turns out to be such simple, simple images as in the title picture. In fact, it uses only 400 pixels. The game is available for the Windows Phone platform, starting with version 7.5. Initially, it cost about $ 1, although there was a trial and a free light version, but I will talk about this a bit later at the “after publication” stage. The game was developed from April to June 2013, in August I made all sorts of updates, fixed bugs and tried to somehow spread the game.
')


Under the cat you will find a story based on the report, its video and slides.




Training


It is worth telling why I started doing it at all. In March, I bought a phone based on Windows Phone and immediately noticed that there were almost no games in the market, especially Arkanoid games, and this is my favorite genre. And as a programmer, I immediately decided to fix it. Some arkanoid were, but for the most part they were ported with Windows Mobile, and it was awful. I have experience in game development, this is my hobby from a long-time pro, but I haven’t published it yet. I constantly rivet small toys to myself and played with them. Plus, I have some experience in, let's say, industrial game development: for two years I had been developing games for social networks in a previous company. I was also familiar with the development environment (Visual Studio), the .NET platform, the C # language, and XNA technology.

XNA is a toolkit that simplifies the game development process. Not a ready-made game engine, but a convenient interface to interact with two-dimensional sprites, three-dimensional models, sounds and other elements that may be needed in games. The last few years XNA has been very actively used to develop mainly for indie games mainly for Windows and Xbox platforms. This includes a framework that works in conjunction with .NET and a special version of the XNA Game Studio edition.

A lot of games have been created on XNA. For example, Torchlight (both parts) , Bastion, FEZ. But since this is Microsoft, I very quickly faced reality. I learned that XNA technology may close after some time. There was a rather muddy story. Officially, XNA was recommended to develop for the Windows Phone 7 platform, and for the Windows Phone 8 platform, some strange message appeared that Microsoft does not recommend using this technology and that it will work in compatibility mode for Windows Phone 7 applications. The problem was with the Silverlight technology, at some point it was canceled. But, nevertheless, this opinion did not prevent, because I very quickly found the project Mono Game . This is a free implementation of XNA, the interface looks exactly the same, in fact, I just disconnected from the XNA library project and connected the Mono Game project. Everything worked right away, no difference. And Mono Game, unlike XNA, is supported by a large number of platforms (Windows, Linux, OS X, Android, iOS, QUYA, PlayStation). This technology potentially allows me to enter other mobile markets with little effort.

I developed everything in Visual Studio as a matter of fact under Windows Phone 7 in the emulator. Developing for Windows Phone 8 will require Windows 8 with Visual Studio 2012. In the beginning, I tried to run all this in the emulator, but it did not work for me, because it required virtualization support. In some cases, I walked the fastest way. And then the fastest way it seemed to me was to put a 90-day Windows 8 on a laptop and debug the application on my phone. So I did, although then I still bought a full-fledged Windows 8 Professional.

Now a little about the store itself. The preparation stage is quite long. Before proceeding directly to the development, I collected data for about 3 weeks about what can and cannot be done, and that ultimately it can bring me. The Windows Phone store, like the App Store, checks applications before publishing, unlike Google Play. There were quite a few applications there, but most of them are just trash, crafts on the knee. The annual subscription of the developer then cost $ 99, and now has become $ 19 per year. Check usually 4 to 7 working days. In principle, this is not so much, especially compared to the Apple app store. I did not want to pay $ 99, so I began to look for loopholes how to do it.

And I very quickly found the program DreamSpark - this is such a small life hack. The program from Microsoft, which provides students with the opportunity to publish applications in various Microsoft stores. This program is valid for a year, as is the subscription itself. There was one subtlety in the fact that I was not a student, at that time I had received a diploma for a year and a half. I started looking for loopholes again and found again.

I turned everything through the Intuit site - this site somehow got the opportunity to distribute keys. To get the key, it was enough to pass several tests that were approved by Microsoft. There I passed the basics of HTML 5, a couple of tests on C # and basic JavaScript. I have been registered on this site long ago, so I only needed to pass 3 tests, the new user needed to pass 6 or 8 tests, and it still works, they also continue to distribute keys.

Dreamspark Buns:


On the registration process in the store as a developer, I will not dwell in detail, there is nothing interesting there. It was necessary to fill out several forms: information about yourself, your bank, etc.

The next stage is unlocking the phone. This is the last obstacle before the development. This is done very simply. After unlocking the phone, it becomes possible to install .xap files not from the app store, but from an SD card. This is used by pirates. On my HTC 8X phone model, there was no SD card slot, so I rotated everything, connecting the cable to the laptop, and assembled the project every time. It did not bother me.

Development


Finally, we come to the most fun stage - development. I did everything from April to June, mainly in my free time, on holidays, weekends and during holidays.

Since I did everything myself, I had to somehow plan my working time. I used the role system. I came home from work and decided that today I was a game designer. I sat down, created a new level, and suddenly I saw some bug. Then I wrote about him in the taskbar to a programmer who, perhaps, could have come tomorrow or the day after. Of course, if the bug was serious, then I transformed into a programmer and immediately ruled it, and then came back.

I made a lot of ToDo lists: on scraps of paper, on the web and in mobile applications. In the beginning, I tried planning, but ultimately I came to another way to manage tasks. I began to maintain a common list for each role. As soon as I finished the work, I wrote out what I did today. It turns out some system of encouragement. When more is planned than done, unwanted guilt appears. And when you write down at least one item from what has been done, there is a feeling of pride in yourself that you have achieved something, it is slow, but moving.

The gameplay of the arkanoid is clear: a ball flies, breaks blocks, when a block is destroyed, it can affect neighboring blocks. I have it and exploding blocks, and bomber-blocks that destroy all the blocks horizontally and vertically. There are blocks of ice that make all neighboring blocks very fragile. This all greatly dilutes the gameplay. In my version of the game there is one feature: the ball from the platform bounces not along the reflected corner, but as if the platform is slightly rounded. The closer to the center the ball hits, the straighter the rebound angle. When I did this, I did not think at all. But about three months after I developed this mechanic, I learned that there are others. For example, someone used a drop with a small angle randomly. But then it turns out that the player does not control the game at all; he can not direct the ball in the direction in which he needs.

As you can see from the screenshots, there are glasses in the game. Destroying one block, you get one point. If you manage to destroy the number of blocks multiple of five, without touching the platform, in addition you get the same points. Points were added to the game simply as a classic arkanoid element, they do not affect subsequent levels. There are not any popular stars and achievements, although, perhaps, it should have been done. This would help increase interest in the game.

Game architecture


The game in terms of software code is not very big. I have not used the MVC pattern. In general, this is the most popular pattern in games, for example, there are a thousand units that look different, but behave the same. I have an entity that looks like a presentation. She describes the color of the item. All elements in the game have some specific color and simple geometric shape. In general, I rarely differed from the model in terms of the fact that the ball has a certain square, which is used both for collision detection and for drawing this ball on the screen. Architecturally, XNA games look about the same. I say XNA, not MonoGame, because The interface and basic principles were originally set in it. XNA itself provides tick technology: two methods Update and Draw in the base class. The first method is responsible for updating the data on the “tick”, and the second is for drawing. XNA does not provide the essence of the "game element", but only tools for working with graphics, sound and text. I have a basic level element, a basic interface element, not everything is done well, but, nevertheless, it works. I can not say that during the development I had problems with negative results due to the initially incorrect architecture.

There is one point that I would like to highlight. When developing games for some reason, very often, many make such a simple mistake: for each “tick” they move game elements by a certain distance. For example, Mario runs to the ax to cut the bridge and throw Bowser into lava. In games, it is always necessary not to shift characters each tick by some constant, but always to set some speed multiplied by the delta between the current and previous ticks. This is necessary in case your game will slow down on any devices. In productive games it is very important. If someone had 10 FPS, and someone - 30, players will see a different result. For example, Mario will not reach the ax and will not save the princess.

To avoid this, I keep the position and direction. This is very convenient to manipulate in the sense that I occasionally need to create shapes that move at a certain angle from the direction of the ball, and it was necessary to create ball cloning bonuses. Those. ball in the air as if forked. I translated directions to radians, added some angle and then translated back for new balls.

Position.X += Direction.X * Speed; Position.Y += Direction.Y * Speed; … double ballDirection = Math.Atan2(ball.Direction.Y, ball.Direction.X); newBall.Direction.X = Math.Cos(ballDirection + Math.PI / 8); newBall.Direction.Y = Math.Sin(ballDirection + Math.PI / 8); newBall.Position.X = ball.Position.X; newBall.Position.Y = ball.Position.Y; 

Let's go back to the look of the game. As I said, the blocks come in different strengths, in my case they are marked with different colors. Blocks from the white-gray group have a strength of 1 (i.e., one strike is enough to destroy them), in green strength is 2, in blue ones - 3, etc.



The blue blocks in the center are just ice, which make all the neighboring blocks very fragile, i.e. white. This is a classic element of the gameplay Arkanoid, I have it just made in the form of pixels. When creating levels, I tried to simultaneously make the level visually beautiful, but not too simple or complex. When developing, I did not limit myself, brazenly took images from other games and used Internet memes.



I just drew the levels in the editor, the pictures were 20 by 20 pixels. I connected them to the project and when I first created a parsil image. Each pixel color corresponds to a specific type of block; only 400 pixels had to be processed. This is a very fast operation. It cannot be said that in some place in terms of performance, the game sags in some place during data processing.



The level description also includes an XML file that describes any data that is not very convenient to graphically indicate: the position of the balls on the platform from 0 to 1 and the location of the bonuses in the level. Bonuses are static (always rigidly tied to a position in the grid) and dynamic (randomly scattered over tiles without bonuses when starting a level).

Pixel colors


The picture below shows the whole level, consisting only of conditionally white pixels. All pixels with a certain strength have approximately the same color. It seems to be white, although it is clear that some blocks are not white at all.



I did it programmatically, the game did not use sprites. To be precise, there is one 1-by-1-pixel sprite, which I programmatically stretched to a certain size and tinted with the color I needed. Color received with a fairly simple function. In the example below, the values ​​just for the white block are set: from white to gray.

 r1 = g1 = b1 = 170; r2 = g2 = b2 = 255; … public static Color GetColor(byte r1, byte r2, byte g1, byte g2, byte b1, byte b2) { if (rand == null) rand = new Random((int)DateTime.Now.Ticks); float fRand = (float)rand.NextDouble(); Color result = new Color(); result.R = (byte)(r1 + ((r2 - r1) * fRand)); result.G = (byte)(g1 + ((g2 - g1) * fRand)); result.B = (byte)(b1 + ((b2 - b1) * fRand)); return result; } 

Therefore, every time, if you look closely, the picture always turns out to be a little different. Below is a video with an example of an interesting level, where there are key blocks and a block gate. When hitting the block key, the block gate is unlocked for five seconds and becomes available for destruction. Unlocking the gate triggers a visual update of the block, so if you repeatedly hit the key, you get something like white noise.



When developing, I needed to support all screen resolutions that at that time were found on the Windows Phone platform:





A few words about music and sounds. I don’t have music in the game, because my hands didn’t make it. There are sounds in the game, they were used with my favorite prefix - SNES. I found 256 samples and used them.

Publication


At a certain point, I realized that if I did not publish the application in the near future, I would have only two ways. Either I will cut the application endlessly, having gotten an incredibly cool engine for all occasions by the age of seventy (but by that time I will not need it anymore), or I will just lose interest and abandon the development.

The application form consists of four stages. At first, you need to fill in the most basic data: category, subcategory, name in Dev Center, and price (I set 34 rubles). I didn’t have a trial version yet, so I downloaded only the paid game.



At the second stage, the XAP file is loaded directly. I had two of them at once, since I simultaneously downloaded the version on pure XNA and for WP7. This form also indicates which platform versions and screen resolutions the application supports. Most of the information, including the application language, is taken from the project settings. It was also necessary to enter a description, keywords, download the icon (300x300), background (1000x800) and screenshots for all supported screen resolutions.

The third stage - age ratings. I only put down two CSRR (Taiwan) and PEGI. In the first, it was enough to select the desired item from the drop-down list, so I filled it out. And PEGI was necessary for me, since this rating is used in many European countries, in Russia and the USA, and it was to these markets that I was targeted. It was also easy. On the PEGI website, it was necessary to fill out literally one form (the presence of violence, erotica, drugs, alcohol, and the like).



In the end, I was given a download of a special PDF file that I had to upload to the app store to confirm the rating. I was also interested in the Brazilian market, but in order to get a rating for this country, it was necessary to send the completed form to the real address, and I did not get involved with this.

The last point is getting the key to the map services from Nokia. I did not need it.

After publication


I sent the app and waited for the appruva. On the eighth of August I received a confirmation letter. It turned out that when I filled out the form I forgot to uncheck the box “publish as soon as it becomes available,” so my game was already hanging in the app store.

Immediately after publication, things did not go very well, no one bought the game. I started looking for options to promote the game. First of all, I made a group on facebook. Only my friends zalaykali. I also uploaded videos on YouTube, this also did not bring much success. Next, I wrote about the game for a couple of thematic sites ( http://wpcentral.com , http://w3bsit3-dns.com ), where they reacted with great approval to the fact that the author himself came to advertise his game. There were many views, but the purchases somehow didn’t grow together. All August I fixed the bugs and made corrections to the game. In addition, I made a trial version with 2, and then with 5 free levels. Changed the name from “Pixelnoid” to “Pixel Arkanoid (Pixelnoid)”. I also replaced the seemingly beautiful icon with a slightly less pleasant, but more understandable one. This brought me 3-4 installations a day more, people began to realize that it was an arkanoid.



A little later, I also made a free light version: the same game, but with a different set of levels (there are only 15 of them). There I made a special button “more levels”, which opens an application store with an offer to buy the full version. Naturally, this game has become much more popular than the original version.

Windows Phone Store for each region has its own, below are the results for [arkanoid] in Russia, the United States and Britain. As you can see, the sample is slightly different, although Pixelnoid Lite is everywhere.



After a while, my game appeared on a couple of pirated sites, which I consider to be a measure of success.

A little later, I received a letter with a message that Pixelnoid will hang in the recommended games (the first screen when switching to the games section in the app store) in China. Later the same letter came about the UK and Australia. The graph below shows the bursts associated with my actions. The game began to grow slowly when the trial version appeared first, and then the light version, but the big bursts at the end are the result of the appearance in the recommended ones.



But downloads and purchases are different things. We bought the game for the month only 6 times, i.e. Even buying Windows 8 at a discount did not pay off.



A couple of months after I gave this talk, I decided to make the game completely free. The situation with purchases did not change for the better, despite the fact that I got into the recommended games section a couple of times. Of course, the failure of the game is to blame myself. Now, looking at the project, I see a lot of errors in the game itself, which I did not notice during development.

To sum it all up, probably, it is necessary to use simple truths that are understood by everyone without me. If you want to achieve some real return, you need to go into business with your head, and not to deal with it halfway. And this does not guarantee a result, especially if you do it alone and without much financial investment. I didn't take design seriously, and the result now seems obvious.

Personally, I believe that the WinPhone ecosystem is still "damp." Although since last year the situation has improved markedly. The store has a lot of applications and games from both major publishers and indie developers. The input threshold seems to be still lower than on Android or iOS.

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


All Articles