The history of the launch of the game on social networks


    Towards the end of spring 2013, I described the story of a poor start on Google Play . While with iOS hitch, we decided to throw the game in VK and OK. In the article I want to share the features of launching the application under social networks, and I will talk about the problems encountered before and after the release.

    Features of the web player version



    On this platform, it became possible to enable dynamic shadows , and not just “soulless” Projector, to increase the clarity of textures, as well as improve global quality parameters. If for Android there was “Fast”, then you could safely choose “Good”.

    We also needed a footer for the game. It usually contains useful information, a button to invite friends and a link to a group. I decided not to fool with Unity3d and made it directly in HTML:


    Server side preparation


    In the web version, the question arose about the reliable preservation of careers, ratings and payments. Without this, the application would be inferior. I looked towards the familiar PHP + MYSQL bundle , which I already knew a little. The publisher reacted negatively to this decision (advised to switch to PostgreSQL), but I did not listen and did it my own way, as it was easier for me.

    DB structure, all necessary data is stored here



    The main server.php file came out in ~ 300 lines, it describes the following features:
    • Player Registration
    • Purchase and pumping cars
    • Purchase of gasoline (consumables)
    • Recording the result of the race

    The player sends the data via POST to this file and we write it to the database. Not very safe, but there are some simple checks such as signing through md5 that protect against schoolchildren.

    The answer comes in something like this:
    {"id":"4","name":"Nolex","lvl":"7","coins":"9034","stamina":"40000","kill_zombies":"6952"}
    

    This is JSON, for Unity3d I advise you to use the JsonFx.Json library.

    Rating is an important element of the game, I constantly watch how players compete there among themselves, therefore I will mention the rating.php script. It had 8 database queries, 4 of which later began to bother me.

    SET @rownum:=0;
    SELECT r2.`rank`, r2.`name`, r2.`points` FROM (SELECT @rownum:=@rownum+1 as rank, `salto` as `points`, `name`, `id` FROM `players` as `r1` WHERE `sn` = '1' ORDER BY `salto` DESC) as `r2` WHERE `id` = '999'
    

    This is one of the problematic queries for determining the position of the current player in the selected category. When there were few players, it passed instantly, but later there were more players, everything began to slow down and I removed this option. Now, if a player has not made it to the TOP 100, then from below we simply display his place as “> 100” and the points earned next to him. I could not come up with a different solution.

    Later, after the release, another admin for the game appeared , where I implemented a summary of the latest data, a statistics section for all social networks, and sending alerts with logging to the database.

    Balance


    Given the poor conversion on Android and the redneck audience in social networks, it was decided to review the balance. We made an analogue of "energy" - gasoline. When it ends, the player has a choice - wait or donate .

    After I introduced the consumable, the most painful and at the same time interesting thing started - setting the numbers. The publisher ( Herocraft ) insisted on a tighter balance, while I, on the contrary, was softer. Conversations and disputes did not lead to anything good, and we decided to trust the tests.

    To do this, I configured the full logging of all races. Testers rode and data appeared, thanks to which we were able to find out how much an average player earns coins and how much gasoline spends at each level. Next, we simply cut fuel for each level. It was necessary to ensure that the level of "descent" did not pass, and the player stopped near the end of the track. This does not apply to the first level, which is intended to attract the player. It is important.

    Low fuel warning window



    Social Network Integration


    At first I integrated into VK, it was easy, since this is not the first time. From the API, I needed a little:
    • Getting player’s personal data
    • Friends Invitation
    • Posting on the wall
    • Spam (newsletter)
    • Recording a player’s level in the social network database (friends can see the player’s activity during “ups”)
    • Payment (probably the most responsible item!)

    Then I proceeded to OK, everything is more complicated here. The API is not familiar, the sandbox is uncomfortable, but you quickly get used to it. To start, you need a legal entity (here plus the publisher). Of the features in OK, you can select a square icon (with sharp edges), the name of the game in Russian without fail and meticulous moderation (somewhere from the 5th time it turned out to pass).

    Game launch


    Static files were uploaded to the cloud to the publisher (there is a * .unity3d file of 22 MB in size, and several pictures). PHP + MYSQL hosted on its weak server, which we rent with a partner for $ 40 / month. Considering that everything is in order, we started to launch.

    Everything happened very quickly in VK, they clicked on the check button (the procedure is free, 10 voices are taken as a deposit). On the same day, the application was approved and it fell into the "New" block. The first traffic went.


    The server behaved normally, but not as good as desired. Requests went rather slowly, sometimes there were delays of 3 seconds, so I asked for my friend, who had a good tariff plan on Hetsner.
    The game in the top lasted about a week, every day it fell lower and lower. There were 5-7k installations per day, then fell to 2k.

    Almost immediately, I set up a mailing list of alerts and every day I tried to alert players who have recovered gasoline.

    Next, a launch was planned in OK. The release was assigned to us on the 27th, but for some reason the game was released and hit the "New" on July 24 and then the server became ill from the influx of a large number of people.

    MySQL database downloads



    Thus the server of my friend bent down, to which he said “thank you very much” (by the way, there was 1 large project on the server that brought money). Brakes appeared and sometimes the error “502 Bad Gateway” was knocked out . This situation was about a day.

    Not expecting such a turn of events, I decided to throw the game back onto my server. It was stupid since he fell 20 minutes after moving.

    To all the players who played these days and faced with “lags” I threw 1000 coins and made a newsletter. This is good practice in such situations.

    Ultimately, I moved to the server to the publisher, where the game works adequately to this day. By the way, the server is quite interesting, it is cached constantly. Sftp php file edits take effect only after a few minutes. It’s not very convenient, but it seems to be some kind of “trick” for optimizing the load, and I must say quite successful.

    Schedule of registrations in the game, here you can see approximately how much traffic with VK and OK



    About the same situation with payments, there are more of them in OK, from which we can conclude that traffic is "fatter" there.

    A few numbers and conclusion


    • Schoolchildren found a hole in learning. You could farm 10 coins. According to MySQL, one very persistent boy did this operation 1,200 times and farm 12k coins.
    • To date, more than 130k people have already installed the game (50% VK / 50 OK%).
    • Only 17% of players reached the last levels.
    • A few days ago, a request was sent to VK for new (already paid), 1k votes were withdrawn, we are waiting.

    To summarize, we can safely say that there is not much point in publishing a similar game in social networks, there was more sports interest. In any case, it was quite entertaining to observe and influence the whole process.

    Also popular now: