Game maker Tower Defense - HELP!

6 posts / 0 new
Last post
lepape
Offline
Last seen: 8 years 1 week ago
Joined: 2 Jan 2009 - 22:15
Game maker Tower Defense - HELP!

Hi,
I'm currently trying to make a TD game using Game maker, and well, I'm a total newb. There's tons of things I'm trying to figure out how to do, but there's mainly two questions I have, so I thought I might get some good help here.

First, about enemies. From what I understand, most TD games only have one object being used for every wave, it's just the sprite of the object that's being changed. That way, towers can always target "obj_enemy", for example. What I'd like to do would be to have many enemies with different behaviors. For example, one enemy would deflect all projectiles, another would spawn smaller enemies upon dying, etc. Should I use multiple enemy objects in this case, or should I add tons of variables on the same "obj_enemy" for all possible behaviors?

Also, I'm trying to use some grid system when building towers, so the tower would only move one square at a time when placing it. I tried to find info on how to do that, but I'm wondering if that's even possible in GM.

Thanks,

The Noid
Offline
Last seen: 5 years 10 months ago
Joined: 3 Feb 2008 - 15:26

I'm not sure how GM goes about interfaces and inheritance, but in "normal" object oriented programming languages you would make an interface "Enemy" that list the properties that every enemy type has, like hp, location, speed.
For each different enemy type you would make a class "SpecificEnemyX" that implements the interface "Enemy".
That way your targeting routine would know that SpecificEnemy1 and SpecificEnemy2 both have the features listed in Enemy.

Slogsweep
Offline
Last seen: 7 years 2 months ago
Joined: 15 Jan 2009 - 12:42

And possibly an Abstract class inbetween where you'd write the generic enemy code

Fireblade
Offline
Last seen: 5 years 10 months ago
Joined: 6 Aug 2007 - 02:03

yes, u can use grid with the towers, read 1 of the tutorials about that mazish game on yoyogames.com , i cant help u personaly right now because i havnt gotten gm after i got my new 500gb

Sammual
Offline
Last seen: 7 years 11 months ago
Joined: 11 Sep 2007 - 15:49

I was working on a GM TD game a while back. Now that I have time I'm planning on getting back into it. If you want any help just let me know.

Sammual
Sammual at juno and then dot com

BN1040
Offline
Last seen: 4 years 4 weeks ago
Joined: 26 Feb 2013 - 09:11
creating a td game (a reply to lepape)

I KNOW HOW

First you work on your sprites. sprites are like your GUI / Menu or towers enemies explosions bullets lasers or anything else that will be in the game

Second is that you import your objects make backgrounds and make your levels with the objects

Third is to put properties on your objects for example is the bullet you will set it's properties that it damages enemies but exept for towers and

Fourth is the commanding/scripting i know this is hard but try to learn "JavaScript"

this will look like your script

obj_tower_bullet (bullet tower object) set it to make obj_bullet (bullet object) damage obj_enemy = 25% (damage enemy 25%)

and finally fixing the game , debuging , and trying to make it's downloading process not fail

like the bait.png its kind of hard that way!

there you have it hope this helps!