Jump to content


Photo

Tower Defense Engine


  • This topic is locked This topic is locked
17 replies to this topic

#1 mmaarrkkuuss

mmaarrkkuuss

    GMC Member

  • New Member
  • 212 posts

Posted 02 October 2007 - 08:19 PM

Tower Defense example
Description:Basics of a tower defense game.

Type: Gmk.
Gm version: Game maker 7.0 unregistered.
Link:Posted Image
size: 112 kb.

Other info: Has no upgrade system. Yet. EDIT: Yay! It has now. :medieval:
Posted Image
Posted Image

Covers:
-Standard towers and buttons.
-Upgrade system.
-A creepspawn system which allowes you to make many levels in no time.
-Range.
-Menu
  • 0

#2 Dailyn_Game_maker_in_training

Dailyn_Game_maker_in_training

    GMC Member

  • GMC Member
  • 48 posts

Posted 04 October 2007 - 11:29 PM

Dude the game idea works and i like the basis. When you add the leveling (upgrading) system be sure to have at least five levels per tower cause then it's more fun! With of course the "speacail" towers ex. the strongest ones.
Besides that keep at it we need more TD games. Good Job! <_<
  • 0

#3 mmaarrkkuuss

mmaarrkkuuss

    GMC Member

  • New Member
  • 212 posts

Posted 05 October 2007 - 03:47 PM

Thanks for the nice feedback. :o
I do only plan to make one more tower open source, cause I don't want to give my whole game away. :P
  • 0

#4 dotoriton

dotoriton

    GMC Member

  • New Member
  • 44 posts

Posted 06 October 2007 - 03:07 PM

I can use this like an mini game if it get more towers better ones (the sprites!) AND when you got upgrading pm me when you are p.s ITS GREAT 7/10
  • 0

#5 mmaarrkkuuss

mmaarrkkuuss

    GMC Member

  • New Member
  • 212 posts

Posted 12 October 2007 - 05:33 PM

Update
This update has:
-Two difficulties.
-Upgrade system.
  • 0

#6 General McSlave

General McSlave

    GMC Member

  • New Member
  • 478 posts

Posted 15 October 2007 - 02:13 AM

Yay good job, I hope to see some more tower defense games as a result off this. I hope to use it sometime too, good job again.
  • 0

#7 a2h

a2h

    GMC Member

  • New Member
  • 382 posts

Posted 15 October 2007 - 07:17 AM

Hmm, nice.

I suppose this is a clone of the Tower Defence thing by Roman Sanine? Or the Warcraft III thingy?
  • 0

#8 mmaarrkkuuss

mmaarrkkuuss

    GMC Member

  • New Member
  • 212 posts

Posted 15 October 2007 - 08:30 PM

You need these objects: a button, a projectile, a tower and a marker (uses same sprite as tower.)

I really can't teach you how to do the upgrade system if you can't do code. Tell me if you can.

Button:
Create event:
Set variable Hover to 0.
Begin step event:
Set variable Hover to 0.
Mouse event no button:
Set variable Hover to 1.
Left pressed:
Create instance of object marker at position(mouse_x,mouse_y)
Draw event:
Draw sprite at relative position(0,0)
if variable Hover is equal to 1
{Start of block
  Set color. (Your decision)
  at position room_width/2 draw text "Whatever you want to say"
}End of block

Marker:
Step event:
Jump to given position(mouse_x,mouse_y)

if score(what I use for money) is greater than 249 (if the prize of the tower is 250)
{Start of block
  Set variable score relative to -250
  Change instance to object tower.
}End of block
else
{Start of block
  destroy instance self
}End of block

Draw event:
Draw sprite spr_Tower at relative position (0,0) (if your sprite is centered)
Draw circle with relative vertices (-34,-34) and (66,66), outline.

Tower object:
Create event:
Set variable Showrange to 0.
Set variable Deactivated to 0.
Set variable Menuvar to 0.
Set variable Strikeshot to 0.
Set variable ProjectileID to 0.

Destroy event:
Set score relative to 250.

Step event:
If the number of enemies is greater than 0
{Start of block
  With chance 1 out of 3 perform the next action(s)
    {Start of block
       Create instance of object projectile at relative position (0,0)
     }
}

Collision road:
destroy instance self

Intersect boundary and outside room:
Destroy instance self

Draw event:
Draw sprite tower at relative position (0,0)
Draw circle with relative vertices(-50,-50) and (50,50)

Projectile object:
Create event:
Check expression: distance_to_object(Target)<50
  {
       Move towards point (Enemy.x,Enemy.y) at speed 15
  }

Step event:
Check expression: distance_to_object(Tower)>50
{
destroy instance self
}

Collision Enemy:
[code]destroy instance self

I'll post the creepspawn-system tomorrow. I'm not sure if I can explain it. :/
  • 0

#9 mmaarrkkuuss

mmaarrkkuuss

    GMC Member

  • New Member
  • 212 posts

Posted 23 October 2007 - 06:03 AM

Hmm, nice.

I suppose this is a clone of the Tower Defence thing by Roman Sanine? Or the Warcraft III thingy?

<{POST_SNAPBACK}>

Well, It's more like a clone of a clone. :P I don't know where this Tower defence started at all. :D
  • 0

#10 Appolo

Appolo

    GMC Member

  • New Member
  • 140 posts

Posted 20 January 2008 - 08:51 AM

How do exit? o_O
  • 0

#11 Unib5

Unib5

    GMC Member

  • New Member
  • 76 posts

Posted 29 January 2008 - 07:12 PM

Hmm...This tutorial was good, but it definatly needs more towers. And the range on the towers is puny.
  • 0

#12 A13x

A13x

    GMC Member

  • New Member
  • 83 posts

Posted 17 June 2008 - 12:41 PM

be greatful he posted this at all punib5
  • 0

#13 Fratrino

Fratrino

    GMC Member

  • New Member
  • 131 posts

Posted 17 June 2008 - 03:05 PM

very cool!
  • 0

#14 xGamerZx

xGamerZx

    GMC Member

  • New Member
  • 13 posts

Posted 25 September 2008 - 10:02 PM

Instead of making a new object for each enemy, you could make one object that covers all enemies. For speed, test for the level in the object. For different health, use something like 50+(level*25). It adds 25 health for each level that you progress though. However, this does not allow for more than 1 type of enemy per level.
  • 0

#15 Rybo5000

Rybo5000

    GMC Member

  • New Member
  • 423 posts

Posted 26 September 2008 - 05:28 PM

I keep trying to motivate myself into starting a Tower Defence game...........and this engine is pretty awesome.
  • 0

#16 Blue Falcon

Blue Falcon

    GMC Member

  • New Member
  • 2 posts

Posted 09 December 2008 - 04:40 AM

thx for te help but it is still pretty confusing
  • 0

#17 benjabby

benjabby

    GMC Member

  • New Member
  • 31 posts

Posted 14 December 2008 - 10:45 AM

can you make a turret rotate toward the enemy in an unregisted TD
  • 0

#18 Zgamemaker

Zgamemaker

    GMC Member

  • New Member
  • 151 posts

Posted 01 January 2009 - 07:56 PM

Thanks for the Engine but it needs a whole lot more work. I am not the best programmer ever but I think this is a great start for a experienced programmer. Thanks for the help I've been wanting to make a game like this for quite some time!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users