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

    Hi, my name is Vsevolod Shmyrov. In Yandex, I am developing interfaces. But this post is about how I just for fun tried to enter the Windows Phone games market. I developed a small arkanoid game. About a year ago, I prepared a short 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. I must say right away that this is not a success story. My game never became popular, so I abandoned the idea of ​​making money on it and made the game free. First, I’ll introduce my game. It is called Pixelnoid.



    . The gameplay is absolutely classic for the arkanoid: the player controls the platform, hits the balls, balls knock down blocks. The goal of each level is to destroy all available blocks. The game has very unusual graphics, instead of a ball, a pixel, instead of a larger pixel block, all the pixels are multi-colored, and therefore it turns out to be such simple pixel-based images as in the title picture. In fact, only 400 pixels are used there. 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 later in the post-publication phase. The game was developed from April to June 2013, in August I made all sorts of updates, fixed bugs and tried to somehow distribute the game.



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




    Training


    It is worth telling why I even started to do this. In March, I bought a phone based on Windows Phone and immediately noticed that there are almost no games in the market, especially arkanoid, and this is my favorite genre. And as a programmer, I immediately decided to fix it. There were some arkanoid, but for the most part they were ported from Windows Mobile, and that was awful. I have experience in developing games, this is my hobby from a long-standing pro, but there has not been a publication before. I constantly riveted small toys on my own and played them. Plus, I have some experience, let’s say, in the industrial development of games: in the previous company, I developed games for social networks for two years. I was also familiar with the development environment (Visual Studio), the .NET platform, the C # language, and the XNA technology .

    XNA is a toolkit that simplifies the game development process. Not a ready-made game engine, but a convenient interface in order to interact with two-dimensional sprites, three-dimensional models, sounds and other elements that may be needed in games. Over the past few years, XNA has been very actively used for development 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 editor.

    XNA has created many games. For example, Torchlight (both parts), Bastion, FEZ. But since this is Microsoft, I quickly came across reality. I found out that XNA technology may be shut down after a while. There was a rather muddy story. Officially, XNA was recommended to be developed 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 applications for Windows Phone 7. There’s a similar one the problem was with Silverlight technology, at some point it was canceled. But, nevertheless, this opinion did not hurt, because I very quickly found the Mono Game project. This is a free XNA implementation, everything looks the same in the interface, in fact I just disconnected the XNA library from the project and connected the Mono Game project. Everything worked right away, there is 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 easily enter other mobile markets.

    I developed everything in Visual Studio essentially under Windows Phone 7 in the emulator. For development under Windows Phone 8, you will need Windows 8 with Visual Studio 2012. At the beginning, I tried to run all this in the emulator, but it didn’t work for me, because virtualization support was required. In some cases, I took the fastest path. And here the fastest way seemed to me to put the 90-day Windows 8 on a laptop and debut 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, for about 3 weeks I collected data on what can and cannot be done, and what ultimately it can bring to me. The Windows Phone Store, like the App Store, checks applications before publishing, unlike Google Play. There were a lot of applications there, but most of them were just trash, crafts on the knee. The annual developer subscription then cost $ 99, and now has become $ 19 per year. Check usually from 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 of how this could be done.

    And I very quickly found the DreamSpark program- This is such a small life hack. A program from Microsoft that provides students with the ability to publish applications to 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 already 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. I passed the basics of HTML 5, a couple of tests on C # and basic JavaScript there. I have been registered on this site for a long time, so I had to pass only 3 tests, a new user needs to pass 6 or 8 tests, and it still works, they also continue to distribute keys.

    Dreamspark buns:

    • the ability to publish applications (I took advantage of this);
    • free or discounted software (this was not useful to me, because I developed everything in express versions);
    • and the last, probably the most important thing, is the ability to upgrade Windows 8 to the Pro version for 2000 rubles instead of 9900.

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

    The next step is to unlock the phone. This is the last obstacle to the development itself. This is done very simply. After unlocking the phone, it becomes possible to install .xap files not from the application store, but from the SD card. This is what pirates use. My HTC 8X phone model did not have an SD card slot, so I turned it around by connecting the cable to my laptop, and every time I assembled a project. This 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 vacations.

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

    I made up a lot of ToDo lists: on scraps of paper, on the web and in mobile applications. In the beginning I tried to plan, but in the end I came up with a different way to manage the tasks. I just began to maintain a common list for each role. As soon as I finished work, I wrote out what I did today. It turns out some kind of incentive system. When more is planned than done, an unwanted guilt appears. And when you write down even one point from what has been done, you get a feeling of pride in yourself that you have achieved something, things are slowly but moving.

    The gameplay of the arkanoid is understandable: a ball flies, breaks blocks, when destroyed, a block can affect neighboring blocks. I have it and exploding blocks, and bomber-blocks that destroy all the blocks horizontally and vertically. There are ice blocks that make all neighboring blocks very fragile. This all significantly dilutes the gameplay. In my version of the game there is one feature: the ball from the platform does not bounce off the reflected corner, but as if the platform is slightly rounded. The closer the ball hits the center, the more direct the angle of the rebound. When I did this, I did not think at all. But about three months after I developed this mechanics, I found out that there are others. For example, someone used a small angle drop randomly. But then it turns out that the player does not control the game at all, i.e.

    As can be seen from the screenshots, the game has points. Destroying one block, you get one point. If you manage to destroy the number of blocks multiple of five without touching the platform, you additionally receive the same number of points. Points were added to the game simply as a classic element of an arkanoid, they do not affect subsequent levels. There are not any stars and achievements popular today, although, perhaps, this should have been done. This would help add interest to the game.

    Game architecture


    The game in terms of program code is not very big. I did not use 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 a certain entity that is similar to a representation. It describes the color of the item. All elements in the game have some specific color and simple geometric shape. In general, the controller from the model I rarely differed in that the ball has a certain square, which is used both for detecting collisions and for rendering this ball on the screen. Architecturally, XNA games look pretty much the same. I say XNA, not MonoGame, because the interface and basic principles were originally set in it. XNA itself provides tick technology: two Update and Draw methods in the base class. The first method is responsible for updating the data on the "tick", and the second - for rendering. XNA does not provide the essence of a "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’t say that during 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: shift game elements by a certain distance for each tick. For example, Mario runs to the ax to cut the bridge and throw Bowser into the lava. In games, it is always necessary not to shift characters every “tick” by some constant, but always to set some speed times the delta between the current and previous tick. This is necessary in case your game suddenly slows down on any devices. In productive games, this is very important. If someone had 10 FPS, and someone had 30, the players will see different results. For example, Mario will not run to the ax and save the princess.

    To avoid this, I keep the position and direction. This is very convenient to manipulate in the sense that I periodically need to create shapes that move at a certain angle from the direction of the ball, and I had to create bonuses for cloning the ball. Those. the ball in the air bifurcates, as it were. I translated directions into 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;
    

    Back to the look of the game. As I already said, blocks come in different strengths; they are marked with different colors for me. Blocks from the white-gray group have a strength of 1 (i.e., one blow is enough to destroy them), for green the strength is 2, for blue - 3, etc.



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



    I simply drew the levels in the editor, and the pictures were 20 by 20 pixels. I connected them to the project and at the first creation of the parsil image level. Each color of a pixel corresponds to a certain type of block; only 400 pixels had to be processed. This is a very fast operation. This is not to say that in some place in terms of performance, the game sagged in some place when processing data.



    An XML file is also included in the level description, which describes all sorts of data that are not very convenient to graphically indicate: the position of the balls on the platform from 0 to 1 and the location of bonuses in the level. Bonuses are static (always rigidly tied to a position in the grid) and dynamic (randomly scatter along tiles without bonuses when starting a level).

    Pixel Colors


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



    I did this 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. The color was obtained using a fairly simple function. In the example below, the values ​​are precisely set for obtaining a white block: 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 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 block keys and block gates. When you hit the key block, the block gate unlocks for five seconds and becomes available for destruction. Unlocking the gate starts a visual update of the block, so if you hit the key repeatedly, you get something like white noise.



    During development, I needed to support all the screen resolutions that were encountered on the Windows Phone platform at that time:

    • 800x480 (wvga);
    • 1280x720 (720p);
    • 1280x768 (wxga).
      Obviously, with this set of permissions, I also needed to maintain two aspect ratios. Everyone approaches this problem in different ways. Personally, I scaled the image to the entire width of the screen. In the picture below you can see how the image was cropped from below. I had a sufficiently large space under the finger under the platform so that the player, while controlling the platform with his finger, would not overlap his picture. I sacrificed this space a little to make the picture look good both with a width of 720 and a width of 768. The red line just shows that the platform is slightly lower on the left screen than on the screen with a different aspect ratio.




    A few words about music and sounds. I don’t have any music in the game, because my hands didn’t reach it. There are sounds in the game, they were used from my favorite set-top box - SNES. I found 256 samples and used them.

    Publication


    At some point, I realized that if I did not publish the application in the near future, I would only have two options. Either I’ll cut the application endlessly, having received an incredibly cool engine for all occasions by the time I’m about seventy (but by then I will not need it anymore), or I’ll just lose interest and abandon development.

    Application application form consists of four stages. On the first, you need to fill in the most basic data: category, subcategory, name in Dev Center and price (I set 34 rubles). Then I did not have a trial version, so I downloaded only a paid game.



    At the second stage, the XAP file is directly downloaded. 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, upload an icon (300x300), background (1000x800) and screenshots for all supported screen resolutions.

    The third stage is age ratings. I put myself only 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 I needed PEGI, since this rating is used in many European countries, in Russia and the USA, namely, I was aimed at these markets. It was also easy. On the PEGI website, it was necessary to fill out just one form (the presence of violence, erotica, drugs, alcohol and the like).



    As a result, I was given a special PDF file to download, which had to be downloaded to the application store to confirm the rating. I was still interested in the Brazilian market, but in order to get a rating for this country, I had to send the completed form to a real address, and I did not get involved with this.

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

    After publication


    I sent the application and began to wait for the app. On August 8, I received a confirmation letter. It turned out that when filling out the form, I forgot to uncheck the option “publish as soon as it becomes available”, so my game was already in the app store.

    Immediately after the publication, things were not going very well; no one was buying the game. I started looking for options to promote the game. The first thing I did was a group on facebook. Only my friends barked at her. I also uploaded videos on YouTube, it also did not bring much success. Next, I wrote about the game for a couple of thematic sites ( http://wpcentral.com , http://4pda.ru), where they reacted with great approval to the fact that the author himself came to advertise his game. There were a lot of views, but somehow it didn’t merge with the purchases. All August I ruled 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 icon that seemed to me beautiful with a slightly less pleasant, but more understandable one. This brought me 3-4 installations a day more, people began to understand that this is an arkanoid.



    A little later I still 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.

    The Windows Phone Store is different for each region, below are the results for [arkanoid] in Russia, the USA and Britain. As you can see, the selection is slightly different, although Pixelnoid Lite is found everywhere.



    After some time, 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 informing me that Pixelnoid will hang in recommended games (the first screen when switching to the games section in the application store) in China. Later, the same letter came about Great Britain and Australia. The graph below shows 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 were the result of the recommended ones.



    But downloading and shopping are two different things. We bought the game in a month only 6 times, i.e. even buying Windows 8 at a discount didn’t pay off.



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

    To summarize all this, you probably need common truths that are understandable to everyone without me. If you want to achieve some kind of real return, you need to go into business with your head, and not do it half-heartedly. And this does not guarantee a result, especially if you do it alone and without special financial injections. I did not take development seriously, and the result now seems obvious.

    Personally, I believe that the WinPhone ecosystem is still “raw.” Although the situation has improved markedly since last year. The store has many applications and games from both major publishers and indie developers. The entry threshold seems to still be lower than on Android or iOS.

    Also popular now: