Jump to content
Sign in to follow this  
KayDgirl91

Turret Defense Gameplay

Recommended Posts

Introduction:

I had a great idea last week, and I have been trying to work with Falcao Pearl Abs to get this to work. But I can't quite get it working. So I thought I'd come here and see if someone might want to write a script (or have any suggestions) for this.

 

Request:

I want to be able to make a Turret Defense Mini game in my game.

 

What's a "Turret Defense" game?

For those of you that don't know what a turret defense game is, let me explain. In a turret defense game, enemies spawn at point A, and they travel to point B. Your job in these games is to stop the enemy from reaching point B. So you build defenses to the side of the paths that the enemies travel to kill them before reaching the end of the path. With each progressing round, more and harder enemies start spawning. With every kill you gain money to spend on more defenses. And you go until you die.

 

Request Specifics:

I was thinking that using an already existing ABS system would be the best way to go. And then maybe implement a mouse system to be able to build your defense units. But, I wasn't sure how to make it so that as you built your defenses, they would kill the approaching enemies, and not move. 

So if any has any ideas on how to do this, I'd love to get some input! Falcao has a great mouse, and ABS system and those are the ones I have been trying to do it with, but to no avail.

 

In Closing:

I'm not sure I really have any closing notes. I think I was pretty clear. I hope I was anyway. Well, I'd love to hear back! If someone has already done something like this, and they could send me a link to a demo on how to do it, I'd take that too :) 

Share this post


Link to post
Share on other sites

You wouldn't need the ABS to do this you could do it purely with the mouse clicking script and its activate event function :) let me see what I can mock up and will get back to you :)  

Share this post


Link to post
Share on other sites

Well, I understand that I'd be able to get the building defenses basis with just the mouse system. And I could even make it so that when you clicked on the enemies they'd die (If that was how turret defense games worked.) But I need to be able to build multiple defense units with NPCs, and then have them attack the enemy NPCs when they get within a certain radius of the defense units.

So, if you've got an idea of how to make that work, that would be awesome! :D But, I don't see how you could accomplish that without some type of system that can define enemies, and works on radius.

Share this post


Link to post
Share on other sites

Not interested in implementation, but I would be interested in seeing it designed the "RM way".

What I mean is, you make the most out of what the RM system provides.

 

I played an RM tower defense game in VX once and everything was defined in external files: map data, movement paths, stats, exp tables, and so on. Events were pretty much used only for placeholders and that's it.

 

To me that is not "good RM design". If you're making a tower defense game where enemies are supposed to follow a certain path, why wouldn't you just try to use the "set move route" command? Then you can set up your events without having to specify this data in a text file.

 

Each unit can be represented as an event. You can use "event cloning" techniques to copy a unit from a template and put it on the map. You can associate an event with an enemy with a simple comment, and then design your enemies using RM's database editor.

 

If your game involves your own units gaining EXP for defeating enemies, associate that with an actor, and then use the class system to handle stats and skill learning. Again, we don't need a text file to store different stats for different levels for different units: each "type" of unit is just a class, and each unit itself is an actor (or an enemy).

 

Since all units are represented as events, you simply need to use the event trigger functionality along with some custom "ranged trigger" scripting to allow them to activate when targets come within range. Scripts will be required to perform the actual attacks or skills, but most of the work can be passed off to the event system:

 

-use conditional branches to determine whether you can attack a target or not (eg: maybe you can only hit "ground" enemies, or maybe you can't target "ghost" types)

 

-take advantage of skills the way you would with the default RM battle system. Since the events are just actors or enemies, performing a skill to attack someone requires no extra scripting for the damage logic. Plus you can take advantage of effects if you want to add all sorts of status effects like freezing, changing movement speed, or instant kill.

 

All said, when I write a script for RM, I intend to integrate it with the rest of RM.

If a unit is tied to an actor, you can easily tie it to one of your EXISTING actors. You can add the tower defense game as a secondary battle system and have a fully integrated with your own game, and not just some small thing on the side.

 

I believe that sharing as much code as possible makes it much easier to integrate.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Thank you for the input Tsukihime! Much appreciated. I was planning on eventing most of the system. As far as the enemies go, I was planning on using your cloning script to accomplish this. As for health for the enemies, I was going to use self-switches to accomplish this. Easy enemies, 1 hit to kill (turn on self switch A.) Medium enemies 2 hits (turn on A and B.) And then so on and so forth to hard and very hard. The biggest thing that I am lacking, is a way to make it so that units have a radius, and when enemies get in that NPC's radius, they will attack. I have figured out pretty much everything else, that is just my biggest hold up. And I'm not sure how to accomplish that.

Share this post


Link to post
Share on other sites

I know about player radius scripts. But I need a script that allows events to have a radius and activate based on other events getting withing that events radius. 

Example: Monster 1 is 4 tiles away from Tower 1, Tower 1 now activates and starts attacking Monster 1. But when Monster 1 is 5 tiles away, Tower 1 will not attack because Monster 1 is now out of range. I haven't seen any scripts like that, that would allow for NPC activation with another NPC based on a radius.

I do appreciate those other script suggestions though.

Share this post


Link to post
Share on other sites

That's a really good idea Tsukihime. I'll give it a shot and see what I can come up with! Thank you so much for the help, I really appreciate it! :D

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted