Jump to content


Photo
* * * * * 1 votes

Tower Defense Game Tutorial


  • Please log in to reply
109 replies to this topic

#61 cristiander

cristiander

    GMC Member

  • GMC Member
  • 770 posts
  • Version:GM8

Posted 30 April 2010 - 07:24 PM

I've worked a lot with this program and I actually made a lot of progres in my programing.

I managed to create 2 more bullet tipe of towers

I have 6 tipes of enemyes (3 normal enemyes, 1 fast, 1 minibos, 1 boss)

But now I got stuck!
I was tring to make 2 more tipes of towers(this time lasers) And I dosn't work!
One of them ... if you click the buy button is put's the tower where the button is.
The other one can't be selected. If I clck on it nothing hapenes. No circle arund him, no upgrades, nothing.
And they were nothing more than direct clones of the laser tower(and yes, I replace every "ob_tower_laser" with my tower but it still dosn't work)
  • 0

#62 njp

njp

    Panda

  • GMC Member
  • 2325 posts
  • Version:GM8

Posted 01 May 2010 - 01:29 AM

cant TD (tower defense) be confused with TD (top-down)... just putting it out there, or am i wrong? :D
  • 0

#63 12warr12

12warr12

    GMC Member

  • GMC Member
  • 678 posts
  • Version:Unknown

Posted 01 May 2010 - 08:12 AM

cant TD (tower defense) be confused with TD (top-down)... just putting it out there, or am i wrong? :D


well, when someone makes a Top-Down, they put infront of the name, if its a shooter or w/e. TDS... I have never seen anyone saying TD for a Top down game. Only TDS
  • 0

#64 aaabbbccc

aaabbbccc

    GMC Member

  • GMC Member
  • 521 posts

Posted 09 May 2010 - 01:50 AM

Hi, for some reason, my laser towers won't shoot (Yes im using GM 8) But the cannon tower shoot's just fine. and your tutorial opened and works in GM 8 (pro) so it's not that.

What codes do you need to see to help?

Also, the waves don't work, they just constantly send, and i don't get money from killing.
  • 0

#65 Devilfromhost12

Devilfromhost12

    GMC Member

  • GMC Member
  • 735 posts

Posted 09 May 2010 - 02:26 AM

I played this awhile back (Like in 09) and it is pretty good. Very good job.
  • 0

#66 captain_bakaneko

captain_bakaneko

    GMC Member

  • New Member
  • 7 posts

Posted 16 May 2010 - 11:58 PM

Great tut, worked over it and made my own TD, got rid of your Path system, it wasn't to my liking, and made my own the only thing i'm stuck with is unselecting the towers, with right click I tried a few things but they failed. How can you turn off selecting? is it the Activate thing or is that to ... wait don't tell me it's activate.. nope that was a fail too.. i tried to change activate to 2, thinking it will be off, but nope.
here's what i got so far
  • 0

#67 12warr12

12warr12

    GMC Member

  • GMC Member
  • 678 posts
  • Version:Unknown

Posted 20 May 2010 - 12:35 PM

why upload to megaupload, if you can upload to mediafire, wich is much easyer and it doesn't require an account?
  • 0

#68 Kyox

Kyox

    GMC Member

  • New Member
  • 2 posts

Posted 09 July 2010 - 09:30 PM

How do you animate the tower to 'follow' the monster it's targeting? Kinda like it got it's target locked?

I'm new with game maker and I'm making my first game. I used this tutorial to set the basics and it helped me a lot, thx! :)
  • 0

#69 Hygo25

Hygo25

    GMC Member

  • New Member
  • 52 posts

Posted 10 July 2010 - 12:37 AM

I did the math, and the Laser Tower is more effective than the Cannon Tower, and cheaper too.
  • 0

#70 PlatformGames

PlatformGames

    GMC Member

  • New Member
  • 49 posts

Posted 30 July 2010 - 04:16 AM

i would use this but if you buy the 1st tower you can buy the second tower but you go negative cash..
  • 0

#71 pie_man

pie_man

    GMC Member

  • New Member
  • 1 posts

Posted 05 August 2010 - 02:46 PM

How do you animate the tower to 'follow' the monster it's targeting? Kinda like it got it's target locked?

I'm new with game maker and I'm making my first game. I used this tutorial to set the basics and it helped me a lot, thx! :)

This is the code to make the object point to a specific point:
direction=point_direction(x,y,object?.x,object?.y)
If you want the object's angle to change, create an end step event and put in the transform sprite action (pro) and set the angle to the direction. Otherwise, if you use lite and your sprite has equal height and width, just make a sprite with 360 images (using the animate menu and then choose "Rotation seguence > Clockwise" and choose 360 frames+degrees) and then set the image index (image_index) to the direction.
  • 0

#72 _168004

_168004

    GMC Member

  • New Member
  • 1 posts

Posted 22 August 2010 - 05:28 PM

I am trying to make canyon defense on game maker and would like a few tips on how to make a set number of levels, three difficulty settings, all the different enemies from canyon defense and their health amounts as well as special abilities like autorepair, shielded, different level enemies, fast, etc.etc.etc. Someone please help me on this one.
  • 0

#73 Chazzmundo

Chazzmundo

    GMC Member

  • New Member
  • 275 posts
  • Version:GM8

Posted 23 August 2010 - 12:00 AM

actually love this tut, gave me a basic framework i can work on. So far have changed the layout, have got 6 new towers types, 4 VERY different enemy types, and a nice menu with abilities and an overview of the current selected tower :)
  • 0

#74 jourdan

jourdan

    GMC Member

  • GMC Member
  • 2 posts

Posted 26 August 2010 - 08:14 PM

Great tut

Posted Image
  • 0

#75 ToiLeT

ToiLeT

    GMC Member

  • New Member
  • 3 posts

Posted 12 September 2010 - 11:17 AM

How would i make the turret angle change so it always follows the target? (i am a GML noob :( )
  • 0

#76 Hiddenaces

Hiddenaces

    GMC Member

  • New Member
  • 418 posts

Posted 12 September 2010 - 11:32 AM

How would i make the turret angle change so it always follows the target? (i am a GML noob :( )

look 4 posts up ... some times it really pays to read the posts and not just ask straight away :)
  • 0

#77 ToiLeT

ToiLeT

    GMC Member

  • New Member
  • 3 posts

Posted 12 September 2010 - 12:24 PM


How would i make the turret angle change so it always follows the target? (i am a GML noob :( )

look 4 posts up ... some times it really pays to read the posts and not just ask straight away :)

I tried that but when i play the game it comes up with an error which says:

Error in code at line 1:
direction=point_direction(x,y,obj_enemy.x,obj_enemy.y)
^
at position 41: Unknown variable x

please help :(
  • 0

#78 Snopel

Snopel

    GMC Member

  • New Member
  • 61 posts

Posted 21 September 2010 - 10:21 PM

to make the turret face the enemy put this in the step code

if instance_number(Name Of Enemy) > 0
{
nearest = instance_nearest(x,y,Name of Enemy);
image_angle = point_direction(x,y,nearest.x,nearest.y);
}

and this into the draw code

draw_sprite_ext(sprite_index,image_index,x,y,1,1,image_angle,c_white,1)

this should make your turrets face your enemie when shooting(tip you dont need to edit sprite just make sure its facing right
  • 0

#79 Turok

Turok

    GMC Member

  • New Member
  • 3 posts

Posted 11 October 2010 - 01:27 AM

How do i make it so that when a different enemy comes the towers shoot at it.

its seems the towers ignore it completely -_-...

Good tutorial btw, it helped alot.
  • 0

#80 Turok

Turok

    GMC Member

  • New Member
  • 3 posts

Posted 11 October 2010 - 01:32 AM

How do i make it so that when a different enemy comes the towers shoot at it.

its seems the towers ignore it completely -_-...

Good tutorial btw, it helped alot.


Oh btw i tried to use this:

{
var ii, dist, xx, yy;
if firing > 0 firing += 1;
if firing >= 30/rate firing = 0;
if not instance_exists(target) target = noone;
if instance_exists(ob_enemy)
if instance_exists(ob_enemy2)
{
if target = noone target = instance_nearest(x,y,ob_enemy);
if target = noone target = instance_nearest(x,y,ob_enemy2);
if point_distance(x,y,target.x,target.y) > range
target = noone;
...

The towers dont seem to know the second enemy(type) is there... :(
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users