Jason Pook's Games Design Blog

Casual Game- Tower Defence

Leave a comment

So originally for my casual game (the proposal here) i wanted to make a brick breaker style keep the ball up and hit targets football themed game relevant to the stick man kick ball flash animation aboveflash, i was having alot of issues with the coding for this in the form of levels and the collisions in the targets code. Due to thinning time and frustrations hitting a new level i decided it would be best to put this to one side and pursue it in the summer. By doing this i obviously needed a new casual game for my module briefs so i went down the path of a tower defense game, this tower defense game would be styled on many other tower defense games which involve a maze for the enemy to try get from start to finish but you stop them using turrets or methods of some sort. Games like this include Bloons tower defense series which is a hugely popular and now multiplayer game with micro transactions features various monkeys which pop balloon’s  using everything from darts to plasma laser super monkeys.


Heres some more examples of different and popular tower defense games at casualgirlgamer.

So i wanted a tower defense game with a maze and varied difficulties of enemies and a few levels nothing huge or complex but a challenge. The game would need a money value to place the turret onto the game and therefore a money gain function when an enemy died and dependent on the level the higher the money gained. the turrets would have range if i could find a way to show that maybe a hover over radius or click to select tower. obviously a limited amount of levels and lives so the game is both there to win and lose with a reset button on the win/lose screen. the turrets need to fire bullets at the enemies perferably lock on so its not impossible which then means health of the enemies is considered and bullet damaged to that health which will alter with level of enemy. if i have time id like to make different maze levels and possibly more expensive better turrets.

I used a tutorial online at FlashGameTuts to get me a focused on how to program a tower defence game, as we are not here to be master programmers but it helps to understand and be able to work with code. This tutorial was very useful it wasnt spoon fed in all case you had to find and place the code given in the right areas making sure you had everything named correctly matched going to the right areas etc. there was no asisstance if you had done something wrong which allowed you to really read into the code over and over to make sense of what you had to find the problem. I really got far with this tutorial with no compiled errors shown up but as i knew flash wasnt going to be nice to me all the way and i came to a stop mid way through the tutorial. The reason for this was that the coded dynamic text in the user interface at the bottom (hud) which displayed money, lives, level and enemies left, what it was sopposed to do was to display the actual value and then when you did an action that directly affected one of them it would decrease e.g. to place a turret its £20 you start with £100 but instead of displaying 80 it just vanished this happened with each of the dynamic texts. this was the first of the problems it also when winning or losing was sopposed to divert to a win/lose page but soon as this was triggered it flashed between the 2 uncontrollably until you clicked to reset the game. The win/lose slide was a massive issue most flash users will relate to me when i say Capital letter instead of lower case was the issue, so it was easily solved but such a minor mistake will break the script. Despite that i check and checked the code to the given code and it was identical my tutor Paul also looked over it and couldnt find any issues which ultimately said why is it not working then. Using trace ( ) coding to track what the function you are tracing is doing showed no change or issues so the problem was unidentifable. Hitting a dead end i noticed he had set his timeline out differently to me this shouldnt have mattered at all confirmed my tutor as the scripting and keyframes used are the same its just the layout, despite this i decided to restart and lay the timeline out this way and it worked so i was allowed to progress. I then went on to finish the game finally putting in harder enemies and level plans so with frustration, stress and hardwork i had finally completed my casual game.

To make sure that it was not just a straight copy i made sure i tailored features of the game to my own specifications. This included the dynamic text user interface was chosen by myself in wording and colouring, the inclusion of a win/lose frame was my own wording and colour, the main one which was the levels was all my own specifications i decided the spawing of the enemies in amounts,order, level, difficulty and speed. I decided to alter the code for the amount of lives from 20 to 1 so you only get one chance making it tactically more difficult and challenging, i altered the amount of money gained from defeating an enemy the original value was 5 per enemy per level but i changed it to 1 per enemy per level e.g. level 1 kill=1money then level 5 kill= 5money and so on so less money gained upped the difficulty and decreased the amount of turrets you could possibly spawn on screen. This was all down to fine tuning i played the game over and over making it harder then easier altering starting money to amount of lives or money earned it was a tweaking process but it gave my game my own personal touch to it.

I would like to if i have time create another level with a different maze and possible research into having a health bar above the enmies so i can really tweak it to be addictingly close to winning, but this is all time dependent.

Im currently in the process of uploading what i have online as my game so i have a shipped game. Thanks to David Smith for being a games tester giving peer assessment so i could focus on gameplay alterations.


Author: Jason Pook 3D

Current student at Hull School of Art and Design studying Games Design.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s