|
|
#1 |
|
Cannon Tower
Join Date: Jan 2009
Posts: 10
![]() |
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, Last edited by lepape; January 17th, 2009 at 12:00 PM. |
|
|
|
|
|
#2 | ||||||||||||||
|
TowerDefence.net Game Project Developer
Join Date: Feb 2008
Posts: 901
![]() |
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. |
||||||||||||||
|
|
|
||||||||||||||
|
|
#3 | ||||||||||||||
|
Cannon Tower
Join Date: Jan 2009
Posts: 11
![]() |
And possibly an Abstract class inbetween where you'd write the generic enemy code
|
||||||||||||||
|
|
|
||||||||||||||
|
|
#4 | ||||||||||||||
|
Red Tower
Join Date: Aug 2007
Posts: 442
![]() |
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
__________________
|
||||||||||||||
|
|
|
||||||||||||||
|
|
#5 |
|
Tower
Join Date: Sep 2007
Posts: 3
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Game Yet Another Tower Defense Game | aguydude | General | 2 | March 6th, 2009 09:34 PM |
| Tower Defense Game Maker | Sim | Code Forge | 11 | August 12th, 2008 07:47 PM |
| Game Maker Tower Defence tut | Fireblade | Code Forge | 13 | June 15th, 2008 10:17 PM |
| Getting a Tower Defense game listed | JoshuaJewell | Questions Assistance/Feedback | 7 | February 13th, 2008 03:04 AM |