As I was doing the game

Plan of a couple months ago, I was wrong. There was an idea, and I can not escape from it anywhere, no place to hide. Decided in whatever I do has become a toy computer, so much so that the entire process from beginning to end of their handles, in order to understand how it is done, even if at a modest, but the working example. Immediately I say, I'm not a programmer. Last time on the dolphins in an educational institution there is something programmed, but C ++ a little concerned, but since it was not possible. But the soul of the programming is always lying.

Will 9 photos and text





Now, to business. My idea is still in the air, and I did not know for what to take. For a start needed to determine the genre of the game, and I chose the genre "tower defense» (Tower Defence), as really I love these games. For those who do not know, the essence of these games is to ensure to prevent the enemy to some "base" the player, placing them in the way of specific tools that can be improved. If interested in the details: the genre Tower Defence

With the genre defined, now you need to choose a platform for development. Of course, the most popular at the moment, are applications for mobile platforms. But after some hesitation, I decided to make an application for "Vkontakte.ru". Firstly, I always wanted to study the flash, and secondly, you are reading this review, I can show it without any problems, and you, of course, I firmly raskritikuete (where do without it? =)).

Oh, I know how to Yap vkontaktik here do not like, but if the API and Yap were binding to the user login, then I would definitely have done a version for YaPlakal =)

Well, after a little obmozgovaniya, I set to work. He began to look for literature on a flush, he has mastered the first flush (drawing, symbols, foundations) - taken somewhere 3 days, then moved to the study of ActionScript 3.0 - This is a special programming language in flash. The language fully object-oriented. It is very convenient and practical. If you suddenly want to study, read the book Colin Flour, best of all, he wrote about AS 3.0. Thus, the study of language has gone about a week. Theory theory, but it's time to move on to the practice.

How things will look like, as long as I do not know. For this example, the top view. On the track will be laid, in which enemies move. At the end of the track - the database that you want to protect. For the guns will do special slots. So. Everything is good, but how are we going to draw all this? We need to draw at least 5-6 kinds of tools, start by 3 types of enemies, then add more ... Well, of course, because I'm not in vain in his time studying 3dsmax! We come up with a variety of guns, make up, what and how they will shoot and go. Jobs gone, work in full swing!

It is necessary to do to the enemy guns were turned, and somehow not comme il faut, if they abut one point and so will stand. Since the game is not on the 3d engine, the rotation will be carried out by means of drawing each position guns. Total of 24 figures for each object. Besides laser. He will have to emit a beam (good).

Total of guns: machine gun, gun, shooting the core, rocket launcher, laser, retarder (slows down enemy movement), and flamethrower. Each instrument has its own characteristics: the damage, range, rate of fire. There are not yet clear, for example, the core of a gun striking multiple targets, while others have to shoot only at one target. Besides all this, we develop a common interface of the game. Now he looks modestly ... I would say, very, very modest:



Draw a track, add the objects on the screen. Everything is done mentally and fun. Always a pleasure to work on. Right?

One of the most interesting things in such programs - the algorithm for finding the way. Since I am determined to do everything himself completely from scratch (even inventing the wheel), then the algorithm I invented myself. It was funny to learn later that it was the same "wave" algorithm.



Where the road, you guessed it, I'm sure. The base at the top of the green. And green squares - slots for guns.

I never thought that school knowledge can be useful to me. Fundamentals of trigonometry, mathematics, had something to remember from a school course. Well, for example, how to calculate hit the enemy in the range of the guns? Or, how to calculate the angle of rotation of instruments in relation to the enemy? Or movement of homing missiles, which are catching up with the enemy? A lot of things had to remember, and a lot had to study again. It was very exciting to dive into this world.

Well, it's almost a war, rockets fly, shoot guns, explosions boom-boom:



And then, for no reason at all this mess I ceased to please. Well I can not look at this picture - flat too. And I take a strategic decision: to translate all this isometric plane. Not now 3D, but still much better. It took me this process is almost the whole day. Or even two. Or even seven. I do not know, because these days I have been like a dream. And soon, after all redraws and additions, the picture began to look like this:



Of course, once she did not look. It took some time to fix all the bugs got out, drawing additional facilities such as radar, factories, buildings, trees and others. But basically, I think, is clear.

By the time I made a few types of enemies and set about creating and programming aircraft.



As they say avid programmers writing code - This is the smallest part of the program development time. 99% of the time is spent in the correction is already written. This, I tell you the truth, although I am not a programmer.

Machine guns have fired, the nucleus with rockets exploded, the laser burns the enemy, and their inhibitor, respectively, slowed. It was time to develop a common interface of the game: the main menu, menu cards, a help screen, etc. What I actually do. For example, here's what a screen to select the card:



As you progress through the game open new cards. I tried to make it as varied as possible and fun, and some with zakovyrka. In addition, I added the game different sounds: gunshots, explosions, turbine aircraft, missile launches. With the sound became much more comfortable. Sound picked up at special sites - banks of sounds. I hope that someone else's copyright is not violated.

Also it makes it possible to pump each weapon, increasing its damage, range, rate of fire. Resources are added to each unit destroyed enemy vehicles and infantry. Each wave of enemies stronger than the previous one and is increased by a sine wave.

As planned in the run game, "Vkontakte.ru," I learned vkontaktovsky API. Basically, I required of him quite a bit, and therefore I understood immediately.



The most interesting thing that had to do more, and a no server, but the database to store the achievements of players. And I'm in PHP (not to mention something else) in a tooth or tooth ... Ie I am in PHP like a fish in the saddle. Ie absolutely nothing. But it is interesting to horror. He sat down to study. It turned out very easy, if done without protection, encryptions and more. For my non-profit project of course this variant.
So, what we are: by the time I completed the screens of victory and defeat. For every victory awarded stars from zero to five. I decided just to store these stars are very interesting, so I created a screen with improvements. Use earned the stars you can buy improvements that will allow the game to go on and open the following map. That's how it looks:



All infa stored on the server, so that when you visit the game again, all your achievements remain.

Like everything looks decent, but not only in the cover of the case. Beauty in a computer game is not the most important thing, even in the coolest and most beautiful games. After all, if it is not interesting to play, too difficult, or too easy, or too dreary, too fast, or vice versa - all these factors spoil the impression of the game. Balance - this is the most important thing. To him, I started from the beginning of development, and, be honest, is not perfected yet. However, it does not prohibit vkontakt update their applications, so do - hone.

Actually, the game can be found here: vk.com/app3660797_226581 Welcome!

P.S.

"Well, the game is ready" - I said to myself a month ago, but since then, every day working on it. And that, as they say, avid programmers, more flowers. Yes, that's right, I do. Although I am not a programmer.

© vk.com/wall226581_6696

Source: