📜 ⬆️ ⬇️

From the desire to create a game to launch - one step

Once I decided to pull myself together, overcome laziness and make my own game. In this publication I will talk about the path from idea to implementation, which frightened me for many years (and, probably, frightens many), but it turned out to be fascinating, educational, and greatly changing attitudes towards the creation of games.

Idea


On the wall above the desk of his wife hung a card with nine colored squares (three by three), one glance which was enough to give rise to the general idea of ​​the game in my head. The essence is this: the square playing field consists of cells of different colors, which can be clicked on to randomly change the color of the cell; changing the color once, the cell is marked with a cross; three or more cells of the same color horizontally or vertically disappear, bringing one point for each cell and for each cross, the cells above the disappeared "fall" down, and the missing ones are created with random colors. The game ends when all the cells on the field are marked with crosses and cannot be clicked.

Conclusion

Before writing code, you need to carefully and calmly think about the game mechanics, its comprehensibility, convenience and interest. In my case, this was not done, as the idea captured me. As a result, the game turned out "an amateur."

First working version


Since the last few years I’ve been working with html and js, the moment when the development platform is selected has been subconsciously skipped. Severe itching in the upper extremities and the excitement that the idea of ​​the game was born in the head quickly and painlessly influenced the sequence and deliberation of the actions so much that after a few seconds I wrote the code in the file squares.html.
')
In brief, I will describe the contents of this file after four hours, when I contemplated what I did:

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style.css" type="text/css" /> <title></title> <script type="text/javascript" src="jquery-1.10.2.min.js"></script> </head> <body> <div id="wrapper"></div> <script type="text/javascript"> var go={ fld:{},//     x:10,//     y:10,//     cnt:5,//    wid:50,//      tmrc:0,// ,     cclick:true,//    ( false   ) callch:false,//            cdisap:false,//     cshft:false,//   ""   cago:false,//       pts:0,//   fill:function(){...},//   go.fld  ,      {c:1, f:false, d:false},  c -    , f -    , d -     pic:function(){...},//   DOM   rfpic:function(){...},//   DOM   check:function(x,y){...},//     go.fld[y][x].  false,   go.fld[y][x]        , true -   ,        go.fld[y][x].d   true ashft:function(){...},//  ""   adisap:function(){...},//   ago:function(){...},//    allcheck:function(){...},//         isgo:function(){...},//     tmrf:function(){...},//     50           start:function(){...}//    }; go.start(); <script> </body> </html> 

Conclusion

A working version of the game for myself was immediately made. Corollary: quickly written, unreasoned from the point of view of further use of the code.



The first improvements and adding the application to the VKontakte directory


By coincidence, I had to leave on business. Before leaving the house, I showed the game to my wife. Returning four hours later, I discovered that my wife had been playing “Squares” all this time, trying to break her own record. My joy knew no bounds, my self-esteem was overwhelming, my inner voice said that my game would take over the games market, and my hands reached for a laptop to make the game a new hit.

Due to the lack of the “Turn html file with a game into a popular application” button at this stage, I had to think, google and read. There were several options that I came to:

1. Make a site with the game.
2. Post the game on social networks.
3. Make a mobile application.

After reading a number of articles and thinking about the latest information, I chose the second item, and in particular, VKontakte, since I had at least some idea about this social network.

No sooner said than done. Filled the game on a virtual hosting, went to the VK Developers section on the website of Vkontakte, found a link to create an IFrame-application, filled in the information and saw my game loaded in the iframe. Until the application passes the test, it will not appear in the application directory and is visible only to the creator.

Then I realized that the application looks unattractive, not only from a visual point of view, but also from a functional one. Brainstorming followed, the results of which added the ability to select the level size (3x3, 5x5, 7x7, 9x9, 10x10) and slightly redesigned the interface.



Conclusion

To rework the interface a bit and make it more pleasant for the eye (for my subjective eye), I had to watch the game for hours and think about what I didn't know how to do. Consequence: if you are not confident in your abilities in any of the areas, it is better to entrust it to someone you trust in this area. My mistake was in arrogance and unwillingness to share the laurels of unsuccessful success with someone else.

Turning a game for yourself into a kind of social game.


Next, I came across an article “Running an application on Vkontakte” (snake), from which I learned that in order to approve an application, you need to implement a user rating feature.

And again Yandex, VK API, database structure drawings ... Having thought through the database structure and tested the work with the VK API, I sat down to write the server part and js-functional interaction with the server. The functionality consisted in the following: after loading, index.html js accesses the server, gets ratings and displays them on the page; when you click on the button with the size of the playing field, a new game begins, and a record is created on the server about the beginning of the game by this user; when the game ends, the results are sent to the server (time and points). For several hours I coped with this subtask and happily sent the game to check, paying a deposit of 10 votes (local currency VKontakte).

The first hour after sending, I checked every five minutes if the application did not approve, then I calmed down and waited. About a day later, the answer came “The application for verification was rejected. You need to connect the security certificate. ". Since the SSL connection topic is covered in many articles, I’ll only mention that I used the free certificate from startssl.com . After the next check, the application was approved and added to the directory.

Conclusion

In order to make a social game, do not forget about what it means to "social". My mistake was that I made only a mandatory rating, without even thinking about other options for socializing the game.

Appearance


Three months Squares looked as shown in the previous screenshot. At this point, the application had about three hundred installations and an average of eight unique visitors per day. I decided it was time to do design if I wanted someone to play my game. A designer was found, we discussed options for the functional arrangement of controls, and for 7,000 rubles I received a new look for the game.



Unfortunately, this did not affect the number of unique visitors and conversion of conversions from advertisements (see below).

Additional functionality


Recalling that the game is still social, I decided to implement the standard functions of social games in it: Invite friends and Tell friends. Given the small number of installations of the application, the percentage of using these functions can be neglected.

Already resigned to the fact that the game will not occupy the pinnacle of the best games in the history of mankind, in order to obtain new knowledge, I decided to add the possibility of buying new levels for votes. At the same time, these levels can be opened for free if you score the necessary number of points for all games. The implementation took a couple of hours - thanks to the VK API documentation.

Conclusion

Since the implementation of this functionality, I have earned one vote (approximately 3 rubles when withdrawing money from the system) before writing this article.

Advertising and visitors


In the article about the snake, the author talks about start-up traffic due to the fact that the application falls into the “New” section. At the time of adding my application (July 2014), this function cost 1000 votes (7000 rubles), so I decided by trial and error to advertise the game through targeted advertising on VKontakte. UPDATE: I am told that now the placement in the "New" block is again free. But for my application, this function is no longer available, because According to the new rules, “high-quality applications that have passed moderation less than 6 months ago can qualify for a place in the block.”
When creating a VKontakte advertisement, there are many parameters for setting the target audience, but it is also important to check which advertising format is most suitable. There are four formats to choose from: “Image and Text”, “Large Image”, “Square Image” and “Special”. Due to lack of experience, I let down the first 500 rubles with almost no result, but then I realized that I needed to check different target audiences and, looking at the results, select my own.
UPDATE : It is worth mentioning the VC advertising system:
I used only the Targeting section, but I will mention that on the page " Advertising VKontakte " you can select the item Advertising in communities. The interface is simple and clear:
1. In the Budget section, you can replenish the balance from which money is deducted when running ads.
2. Export statistics allows you to select one of the data formats: html, xls, csv.
3. There are alert settings (SMS in the middle of the night is the norm) and user access rights to advertising campaigns.
4. I did not use retargeting, but I heard praises from several friends involved in advertising. Having phone numbers, e-mail addresses, or VC id of your clients / users, you can create groups of users who will be shown separate ads based on the fact that they already were interested in a particular product.
5. And finally, inside the section “Advertising campaigns”, ads are added for each item created. At the same time, each of them passes pre-moderation (the expectation reached 20 hours). I didn’t encounter a restriction on the number of created ads, but every time the ad is launched, it checks whether there is a hundred rubles on the balance sheet for each ad.
I'll tell you about the nuances that were a discovery for me, as for a beginner in this industry. When creating an ad, in addition to the natural fields “Title”, “Description” and “Image”, there is a whole bunch of properties for customizing the target audience (I will specify the sections: Geography, Demography, Interests, Education and Work, in addition to which you can select the type of mobile device, operating system, browser and belonging to the category “Used Vkontakte Voices”), as well as Price Settings. The ad specifies the payment method (for conversions or impressions) and the cost of the transition / 1000 impressions, while the recommended cost of the transition / 1000 impressions is displayed next to it.

findings

1. Without any advertising (targeted advertising, posts in communities, reviews) I did not receive visitors. But at the same time, judging by my subjective feelings, with an increase in the number of app installations, the number of unique users rises due to an increase in position in the list of Popular apps.
2. When using the Special format, I received the maximum number of clicks on my ads (300 conversions, including 190 installations, for 83,500 impressions for 150 rubles).
3. The target audience of Women under 18 years of age responds most of all to advertising my application.
4. If you choose the payment method "For impressions", you can save.
5. In no case do not need to run an ad at the recommended cost. You should select the value yourself (sometimes I started with the cost 20 times less than the recommended one), because it affects the frequency of impressions, and you can reset your balance in seconds with much less efficiency.
6. Be sure to indicate the limit for each ad, or not to replenish the balance for large sums.

Sending Security


As soon as I implemented the functionality of sending the number of points at the end of the game, I began to visit the obsessive thought about bad players who can see the js-code and queries with the results sent to the server and send any number of points to the server, because the game is completely on the client, and you can send anything to the server, the main thing is to pretend to be a browser with the necessary HTTP_REFERER. Having spent two weeks of time, an uncountable number of nerves, but having acquired a few gray hairs, I realized that the approach to the game (or rather, the randomization) on the client only works if several iterations of the next cycle are repeated:


At the same time, this option still does not give an absolute guarantee that your code will be resistant to understanding. Full confidence in the reliability of the results gives only the full execution of the game on the server. Without hesitation, I rewrote the client and server code as needed.

Thus, with each click, data is sent to the server, checking, writing to the database, and sending random colors of new cells to the client. If after checking the data is considered incorrect, the result of the game is marked with a special tick and is not taken into account in the future. After six months of the game’s existence, with 900 installations and 10 unique users per day, this orgy didn’t affect the server’s performance, but I couldn’t think of a better solution.

Conclusion

It is necessary at the early stage of creating the game to think through the technical nuances of implementation, in particular, to take into account the possibilities of unscrupulous players.

Statistics




This is a schedule of unique visitors by day. All peaks, except the last, correspond to advertisements, the last peak is an inexplicable increase in the number of installations from the Popular section. The highest peak corresponds to the ad in the special format.

Results


Despite the fact that the development of the game took away my time (about three weeks, assuming that I worked for eight hours every day), money and nerves, as a result I received a very tangible store of new knowledge and experience that I use now creating the next game. Therefore, recalling my indecisive thoughts about creating a game over the past few years, I want to wish all people who have the same thoughts to pull themselves together and create.

Summing up the line under my muddled story, I want to draw up the following plan that I needed on the day when I decided to make a game:

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


All Articles