📜 ⬆️ ⬇️

My experience developing Android games and a few words about monetization

Hello, I want to talk about my experience of creating a recently released mobile game on Android, in general terms, describe how to effectively display graphics on the screen of a mobile device using OpenGL and present the results of my experiments on the integration of advertising networks.



Briefly about the game
The genre of the game Doughty Spartan - action-platformer. The protagonist of the game is a Spartan, whose goal is to deal with all enemies (monsters).
The main bet is made on an unusual combat system with the need to use somersaults, slopes, block in combat with monsters. It is also possible to conceal an attack (when the enemy does not see you) to cause double damage to the enemy. In the game there are tips that explain the basics of the mechanics of the combat system. You can have 2 types of weapons at your disposal - a sword and spears, which can be changed depending on the situation. Movement in the level is not completely linear, that is, you yourself are planning how best to make your way to defeat all enemies.

Game development


It was decided to implement the game on a 2D engine developed by Java itself, since there was an interest to study the Android platform and the features of working with graphics on it. At the moment, this decision can be considered controversial, since the use of a ready-made game engine will make it possible to save enough time, which can be used to create a better game. Another big plus of modern mobile game engines (there are also free ones) is cross-platform, which can provide a significant increase in the number of players. Therefore, I recommend that you first carefully examine all the possibilities of ready-made game engines, and if there are enough of them to implement your game project, then it would be more expedient to use an existing engine. And, of course, when choosing an engine, consider such an important parameter as cross-platform.

And now more about the implementation of your own graphics engine if the existing ones do not suit you. Android has 2 ways to display graphics - using Canvas or Open GL. The first method is simpler to implement, but provides low performance, suitable for games with graphics that are not very resource-intensive. Working with Open GL is more difficult, but the performance will be much higher, which is necessary for most modern mobile games.
')
At the beginning of development, having tried to implement drawing graphics using Canvas, I decided that this would provide sufficient performance for my game. But this was not the case, since the game is quite active and with a considerable number of graphic objects, as the development went on, the performance that Canvas issued all the time fell. Then it became clear that not to do without Open GL. Open GL technology is quite serious, so its study should start with the fundamentals. For example, I had to study books and articles that describe both the basics of working with Open GL, and those that talk about the specifics of working with Open GL on Android, in order to implement suitable graphics output.

I will not write in detail about how to implement a game engine using Open GL, on the Internet you can find enough information about this, and I will write recommendations that will ensure good performance of 2D graphics output. And so, to display graphic objects using Open GL, you can use the following methods:
  1. Vertex array. This method involves the use of an array to store information about vertices and texture coordinates of objects. First, you fill the array with the necessary information, then connect the desired texture and call the Open GL method to display the graphics on the screen. This method can be optimized using the Sprite batching procedure. That is, a common texture is created for different objects and information about vertices and texture coordinates of several objects with the same texture is written to the data array, therefore, to draw these several objects, it will suffice to call the graphics output method only once, which speeds up the engine.
  2. Vertex Buffered Object. This method is similar to the first, with the only difference being that with its help it is better to draw those vertex objects and whose texture coordinates do not change throughout the entire graphics output process. A typical use of this method involves filling the data array only once (mainly when loading a level), and then you can use this immutable array for multiple visualization of graphic objects.
  3. Draw Texture Extension. This method is characterized by the fact that the information about the vertices is not stored in the array, but is transmitted directly to the method that produces graphics output to the screen, that is, this method must be called separately for each graphic object (unless different objects have the same vertices). Despite this, this method provides fairly good performance, and it is preferable if the number of graphical objects to be displayed is not very large. But, this method does not support drawing objects at a given angle, for which you can use the previous visualization methods.

If you want to achieve maximum performance of the graphics engine, then you will most likely have to implement all 3 ways to display graphics, and use each in a separate situation. But, it should be noted that there are Android devices that do not support the Vertex Buffered Object and the Draw Texture Extension, although their number is very small.

Monetization


To monetize the game, I use the currently popular Free 2 Play model and advertisements inside the application, anyone can download the game for free. In the game, first level is available, but in order to open the next one, you need a certain number of coins that can be earned by passing levels. Having made an in-app purchase, the user can immediately open all levels and disable advertising.

I will write in more detail about the experience of integrating advertising networks. In order to make money on advertising it must be of adequate quality. You need to find those ad networks that advertise really good apps. If you are creating a game, you can integrate ads from other games, since your potential user most likely likes to spend time playing on a mobile device and there is a chance that he will click on the game banner ad.

You should also consider this method of monetization as motivated advertising, that is, the player receives certain game bonuses (in-game currency) if you watch the video, click on the banner, install the advertised application, etc. Some advertising networks themselves contribute to this method of monetization, for example Tapjoy.

