Tower Defense Game Tutorial
#41
Posted 08 March 2009 - 11:43 AM
anyway...i changeed the highest level of each tower to 100...when they got there they were doing 9459358(something like that) damage...lol
#42
Posted 19 March 2009 - 11:13 PM
#43
Posted 20 May 2009 - 02:03 PM
Edited by funlerz, 21 May 2009 - 11:59 AM.
#44
Posted 30 May 2009 - 11:31 PM
EDIT: How do I make the small explosions get created when the laser hits the enemy?
This is a great tutorial! I was wondering if you could throw in a pro one where the turrets aim towards the enemies.
That could be easily done in unregistered too...
Edited by razourik, 31 May 2009 - 11:45 PM.
#45
Posted 11 June 2009 - 02:02 PM
#46
Posted 14 June 2009 - 11:45 PM
Razourik's TD tut
Check it out, theres lots of things to be learned from it that werent in the original tut.
#47
Posted 24 June 2009 - 03:44 PM
Can you explain to me how to create these 2 features?
1. when the user presses say the delete key the tower selected from the menu that hasn't been placed yet will be destroyed and the price of the tower will go back into money.
2. stun the enemy for 5 sec then go back to normal speed without getting off the path.
Thanks
RedSoxFan
EDIT: Nevermind fiqured it out
Edited by RedSoxFan, 24 June 2009 - 11:10 PM.
#48
Posted 24 June 2009 - 03:53 PM
ask in novice?Awesome Tutorial!
Can you explain to me how to create these 2 features?
1. when the user presses say the delete key the tower selected from the menu that hasn't been placed yet will be destroyed and the price of the tower will go back into money.
2. stun the enemy for 5 sec then go back to normal speed without getting off the path.
Thanks
RedSoxFan
#49
Posted 06 July 2009 - 09:21 AM
This is really good, and I will give you credit for the game, but i need some help.
How do you make enemy waves different,
for example 12 bombs come on wave 1 and wave 2 30 bombs and 15 blue bombs come and on wave 100, about 1000 rainbow bombs, 500 yellow bombs, and so on.
How do you have multi-enemy waves?
How do you make flame tower fire like using the particle function. It shoots out fire rapidly.
How do you make a ice blower tower. I make a single ice particle sprite and make it into a blower which blows lots of ice particles. It is still but targets bombs.
How do you make a tower rotate in the enemies direction?
How do you make a tower shoot; not one enemy but lots. When i put different types like red, blue, yellow, rainbow, white bombs, they only get the red bomb?? I want them to target every single type.
How do you make spikes. You can only place them on the path and they do not fire. They stay there and destroys upto 10 bombs and then it's gone.
A different upgrade system; like instead of upgrading to lvl 1 and all that, you could upgrade to example: "FROST TOWER" upgrade to PERMA FROST or FAST FIRING or FROST BOMBS?
Instead of a wave counter, could you have no, just a start round button? When a whole wave is finished, the start round button appears.
When your mouse hovers a button like THE FROST TOWER, a description appears like FROST TOWER, includes power and rate of fire.
A booster. If you place them near towers, they increase the surronding towers (in it's radius) power.
Bombs multiplying. If a black bomb is destroyed, if a blue bomb is destroyed, a black bomb appears just like in bloons tower defense how a blue bloon pops into a red bloon.
Screen clear function: If you click on like blackhole, a blackhole will appear in the center of the screen and suck up lots of bombs for 10 seconds.
Or if you activate "Atom BOMB" it clears the whole screen.
Grenade thrower. If bombs come, it starts spinning really fast shooting out 1 grenade every 2 millisecond at the enemy. But the grenades are very weak.
Immunities, like if you place an ICE BLOWER, it doesn't effect an ice bomb or if you place a FLAME TOWER it doesn't effect Fire bombs.
4 direction shooters. If you place one of these, it will shoot in all 4 directions at the enemy. good in corners.
How do you do all that? I tried, it didn't work.
Edited by buzzy, 06 July 2009 - 09:29 AM.
#50
Posted 07 July 2009 - 05:18 AM
How do I make the small explosions get created when the laser hits the enemy?
OK. To make small explosions appear when the laser hits the enemy, you need a explosion sprite. If your LASER projectile is an object, in "Collision with enemy" event add the Destroy the instance to enemy. And add another event " DESTROY" and then add in Create Instance of explosion 0, 0, relative, but you will need an explosion object. And then add Animation End into the event FOR the explosion and then add destroy the instance to SELF.
#51
Posted 06 September 2009 - 07:26 PM
#52
Posted 07 September 2009 - 06:06 PM
how do you make the towers aim towards the enemies then?This is an excellent tower defense engine!
I just wish that there was a button you could press to release the next wave, and if possible also a code that makes the new wave's enemies have the next enemy subimage so that all the waves wouldnt look the same. But other than that, great job!
EDIT: How do I make the small explosions get created when the laser hits the enemy?![]()
This is a great tutorial! I was wondering if you could throw in a pro one where the turrets aim towards the enemies.
That could be easily done in unregistered too...
#53
Posted 29 September 2009 - 11:25 PM
I've been following and making the changes I'm looking for to my game.
I've got a couple questions for a couple of my modifications.
1. Some of the newer tower defense games are "free-style", where there is a start point and an end point, and the enemies find their own way to the end point based on the way you place the towers in their path...
So, I'm looking for some method of pathfinding, while avoiding the objects I place... BUT, in my tests, the "Step Towards Point while avoiding" pre-made function gets confused pretty easy. Any ideas?
2. Along with the first issue, I want to stop you from placing a tower in a position that would block the only path to the end, i.e. a check to make sure there is still a valid path before allowing you to place the tower there.
ANY HELP WOULD BE MUCH APPRECIATED!
Thanks
#54
Posted 30 October 2009 - 03:41 PM
I just don't know how to make new towers and add them to the menu
#55
Posted 18 December 2009 - 09:16 PM
just wondering.
Edited by Sonicdog999, 18 December 2009 - 09:18 PM.
#56
Posted 29 December 2009 - 07:38 PM
Edited by 1Sunkist64, 29 December 2009 - 11:12 PM.
#57
Posted 29 March 2010 - 04:29 AM
I have been studying this tutorial for about 3 months while making my game 'Paper Mario Tower Defence' and probably know almost as much as the creator about this tutorial so I'll help on the things that I know about.Your tutorial is VERY COOL!
This is really good, and I will give you credit for the game, but i need some help.
How do you make enemy waves different,
for example 12 bombs come on wave 1 and wave 2 30 bombs and 15 blue bombs come and on wave 100, about 1000 rainbow bombs, 500 yellow bombs, and so on.
How do you have multi-enemy waves?
How do you make flame tower fire like using the particle function. It shoots out fire rapidly.
How do you make a ice blower tower. I make a single ice particle sprite and make it into a blower which blows lots of ice particles. It is still but targets bombs.
How do you make a tower rotate in the enemies direction?
How do you make a tower shoot; not one enemy but lots. When i put different types like red, blue, yellow, rainbow, white bombs, they only get the red bomb?? I want them to target every single type.
How do you make spikes. You can only place them on the path and they do not fire. They stay there and destroys upto 10 bombs and then it's gone.
A different upgrade system; like instead of upgrading to lvl 1 and all that, you could upgrade to example: "FROST TOWER" upgrade to PERMA FROST or FAST FIRING or FROST BOMBS?
Instead of a wave counter, could you have no, just a start round button? When a whole wave is finished, the start round button appears.
When your mouse hovers a button like THE FROST TOWER, a description appears like FROST TOWER, includes power and rate of fire.
A booster. If you place them near towers, they increase the surronding towers (in it's radius) power.
Bombs multiplying. If a black bomb is destroyed, if a blue bomb is destroyed, a black bomb appears just like in bloons tower defense how a blue bloon pops into a red bloon.
Screen clear function: If you click on like blackhole, a blackhole will appear in the center of the screen and suck up lots of bombs for 10 seconds.
Or if you activate "Atom BOMB" it clears the whole screen.
Grenade thrower. If bombs come, it starts spinning really fast shooting out 1 grenade every 2 millisecond at the enemy. But the grenades are very weak.
Immunities, like if you place an ICE BLOWER, it doesn't effect an ice bomb or if you place a FLAME TOWER it doesn't effect Fire bombs.
4 direction shooters. If you place one of these, it will shoot in all 4 directions at the enemy. good in corners.
How do you do all that? I tried, it didn't work.
'How do you make enemy waves different,
for example 12 bombs come on wave 1 and wave 2 30 bombs and 15 blue bombs come and on wave 100, about 1000 rainbow bombs, 500 yellow bombs, and so on.'
You have to use something like this(this is what you replace in the tutorial script starting at //Creates enemies if needed for every array):
//Creates enemies if needed for every array
if wave_time < 600 wave_time += 1; //the 600 is the amount of seconds in the wave before the next wave comes.
if wave_enemies > 0 //this asks if there are any enemies left.
{
if(wave_time = (ee-wave_enemies)*15+15) //I recently found out that the 15's are the spaces between the enemies when they are created.
{
switch(floor(wave/1)) //this will switch the enemy every wave. Change the 1 to another number to have it switch for more waves. ex:if set to 2 then ob_enemy1 will be the enemy fought for 2 waves. Once you run out of 'cases' no more enemies will come.
{
case 1:instance_create(-32,0,ob_enemy1); break;
case 2:instance_create(-32,0,ob_enemy2); break;
case 3:instance_create(-32,0,ob_enemy3); break;
'How do you have multi-enemy waves?'
Again start replacing at the creates enemy for every array:
//Create enemies if needed for every array
if wave_time < 600 wave_time += 1;
if wave_enemies > 0
{
if wave_time = (ee-wave_enemies)*15+15
{
instance_create(-32,0,choose(ob_enemy1,ob_enemy2,ob_enemy3));//this will make a random enemy from the 3 enemies there. You can have up to 16 enemies.
wave_enemies -= 1;
}
}
Can't help you with the particle questions unfortunately.
I can't remember how make the tower rotate in the enemy's direction will try to figure that out because I want to know how to too.
'How do you make a tower shoot; not one enemy but lots. When i put different types like red, blue, yellow, rainbow, white bombs, they only get the red bomb?? I want them to target every single type.'
Have an 'ob_parent_enemy' and make it the parent of all enemies. Go into all of your towers and change the codes that say 'ob_enemy' to ob_parent_enemy.'
'How do you make spikes. You can only place them on the path and they do not fire. They stay there and destroys upto 10 bombs and then it's gone.'
This would be complicated becuase it would be a mix between tower and bullet and I haven't tried it so I can't help there. I couldn't help with the different upgrade idea yet either but I might get back to you if I figure it out in my next td game becuase I'm having that in it.
'Instead of a wave counter, could you have no, just a start round button? When a whole wave is finished, the start round button appears.'
Get rid of everything that mentions 'wave_time.'
'When your mouse hovers a button like THE FROST TOWER, a description appears like FROST TOWER, includes power and rate of fire.'
This is also very complicated and I couldn't tell you how. The booster idea is interesting, I'll try it and get back to you.
'Bombs multiplying. If a black bomb is destroyed, if a blue bomb is destroyed, a black bomb appears just like in bloons tower defense how a blue bloon pops into a red bloon.'
I noticed that many of your ideas are from bloons. You confused me so I'll use bloons as the example. Make it so that in the blue bloon's destroy event it changes into a red bloon(or two or three etc.).
'Screen clear function: If you click on like blackhole, a blackhole will appear in the center of the screen and suck up lots of bombs for 10 seconds.
Or if you activate "Atom BOMB" it clears the whole screen.'
Create a sprite that gets bigger in an animation. If you are using gm8 then seperate the collision masks. Then make it an object with these events.
CREATE
(not code)set alarm 0 to 300
ALARM 0
(not code)destroy instance, applied to 'self'
COLLISION WITH ENEMY/ENEMY PARENT
(not code)destroy instance, applied to 'other'
END OF ANIMATION
(code)
image_speed=0
'Grenade thrower. If bombs come, it starts spinning really fast shooting out 1 grenade every 2 millisecond at the enemy. But the grenades are very weak.'
duplicate a bullet tower(any one that fires a bullet not a laser) then go into the create event and set 'rate' to 0.2 and 'damage' to 1.
Can't help with immunities and will get back to you for the four direction shooter.
Wow you have alot of questions, It took me an hour to write this reply.
If you have anymore questions then ask, though if you pm me I'll reply to you then put it on the thread.
#58
Posted 29 March 2010 - 06:48 AM
#59
Posted 19 April 2010 - 02:36 AM
What should I include to help you know where my problem is? Also in my step event. The program doesn't find ii.price anywhere, calls it an unexpected variable.
#60
Posted 20 April 2010 - 03:36 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











