
Flash game development “King of the rocks”
After reading several articles about how our compatriots make flash games, and even make good money on it, I decided to make my game at all costs. And by all means earn at least $ 1000 from its sale. Success in this business meant a lot to me. All my life I wanted to make games and now I was ready and confident in success for 100%. This is the story of the development of my first flash game King of the Rocks

Everything is pretty simple here. I selected an idea that I could implement on my own without outside help, so that I would not have to stumble at every step and the development would not turn into hard labor and unfinished construction. Before that, I had already started making games more than once, and each time I did not finish the job. Therefore, having analyzed the previous experience, I changed the strategy and decided that it was necessary at all costs to create a finished product. That is, I decided to make the game not for the sake of the process, as it often happens when you lick the graphics and code when getting involved in the process, but for the sake of the result, which can be presented just as a finished product, and not as a work-in-progress. Therefore, I did not come up with anything complicated and decided to just make an analogue of some thread of a flash game. One of the games I liked then was called Elite Forces: Clone Warswhich many famous mrBadim did . Looking at the mechanics, I realized that I could fully implement such gameplay. In addition, there are very few such games and one more will definitely not be.
Now I had to think about the appearance. I never liked the view from above, and doing something in isometry is difficult, so without much thought, I settled on a side view. In addition, the side view allows you to more spatially show the levels, because in the background you can put a lot of things and thereby create a sense of depth. So the view was also determined quickly.
It was also to come up with who will fight with whom and where the game will take place. The first sketches were not long in coming. I immediately decided that these would be flying objects, because the troops would only move in a straight line and no curved routes were allowed. The castles themselves will be on the tops of the cliffs, which cannot be reached by any means other than by air. Some rocks will hang in the air. Each rock will be a separate object to use them more than once. And the case will occur high among the clouds. Clouds are not difficult to draw, an extraordinary background is drawn once and used for all levels, there is space, and some kind of romance immediately appears, it’s a sin not to take advantage of all the advantages.
There will be three sides competing for the possession of castles and dominance in the territory, distinguished mainly by colors. Initially, I wanted these to be flying sailboats, but then I still did not know how to mirror the object in the opposite direction ( scaleX ) and therefore decided to use balloons, it is not necessary to deploy them.

The general concept in the form of a pencil sketch was before my eyes, and now, when I imagined the approximate amount of work, it was necessary to determine the time frame. Since I approached the solution of the problem strategically, it was also very important to limit the time to complete each task. This restriction played a dual role:
During the analysis of the required amount of work, I estimated the approximate time to draw each object and then summed up the hours. Of course, I took time to the maximum and added on top for all sorts of unforeseen situations. He also counted the time for sleep, food, rest and it turned out about 10 days. Well, I think with special care you can do it in 7 days, and so I gave myself a period of a week for everything.
Work began to boil. I put myself in a tight framework and I even liked it. I felt a certain satisfaction that I kept myself in tight rein and did not let myself go. I had a clear plan of action, all the tasks were in order, each time had its own time. If I didn’t have time and spent more time than planned, I did the next task at double speed to catch up. Of course, everything could not go as planned originally. In the process, new tasks and difficulties appeared that I did not suspect about when drawing up the general plan.
I also wrote down all emerging tasks in order by a numbered list on separate sheets, and each such sheet was a sub-plan. Large tasks were also divided into subtasks that were recorded in order on a separate sheet. Upon completion, the task was deleted from the list. Later, I noticed that the formation of such lists also plays an important role. Tasks written on paper and not in the head are not forgotten. In addition, deleting or marking the task as completed has psychological significance. Looking at the lists of solved problems, progress is visible. Every evening I picked up sheets with crossed out tasks, looked through them and sometimes marveled at how much I could do in such a short period of time. This is a great feeling. I was very proud of myself.

I started by rendering units. At first it was supposed to be sailboats, but I refused them. The reason I described above. In addition, the sailboat is still a more bulky object and it has more details. I would not want when the ships began to fly across the screen, the porridge from them would create confusion. Balls are still easier to perceive, they are a more holistic object. Nevertheless, I still threw a few sketches of sailboats, so that no doubt remained.

such simple balloons
The islands were made in parallel with castles. Castles had to be drawn so that visually they fit tightly on the rocks. To do this, I added small trees below the base of the castles, they hid flaws. Accordingly, the size and shape of the rocks were adjusted to the base of the castles. He drew all objects in a vector, so that later there would be no problems with scaling.
For a change and expansion of the already known gameplay, I came up with 3 types of locks:



10 levels of the colony, and 5 levels each for the academy and the mill.

Well, the rocks didn’t turn out anything like that.
Clouds as well as rocks are needed to compose locations from them. Create an atmosphere and give the picture depth. I made more varieties.

made darker so as not to blend with the background of the page

sketch of the splash screen
With the interface, my friend and advanced designer Alexander helped me . I asked him to somehow arrange the menu and buttons, pick up the font, make some kind of thread frame. I did the rest of the interface elements myself. There is nothing ordinary in the interface as you see.


from sketch to implementation

that was how the sketches looked.
You probably couldn’t bother with them, but I still decided to do everything as I planned. They didn’t take much time from me, yet the style was already developed. Spent more time on the correct translation of the contents of the instructions. Friends also helped with the translation. As a result, we got such pictures. You can find full-size options in the game by clicking “How to play” in the main menu.

I confess English, I know poorly and my friends are amazed at how I manage to communicate with sponsors and agree on something at all. Nevertheless, I am not worried and usually correspond with sponsors on my own. I ask friends to help me only when I want to be really understood correctly, or I can not formulate a phrase.
As I said, the gameplay is not tricky and there are no complicated calculations here. I will only describe how the levels and computer work are arranged.
Each level is one frame in the timeline. In each frame, the background, mountains and clouds are placed on the bottom layer so that a complete picture is formed. Mountains and clouds are simply graphics. But castles are already MovieClips, representatives of the Castle class. Locks are placed in the frame over the formed background on top of the rocks and each castle is given an instance name. In the same frame, the script registers the addition of each lock by the name instance to the Castles array. In the game, a global array of Castles is set, which is cleared before each level is launched and filled with links to the locks placed in the current frame. After that, level processing starts. Thus, all the necessary level information is stored directly in the frame.
The brain of the computer was arranged quite simply. The game has 2 opponents: yellow and red. At the beginning of each level, the frequency of calculation and decision-making is set separately for the yellow and separately for the red computer, for example, once per second. Each time the time is right, the computer calculates the most profitable goal for itself. This goal is determined depending on the distance to the enemy castle, the number of units in it, the level of the castle, etc. All these values are expressed by coefficients and the computer simply multiplies them and writes the resulting clean array. The number of elements in the array is equal to the number of locks. Each element of the array is a regular number, showing the coefficient of the effectiveness of the attack on the castle. The lower the number, the more advantageous the target for the attack. We are looking for the smallest value in the array and the index of its element will correspond to the index of the weakest or most profitable castle for attack. After that, just send the balls there. That's all the computer work.
He did not write music himself. This puzzled my friend, proxiper composer . For several days he wrote a background theme, and also picked up the necessary sounds. The background theme consists of two parts. First, the introduction starts and the listener for the end event is installed on it. When this event is triggered, a looping theme starts.
The beta test, as expected, suggested a search for bugs. There were not many bugs, there was nothing special to bug, but it was worth working on the balance of levels. As a result, after several walkthroughs of the game with various settings, I selected the optimal, in my opinion, parameters. Of course, it was possible to fix a lot of things, but the time allotted for development was already out, and therefore I simply scored some shortcomings. Moreover, they were very insignificant and had little effect on gameplay.
Selling the game to the sponsor is what this experiment was ultimately put into. It was terribly interesting how much they would offer for this work and whether they would offer anything at all. I admit, I had no doubt that they would give more than $ 2000 for the game, although my friends who watched with me at the auction initially thought that $ 1000 was the ceiling. I asked mrBadim to make the first bet, so that the game moved from the meta and other sponsors began to interrupt his bet. Thus, the auction began with $ 300. Below is the log of proposals:
> 2010-03-26 09:52:14 jaludo_s $ 3000.00 primary FGL [reentering bid to correct log in our system] Accepted
2010-03-05 18:14:41 jaludo_s $ 3000.00 primary Intro
2010-03-04 09:31:38 Gimme5Games $ 2000.00 primary Require: Sponsor logo, links, hi-score API
2010-03-04 07:56:48 SpilGames_Martine $ 1900.00 primary Branding + API integration
2010-03-03 10:42: 11 Gimme5Games $ 1800.00 primary Require: Sponsor logo, links, hi-score API
2010-03-03 08:50:33 SpilGames_Martine $ 1750.00 primary Branding + API integration
2010-03-01 17:08:51 lorenz $ 1000.00 other Non exclusive, integration api & highscores (+ translati ...
2010-03-01 13:09:53 Gimme5Games $ 1600.00 primary Require: Sponsor logo, links, hi-score API
2010-02-28 07:55:36 jaludo_s $ 1500.00 primary Intro and branding
2010-02-26 11:25:14 Gimme5Games $ 1100.00 primary Require: Sponsor logo, links, hi-score API
2010-02-25 06:05:57 jaludo_s $ 1000.00 primary Intro and branding
2010-02-22 03:47:43 elite_games $ 800.00 primary preloader and main menu logos, more games link. cpmstar
2010-02-19 12:49:22 armorgames $ 600.00 other Cpmstar ads allowed on the viral version
2010-02-19 08:12:04 elite_games $ 300.00 primary preloader and main menu logos, more games link. cpmstar
I didn’t like Jaludo's offer at first. I wanted to place cpm star ads in the game, but that didn’t suit him. We talked with him for a long time, but he did not agree. In the end, I accepted the Gimme5Games bet. I decided that $ 1000 is quite possible to earn on advertising. To other mochi and cpmstar developers, advertising brings quite large amounts, which means it will bring me quite a few. In any case, it was necessary to try and find out what and how. But Gimme5Games turned out to be that dynamo. They had some problems with the server and he could not give me the necessary assets and scripts, and asked me to wait a bit. For 2 or more weeks he fed me promises, saying that in a couple of days everything will give and as soon as I insert the scripts he will transfer money to me. But I didn’t like these promises at all and I gave him an ultimatum, or pay in advance an advance of 50% of the rate, or I’ll go to the FGL and tell them to cancel this bet and I will accept the Jaludo bet. Meanwhile, I wrote to Jaludo that if he even allows me cpmstar ads in the game, I will accept his bet. Jaludo agreed and now, without a shadow of a doubt, I turned to the FGL administration with a request to change the already accepted rate. FGL said that the interests of the developer are more important for them than the interests of the sponsor and quickly changed the accepted rate on the proposal of Jaludo. There were no problems with Jaludo, within a week he transferred me $ 3,000 by international transfer to the bank. that the interests of the developer are more important for them than the interests of the sponsor and quickly changed the accepted rate on the proposal of Jaludo. There were no problems with Jaludo, within a week he transferred me $ 3,000 by international transfer to the bank. that the interests of the developer are more important for them than the interests of the sponsor and quickly changed the accepted rate on the proposal of Jaludo. There were no problems with Jaludo, within a week he transferred me $ 3,000 by international transfer to the bank.
This is how stubbornness and determination are rewarded. Everything turned out exactly the same as those guys who wrote about their success in this business. The focus on results has borne fruit; huge experience has been gained not only in development, but also in the organization of work, which is also important.
We get acquainted with the result here

The idea for the game.
Everything is pretty simple here. I selected an idea that I could implement on my own without outside help, so that I would not have to stumble at every step and the development would not turn into hard labor and unfinished construction. Before that, I had already started making games more than once, and each time I did not finish the job. Therefore, having analyzed the previous experience, I changed the strategy and decided that it was necessary at all costs to create a finished product. That is, I decided to make the game not for the sake of the process, as it often happens when you lick the graphics and code when getting involved in the process, but for the sake of the result, which can be presented just as a finished product, and not as a work-in-progress. Therefore, I did not come up with anything complicated and decided to just make an analogue of some thread of a flash game. One of the games I liked then was called Elite Forces: Clone Warswhich many famous mrBadim did . Looking at the mechanics, I realized that I could fully implement such gameplay. In addition, there are very few such games and one more will definitely not be.
Now I had to think about the appearance. I never liked the view from above, and doing something in isometry is difficult, so without much thought, I settled on a side view. In addition, the side view allows you to more spatially show the levels, because in the background you can put a lot of things and thereby create a sense of depth. So the view was also determined quickly.
It was also to come up with who will fight with whom and where the game will take place. The first sketches were not long in coming. I immediately decided that these would be flying objects, because the troops would only move in a straight line and no curved routes were allowed. The castles themselves will be on the tops of the cliffs, which cannot be reached by any means other than by air. Some rocks will hang in the air. Each rock will be a separate object to use them more than once. And the case will occur high among the clouds. Clouds are not difficult to draw, an extraordinary background is drawn once and used for all levels, there is space, and some kind of romance immediately appears, it’s a sin not to take advantage of all the advantages.
There will be three sides competing for the possession of castles and dominance in the territory, distinguished mainly by colors. Initially, I wanted these to be flying sailboats, but then I still did not know how to mirror the object in the opposite direction ( scaleX ) and therefore decided to use balloons, it is not necessary to deploy them.

The general concept in the form of a pencil sketch was before my eyes, and now, when I imagined the approximate amount of work, it was necessary to determine the time frame. Since I approached the solution of the problem strategically, it was also very important to limit the time to complete each task. This restriction played a dual role:
- Self discipline. You can’t sit too long on honing parts for too long; getting carried away with this process, you can completely forget about time. Each object has its own time and it’s not possible to spend more time on a small simple object than on a more complex one.
- If I sell the game, it is important that the time spent on development pays off. To develop a game for a month and earn $ 500 from its sale is not a big interest.
During the analysis of the required amount of work, I estimated the approximate time to draw each object and then summed up the hours. Of course, I took time to the maximum and added on top for all sorts of unforeseen situations. He also counted the time for sleep, food, rest and it turned out about 10 days. Well, I think with special care you can do it in 7 days, and so I gave myself a period of a week for everything.
Work began to boil. I put myself in a tight framework and I even liked it. I felt a certain satisfaction that I kept myself in tight rein and did not let myself go. I had a clear plan of action, all the tasks were in order, each time had its own time. If I didn’t have time and spent more time than planned, I did the next task at double speed to catch up. Of course, everything could not go as planned originally. In the process, new tasks and difficulties appeared that I did not suspect about when drawing up the general plan.
I also wrote down all emerging tasks in order by a numbered list on separate sheets, and each such sheet was a sub-plan. Large tasks were also divided into subtasks that were recorded in order on a separate sheet. Upon completion, the task was deleted from the list. Later, I noticed that the formation of such lists also plays an important role. Tasks written on paper and not in the head are not forgotten. In addition, deleting or marking the task as completed has psychological significance. Looking at the lists of solved problems, progress is visible. Every evening I picked up sheets with crossed out tasks, looked through them and sometimes marveled at how much I could do in such a short period of time. This is a great feeling. I was very proud of myself.
Balls.

I started by rendering units. At first it was supposed to be sailboats, but I refused them. The reason I described above. In addition, the sailboat is still a more bulky object and it has more details. I would not want when the ships began to fly across the screen, the porridge from them would create confusion. Balls are still easier to perceive, they are a more holistic object. Nevertheless, I still threw a few sketches of sailboats, so that no doubt remained.

such simple balloons
Islands and castles
The islands were made in parallel with castles. Castles had to be drawn so that visually they fit tightly on the rocks. To do this, I added small trees below the base of the castles, they hid flaws. Accordingly, the size and shape of the rocks were adjusted to the base of the castles. He drew all objects in a vector, so that later there would be no problems with scaling.
For a change and expansion of the already known gameplay, I came up with 3 types of locks:

- Colony - the main type of castle generating the bulk of the troops. The higher the castle level, the faster troops are generated in it. Can be upgraded to level 10.
- Academy - balls sent from this building have a much greater speed of movement. The higher the level of this building, the higher the speed of the balls flying out of there. Can be upgraded to level 5.
- Mill - every second brings one $ for each soldier inside. If there are 20 balls inside, then the mill brings in $ 20 every second. To receive money from the mills, you can improve all your castles. As soon as there is enough money to upgrade some kind of lock, an “UP” arrow appears above it. The mill can be upgraded to level 5.


10 levels of the colony, and 5 levels each for the academy and the mill.

Well, the rocks didn’t turn out anything like that.
The clouds.
Clouds as well as rocks are needed to compose locations from them. Create an atmosphere and give the picture depth. I made more varieties.

made darker so as not to blend with the background of the page
Interface and its elements.

sketch of the splash screen
With the interface, my friend and advanced designer Alexander helped me . I asked him to somehow arrange the menu and buttons, pick up the font, make some kind of thread frame. I did the rest of the interface elements myself. There is nothing ordinary in the interface as you see.


from sketch to implementation
Instructions.

that was how the sketches looked.
You probably couldn’t bother with them, but I still decided to do everything as I planned. They didn’t take much time from me, yet the style was already developed. Spent more time on the correct translation of the contents of the instructions. Friends also helped with the translation. As a result, we got such pictures. You can find full-size options in the game by clicking “How to play” in the main menu.

I confess English, I know poorly and my friends are amazed at how I manage to communicate with sponsors and agree on something at all. Nevertheless, I am not worried and usually correspond with sponsors on my own. I ask friends to help me only when I want to be really understood correctly, or I can not formulate a phrase.
Programming
As I said, the gameplay is not tricky and there are no complicated calculations here. I will only describe how the levels and computer work are arranged.
Each level is one frame in the timeline. In each frame, the background, mountains and clouds are placed on the bottom layer so that a complete picture is formed. Mountains and clouds are simply graphics. But castles are already MovieClips, representatives of the Castle class. Locks are placed in the frame over the formed background on top of the rocks and each castle is given an instance name. In the same frame, the script registers the addition of each lock by the name instance to the Castles array. In the game, a global array of Castles is set, which is cleared before each level is launched and filled with links to the locks placed in the current frame. After that, level processing starts. Thus, all the necessary level information is stored directly in the frame.
The brain of the computer was arranged quite simply. The game has 2 opponents: yellow and red. At the beginning of each level, the frequency of calculation and decision-making is set separately for the yellow and separately for the red computer, for example, once per second. Each time the time is right, the computer calculates the most profitable goal for itself. This goal is determined depending on the distance to the enemy castle, the number of units in it, the level of the castle, etc. All these values are expressed by coefficients and the computer simply multiplies them and writes the resulting clean array. The number of elements in the array is equal to the number of locks. Each element of the array is a regular number, showing the coefficient of the effectiveness of the attack on the castle. The lower the number, the more advantageous the target for the attack. We are looking for the smallest value in the array and the index of its element will correspond to the index of the weakest or most profitable castle for attack. After that, just send the balls there. That's all the computer work.
Music and sounds.
He did not write music himself. This puzzled my friend, proxiper composer . For several days he wrote a background theme, and also picked up the necessary sounds. The background theme consists of two parts. First, the introduction starts and the listener for the end event is installed on it. When this event is triggered, a looping theme starts.
Beta test
The beta test, as expected, suggested a search for bugs. There were not many bugs, there was nothing special to bug, but it was worth working on the balance of levels. As a result, after several walkthroughs of the game with various settings, I selected the optimal, in my opinion, parameters. Of course, it was possible to fix a lot of things, but the time allotted for development was already out, and therefore I simply scored some shortcomings. Moreover, they were very insignificant and had little effect on gameplay.
Register on FlashGameLicense and search for a sponsor.
Selling the game to the sponsor is what this experiment was ultimately put into. It was terribly interesting how much they would offer for this work and whether they would offer anything at all. I admit, I had no doubt that they would give more than $ 2000 for the game, although my friends who watched with me at the auction initially thought that $ 1000 was the ceiling. I asked mrBadim to make the first bet, so that the game moved from the meta and other sponsors began to interrupt his bet. Thus, the auction began with $ 300. Below is the log of proposals:
> 2010-03-26 09:52:14 jaludo_s $ 3000.00 primary FGL [reentering bid to correct log in our system] Accepted
2010-03-05 18:14:41 jaludo_s $ 3000.00 primary Intro
2010-03-04 09:31:38 Gimme5Games $ 2000.00 primary Require: Sponsor logo, links, hi-score API
2010-03-04 07:56:48 SpilGames_Martine $ 1900.00 primary Branding + API integration
2010-03-03 10:42: 11 Gimme5Games $ 1800.00 primary Require: Sponsor logo, links, hi-score API
2010-03-03 08:50:33 SpilGames_Martine $ 1750.00 primary Branding + API integration
2010-03-01 17:08:51 lorenz $ 1000.00 other Non exclusive, integration api & highscores (+ translati ...
2010-03-01 13:09:53 Gimme5Games $ 1600.00 primary Require: Sponsor logo, links, hi-score API
2010-02-28 07:55:36 jaludo_s $ 1500.00 primary Intro and branding
2010-02-26 11:25:14 Gimme5Games $ 1100.00 primary Require: Sponsor logo, links, hi-score API
2010-02-25 06:05:57 jaludo_s $ 1000.00 primary Intro and branding
2010-02-22 03:47:43 elite_games $ 800.00 primary preloader and main menu logos, more games link. cpmstar
2010-02-19 12:49:22 armorgames $ 600.00 other Cpmstar ads allowed on the viral version
2010-02-19 08:12:04 elite_games $ 300.00 primary preloader and main menu logos, more games link. cpmstar
I didn’t like Jaludo's offer at first. I wanted to place cpm star ads in the game, but that didn’t suit him. We talked with him for a long time, but he did not agree. In the end, I accepted the Gimme5Games bet. I decided that $ 1000 is quite possible to earn on advertising. To other mochi and cpmstar developers, advertising brings quite large amounts, which means it will bring me quite a few. In any case, it was necessary to try and find out what and how. But Gimme5Games turned out to be that dynamo. They had some problems with the server and he could not give me the necessary assets and scripts, and asked me to wait a bit. For 2 or more weeks he fed me promises, saying that in a couple of days everything will give and as soon as I insert the scripts he will transfer money to me. But I didn’t like these promises at all and I gave him an ultimatum, or pay in advance an advance of 50% of the rate, or I’ll go to the FGL and tell them to cancel this bet and I will accept the Jaludo bet. Meanwhile, I wrote to Jaludo that if he even allows me cpmstar ads in the game, I will accept his bet. Jaludo agreed and now, without a shadow of a doubt, I turned to the FGL administration with a request to change the already accepted rate. FGL said that the interests of the developer are more important for them than the interests of the sponsor and quickly changed the accepted rate on the proposal of Jaludo. There were no problems with Jaludo, within a week he transferred me $ 3,000 by international transfer to the bank. that the interests of the developer are more important for them than the interests of the sponsor and quickly changed the accepted rate on the proposal of Jaludo. There were no problems with Jaludo, within a week he transferred me $ 3,000 by international transfer to the bank. that the interests of the developer are more important for them than the interests of the sponsor and quickly changed the accepted rate on the proposal of Jaludo. There were no problems with Jaludo, within a week he transferred me $ 3,000 by international transfer to the bank.
This is how stubbornness and determination are rewarded. Everything turned out exactly the same as those guys who wrote about their success in this business. The focus on results has borne fruit; huge experience has been gained not only in development, but also in the organization of work, which is also important.
We get acquainted with the result here