During the development process I studied the following advertising networks:
  1. Chartboost - allows you to embed ads from other games. This advertising network recommended the use of a large number of mobile game developers, as it provides a good payment for the installation. The SDK itself is of sufficient quality, the integration is fast, full-screen advertising looks beautiful, it appears with animation. It is also possible to integrate the “More games” button, which displays a list of advertised games. The downside is that the Fill rate (advertising availability for display) in our countries (Russia, Ukraine, Belarus) is not as high as in the USA and Europe.
  2. Startapp - both games and programs are advertised. Here I was attracted by the interesting design of advertising banners (some reproduce the animation) and those applications whose ads I saw are quite popular and useful. There is a sufficient number of ad formats - a banner, a full-screen banner, a slider (extends from the side), ads when loading an application, etc. There was no problem with the integration, the only disadvantage is that the SDK does not allow you to handle the event of clicking on the full-screen banner, which you need implement a display of motivated advertising. Fill rate is quite good. Installation fee.
  3. Revmob - advertising games. The main advertising formats are a banner, a full-screen banner, a pop-up and a link to an application that can be tied to a button and named, for example, “More games”. I read on the forums that this network brings a good income. The SDK did not quite like it, because there is a heap leak, that is, every time you show ads, the amount of memory usage grows and when the free heap remains little advertising stops loading so that the application does not crash with OutOfMemoryError. I wrote to the SDK developers, in response, they only gave recommendations on how to show a full-screen banner, which did not solve the problem, since I already did the integration according to the instructions from their website. Pay for clicks or clicks on the links of the advertiser.
  4. Tapjoy - advertising apps and games. The main feature is that there is built-in support for motivated advertising using Offerwall - a wall with offers (to watch a video, install an application, etc.), performing which the player receives in-game currency. Changes are taking place in the SDK, they are introducing a new technology “nGen”, so some of the old methods of displaying advertisements, such as full-screen advertising, are deprecated and it is recommended to switch to nGen. In addition to Offerwall, you can also integrate banners and full-screen banners. The proposed installation fee, for the performance of tasks Offerwall.
  5. Inmobi - advertising applications and games. Judging by the reviews of other developers, the Fill rate in different countries is quite good. The main advertising formats are banner and full-screen banner. Testing the integration of this ad network took the most time, because to verify the integration of an application that has not yet been released, you need to add the ID of each test device to the Dashboard on the InMobi website, which is not very convenient compared to other ad networks where you just need to translate display advertising in test mode. To get the device ID (including the emulator), you need to turn on Debug mode in your application code, then start the application and find the Publisher device Id line in the LogCat console where the device ID will be specified. After I added the device ID and turned on the test mode, for some reason I had to wait several days until the test banner began to appear. Pay per click advertising.
  6. AdColony - advertising games through the display of videos. Payment is made for watching the video to the end, the duration of which is on average 15 seconds. Integration is fast enough, and it is possible to prohibit or allow users to close the video without having watched it to the end. In my opinion, AdColony is effectively used as a motivated advertisement, so as not to annoy users by showing videos directly in the middle of the gameplay.
  7. Vunge is another advertising network featuring video advertised games. The main difference from AdColony is that the payment is made for the installation of the game, the video of which was watched by the user.

Detailed instructions on the integration of each advertising network can be viewed on their official sites.

When implementing monetization using advertising, one should take into account that in some countries the Fill rate may not be sufficient. Therefore, it is better to integrate several ad networks at once and show the ad available at the moment. It would be advisable to implement advertising caching, for example, during the game loading process and immediately after the advertisement is shown, so that a full-screen banner can be displayed at a certain moment without a delay in loading. The caching function is provided by the ad network SDK and in most cases performed by calling just 1 method provided by the SDK.

Release


Initially I wanted to release the game through the publisher, but, unfortunately, they were not particularly interested in the game, mainly because it was made in an unusual genre and it is not casual. One Russian publisher pointed out that the graphics should be made more “cartoonish”, while Chillingo, on the contrary, liked the stylist of the game, that is, the vision of what the game should be at different publishers may differ significantly.
List of publishers who sent a request for publication
Chillingo, Rovio, Nevosoft, Ayopa Games, Digital Chocolate, Bulkypix, Karmic Apps, KamaGames, Web-Source Technology, Ubinuri, Yodo1, GREE, G5 Games, Apps Ministry, Fingersoft, Renatus, Big Fish Games, Pocket Gems, Zynga, Kabam , 6waves, NuOxygen, HeroCraft.

When choosing a game, the publisher is also interested in your experience in the game development industry. My correspondence with one publisher ended with the fact that he found out that this is my first game, and I work alone. It is also often required to have a Free 2 Play monetization model in the game.

I sent the application for the publication of the game to quite a large number of publishing companies. Surprisingly, Chillingo showed the greatest interest, with whom I sent a test build of the game. But, having analyzed the situation on the mobile games market, they replied that in our time, games of the platformer genre are difficult to monetize, therefore they have to refuse. When sending the application I gave a link to the video with the gameplay of the game, so that publishers could make a decision about publishing faster. Also this video is used on the game page in the market.
Gameplay video


At the moment, I'm trying to promote myself by posting posts about the game on various thematic sites, some of which I took from this article . The mistake was that I started posting information about the game after its release on Google Play, but I had to do it at earlier stages of development, because you can get quite useful comments about the game and maybe change something before the release.

Conclusion


I hope the above information will help you in developing your own game project.

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


All Articles