Squad tactics
by crash and burn · in Technical Issues · 10/29/2007 (11:34 am) · 3 replies
Hey! I need some help with squad tactics with my game. Basically I need them to find cover when possible and us magic and the special ablitys to protect themselves, but not compltely independent, so that some ablitys still need commands from the player. I also have squad level ablitys that affect everyone, but I don't want them to be used constantly and burn up there mana too fast. The tree other people are a mage, a demolitons expert, and a weapons expert.
if you want some more info, look at my thread in game in a day. it's " i've got a game idea "
if you want some more info, look at my thread in game in a day. it's " i've got a game idea "
About the author
#2
11/02/2007 (1:06 pm)
Thanks for the feedback, though squad level tactics are going to be handled by the player who gives the order to use it or not
#3
An idea I had for my AI was a stress system, where the stress level increases when shot or when a bullet has struck nearby. When firing on an enemy, the AI player will not take cover from it unless the stress goes up (we're under fire) or if we lose sight of the enemy (he's taking cover, I think I should too). When the AI player finds cover, he figures out how he will be able to return fire (over the top or sides), and then lays down suppressing fire while he runs for the cover. When he's at cover, depending on how high the stress level is he will return fire or get back behind the cover. I've had some pretty wild shootouts with my AI :-)
11/10/2007 (12:24 am)
I've been working on something similar. I've programmed AI players that can move to and fire from cover, lay down suppressive fire, and give covering fire to teammates that are reloading. I've got a nice little interaction system going as well (move here, give me point fire on enemies in that direction, return fire only, fire at will, follow me, stay here, lay down suppressing fire, take cover). As soon as I finish debugging, I'll post my code as a resource. Getting the AI players to move as a squad was also one of my goals, wish me luck.An idea I had for my AI was a stress system, where the stress level increases when shot or when a bullet has struck nearby. When firing on an enemy, the AI player will not take cover from it unless the stress goes up (we're under fire) or if we lose sight of the enemy (he's taking cover, I think I should too). When the AI player finds cover, he figures out how he will be able to return fire (over the top or sides), and then lays down suppressing fire while he runs for the cover. When he's at cover, depending on how high the stress level is he will return fire or get back behind the cover. I've had some pretty wild shootouts with my AI :-)
Torque Owner Daniel Buckmaster
T3D Steering Committee
1. Use a node-based map, where you cover your levels in nodes. When you need cover, the character just looks for all the nodes nearby that can't see an enemy.
2. If you're not using nodes, or they're spaced further apart, just generte a bunch of points near the character and test all of them to see whether the enemy is in sight.
Individual abilites can just be handled the usual way you'd make an AI do things like look for enemies and shoot the player. Example-
I see an enemy; the enemy is within range of my gun; he is also within range of my magic arrow spell; I have more mana than ammunition; so use the spell.
As for squad abilities, all you need to do is keep track of the situation. For example, the number of enemies in sight, how close they are, whether they're threats or weaklings, etc. Then, based on this information, decide whether to use a special squad ability. Example-
If there's more than 10 enemies in sight; and hey're very close; and they're pretty tough; and the demo guy is out of rockets; use the magic shield spell or the radius fireball spell.
These conditions can be adjusted, and you may want some deciding factor about which spell to cast (for example, whether your objective is to kill or to escape).
Finally, player commands could just be handled on a need-to-use basis. For example, have a method that you can call on an AI character that makes him plant a bomb and cast a spell or something, and call that method only when the player pushes the right button.