Tactical AI Kit: IT NEEDS MORE THINGS
by Bryce · 01/13/2013 (8:45 pm) · 42 comments
To anyone out there who happens to be closely following my work (I like to pretend to have fans), no, I'm not dead. Just a bit overloaded and possibly inefficient with time. But then again, here you are reading GarageGames blogs. We're all procrastinators here.
So what have I been doing? Apart from being absolutely swamped by my first year of college out of high school, I've been doing some fun Torque work with Max Thomas to redesign game mechanics and bot behavior for OrangeFPS. It's rekindled my love/hate relationship with good 'ole TGE 1.5, but it's been a blast so far.
So what about that Tactical AI Kit update I promised months ago? Well, let's see what I've been up to.
Here's some exciting new stuff the update will bring!
I've gone through several grenade throwing implementations for AI Players. The first one was fairly decent but still pretty poor. As far as the ballistics math went, it was about the best a 7th grade algebra student could figure out at the time. As a result, you'd get grenades that reached their target, but only when the target was within 30-36 meters away. I ended up ditching this completely, and finally coming up with a better algorithm a few years ago, the one currently shipping with TAIK. This would figure out a trajectory that could work for targets above and below, check line of sight along the path, and then send the grenade projectile on its way. For simple throws across wide open spaces, this method was perfect.
I've been wanting to make way for more "tricky" solutions for a while. A live, human player will bounce grenades off walls, throw them through windows, down vent pipes, and just generally be better at using them. Why shouldn't an AI player be able to do that? Lucky for us "intelligent life," we can eyeball things like bounce surfaces and throw trajectories while barely thinking about it.
So, I taught them how.
Tactical AI Players rely on cover to function realistically. The level designer drops cover points behind suitable objects in the mission, and the bots use those to wander and attack. We can also use these as reference for grenade throwing. Each cover point, by looking at its compiled data, knows how to throw to the cover points around it. Thanks to the intellect of the compiler, a bot using cover will know how to throw a grenade down a flight of stairs to a straggler in the room below.

BAD!
When we now can calculate it in minutes with the click of a button:
GOOD!
People read my blogs? Oh well, on to the new stuff!

This guy does not move. At all.
The old cover animation system only supported two-frame animations. No room for a lightly swaying breathing animation or anything of the sort, just the character stuck behind cover in a solid pose. When they'd switch to the next pose, Torque's animation interpolation was the only thing causing them to somewhat smoothly change poses.
I've reworked the logic behind cover poses to allow for something more fluid. Each animation can be a bit more complex and detailed than the old single-frame sequences. We can now include transitions in the beginning of our animations.
Here's what I'm trying to say: we have an animation for shooting around the left side of cover. Before, the animation would use Torque's interpolation, and you'd see the bot slide from the hiding pose to the peek-left pose. Now, the new peek left pose would consist of maybe one second of stepping out of the hiding pose, and five seconds or more of standing in place. Same goes for the other cover positions. The hiding-behind-short-cover sequence would be an animation of the character starting in the firing-over-short-cover pose, and crouching down into cover, where he would hold that pose for five seconds or more.
Another totally new cool thing is the newfound ability for bots to slide in to cover. This is mainly just a visual effect, but it helps take away from that rigidity and make things more lifelike. When a bot is running for cover, they'll use the new setSlideDestination function to glide toward their cover, and play a sliding animation.
Pardon the "BLUEH" and "OH THAT HURTS." Really guys? 12 years and no new pain sounds?
This animation is pretty easy to create. I just animated the character with a bit of velocity, sliding into a point 6 meters ahead of his origin. Once I was done making the animation, I removed the forward velocity while maintaining everything he does with his arms/legs/etc. This allows it to play seamlessly while setSlideDestination sails the bot smoothly into cover.
How does Torque AI turn right? By rotating while frozen in place. Something's wrong here.
To combat this, TAIK now supports turning animations. Whenever a bot's aim location is set, it runs a script callback to check the angle of its turn. If the angle is high enough in either direction, he will play either a turn right or turn left animation.
At the moment, it's only working with two turn animations, but there's a lot of room for improvement for those willing to take their time animating. For example, turning while running would be a nice animation to have.
Among the sea of dozens of bugfixes, here are some things that have been reworked.
That state behavior has been almost completely revised. The code's been changed to be more readable, and to more accurately figure out the state of things. Let's consider how a Tactical AI Player would behave when a bullet lands nearby.
He first needs to figure out where the round came from. If he heard the shot, he'll go by that. If not, he'll figure out where the shooter might possibly be based on his position, the position of the bullet impact, and the surfaces around him.
The next step is to run for cover. The bot will react if they take damage, if their threat position changes (i.e. another bullet lands by their current hiding spot), or randomly if the threat is not determined to be a sniper. As time passes, they'll move from cover to cover, eventually moving toward the assumed enemy position.
Other bots who may have heard the gunshot will enter a different reaction condition: "ShotsFired." They will move slowly toward the position, searching the area upon arrival. After sixty seconds of no new gunfire or other stimuli, they will start searching a wider area. Bots will react to explosions in a similar way, with the exception being that they will do whatever it takes to get away from the explosion during the first few moments of it. If a body is found, bots search the area. I take extreme care to make sure that everything an AI might need to react to is built in and ready to go.

Bots will now notice this as it happens and shift further out to attack the target. Upon attacking a new target, they'll move back into cover, and adjust their required exposure again to keep them from leaning too far out of cover.

Also, you'll now find them hiding behind cover a bit more than they used to. Previously their only conditions for popping back behind cover were to reload, and to hide from a slough of incoming gunfire. Now, I've added a simple random hide/unhide condition that makes them hide to avoid an attack that might happen. Simply by being hidden and unhidden half the time, we're now decreasing their chance of death behind cover by 50%.
Sure did! Every so often I'd get an email from someone wanting the code and artwork for the weapons found in my TAIK demos. I never understood the want for the awful Milkshape 3D artwork, but the code and functionality is something I'd be happy to see in a game.
Like I mentioned before: the TAIK update will include a weapon pack. It contains sounds, weapon/arm models, and functionality for 28 unique weapons:
ACR
AK47
AKS-74u
AUG
F2000
FAL
Five-seveN
Glock-18
G36C
M110
M14 EBR
M16A4
M24 SWS
M249 SAW
M4A1
MP5A2
MP7
P228
P3AT
P90
PDW
PX4 Storm
RPG-7
SCAR-H
SIG550
Spas-12
UMP-45
USP-45
Here's a video of me erratically hitting the random loadout function and shooting at things. Enjoy!
Bullet Penetration - Bullets fired through thin surfaces will punch through them with lower velocity and lower damage, leaving an entrance and exit decal.
Reloading - Auto-reloading occurs when the magazine is empty, or the weapon can be reloaded by pressing the universal "R" key. It uses a backpacked-reload system in which unused magazine rounds are pooled, similar to many shooters nowadays.
Switching - The player gets three weapon slots: two primary weapons, and one pistol slot. As you might have guessed, the primary slots are only for non-pistols, and the pistol slot is for pistols.
Swapping - Weapons on the ground can be touched to show an on-screen prompt, telling the player what weapon they are on, its attachments, and to press F to swap their current weapon for it.
Grenade Throwing - Pressing G will toss a frag grenade which explodes after four seconds.
Aiming Down the Sights - Right-clicking will shift the weapon image up to bring the sights up to the player's eye. Its main purpose is to increase the player's accuracy.
Attachments - Weapons can support many attachments to alter their functionality. Red dot and ACOG sights will change the sight picture and provide different levels of zoom. A sound suppressor will change the firing sound and make the weapon less audible to all players, human or otherwise. A grenade launcher can be toggled by pressing 4, firing an explosive round at high speed. More than one attachment is supported per gun; feel free to attach any combination of sights, suppressors, and grenade launchers to a weapon.
Full Hud - I added a GUI showing an icon of your current weapon, its name, the fullness of your current magazine, the exact number of rounds in it, and the amount of "backpacked" ammo you have.
Weapon Sway - Instead of being stuck to the screen, the first person weapon will realistically bob with the movement of the player, sway as the player turns, and slowly float as the player remains idle.
Support for Takedown Cinematics -- A little over a year ago, I experimented with getting two characters to animate cooperatively. In other words, the idea was to have melee takedown sequences, where both actors would animate in such a way that it appeared the two actors were fighting one another. When the sequence was over, the winner would leave the fight constraints, and the victim would be killed off. I got a lot of requests for a system like that as well.
This requires a dedicated animator if you don't want to use my stock character, but all the code support is implemented and ready. Pressing T while facing a nearby enemy will initiate a takedown cinematic, killing that enemy. It works by locking your controls, switching the camera to render the third person model from first-person perspective, and having that camera follow your eye node. At the end of the sequence, control is restored, and the player is in awe. This works in both first and third person.
There are 4 parts to a fight sequence:
1) The "win" player initiates the fight with the "lose" player. Both the win and lose players are locked out of their controls and prepped to view the sequence. The winner plays the winning animation, the loser plays the losing animation.
2) disarmTime - The moment that the loser's gun is taken from him. If a disarm is part of the animation, this is the moment to remove the weapon.
3) noReturnTime - The moment that the loser cannot be saved; the exact moment he dies. Up until this point, if the winner of the fight is killed, the fight ends and the loser walks away. After the loser dies, killing the winner will not make a difference. This works both ways, too. Someone can also kill the loser before he dies from the fight (though the winner might be a bit angry at the stolen kill).
4) The end of the fight. The winner gets his gun back, and he's free to move around to his heart's desire. Picking up the loser's weapon is also encouraged as a trophy for the humiliating kill.
I should also mention that this works between both human and AI players: humans can takedown humans, humans can takedown AI, AI can takedown humans, and AI can takedown AI. I'm altering the dodgy "melee" AI code to allow for this system.
How many fight sequences can there be? As many as you want. I included four unnecessarily flashy fights that depend on the direction of attack: attacking from the right, left, front, and from behind. You might want to make more simple, less time consuming animations, a la Far Cry 3 and Battlefield 3 that just include a knife plunge. The heavy lifting is done for you already.
Oh, right. Video.
Just a quick note: When you see the player get attacked from the right while he's shooting his gun, it's not just shooting straight ahead. I've altered it to send bullets in the true muzzle vector during fight sequences, so bullets are actually being sprayed everywhere. Ain't that somethin'?
After reading all that, I sure hope so.
The update is almost there, guys. I'm working on it pretty much non-stop whenever I can, and I absolutely cannot wait to get it out the door. It's being developed for Torque 3D MIT.
Email me if you buy it and it doesn't give you a download link. This is a problem from time to time.
If you are an owner of the Tactical AI Kit, the update including all of the features I just spewed on and on about will be completely free. When the update is released, I'm raising the price of the kit+update to $89.95 for those who don't have it by then.
Look at it this way:
Get TAIK now for $74.95, get the free update when it comes out,
or...
Buy them both later for an extra $15. I don't know about you, but I like that other option a lot. Either way, it'll help me hammer away at student loans and I'll love you forever.
You can play the ancient demo from two years ago, running the old, rusty TGE 1.5 by clicking the picture:

It's not showing the bots at the level of intelligence they show today, but it'll give you a pretty good idea of how the AI behaves in response to combat and stealth play-styles. I'll have a new, shiny, updated T3D demo released alongside with the update fairly soon.
Thanks for reading, folks! Let me know what you think. I always like me some feature requests!
So what have I been doing? Apart from being absolutely swamped by my first year of college out of high school, I've been doing some fun Torque work with Max Thomas to redesign game mechanics and bot behavior for OrangeFPS. It's rekindled my love/hate relationship with good 'ole TGE 1.5, but it's been a blast so far.
So what about that Tactical AI Kit update I promised months ago? Well, let's see what I've been up to.
New Features
Here's some exciting new stuff the update will bring!
Grenade Compiling
I already went over this in the last blog, but this is for the new readers. In a lot of games, grenade throwing by AI is either really good or absolutely horrid. Bots blowing themselves up, bots throwing grenades at rooftops instead of on them, bots missing windows by a mile -- this is the kind of thing I intended to leave out of TAIK.I've gone through several grenade throwing implementations for AI Players. The first one was fairly decent but still pretty poor. As far as the ballistics math went, it was about the best a 7th grade algebra student could figure out at the time. As a result, you'd get grenades that reached their target, but only when the target was within 30-36 meters away. I ended up ditching this completely, and finally coming up with a better algorithm a few years ago, the one currently shipping with TAIK. This would figure out a trajectory that could work for targets above and below, check line of sight along the path, and then send the grenade projectile on its way. For simple throws across wide open spaces, this method was perfect.
I've been wanting to make way for more "tricky" solutions for a while. A live, human player will bounce grenades off walls, throw them through windows, down vent pipes, and just generally be better at using them. Why shouldn't an AI player be able to do that? Lucky for us "intelligent life," we can eyeball things like bounce surfaces and throw trajectories while barely thinking about it.
So, I taught them how.
Tactical AI Players rely on cover to function realistically. The level designer drops cover points behind suitable objects in the mission, and the bots use those to wander and attack. We can also use these as reference for grenade throwing. Each cover point, by looking at its compiled data, knows how to throw to the cover points around it. Thanks to the intellect of the compiler, a bot using cover will know how to throw a grenade down a flight of stairs to a straggler in the room below.
Recast/Detour Pathfinding
This one is also for the new readers. Thanks be to Daniel Buckmaster for his work in getting the Recast libraries seamlessly working with Torque 3D. Thanks to his work, we no longer have to spend an eternity setting up hundreds of nodes like some sort of savage:
BAD!
When we now can calculate it in minutes with the click of a button:
GOOD!I said new features, you're just telling me stuff I read in your last blog.
People read my blogs? Oh well, on to the new stuff!
Cover animation support
Cover animation is nothing new to TAIK. When an AI Player uses cover, they play an animation depending on what they're using. There's hiding behind tall cover, shooting around the left and right sides of tall cover, hiding behind short cover, and shooting over short cover. This was a good concept, except it looked really rigid. I mean really, unnaturally, horribly robotic.
This guy does not move. At all.
The old cover animation system only supported two-frame animations. No room for a lightly swaying breathing animation or anything of the sort, just the character stuck behind cover in a solid pose. When they'd switch to the next pose, Torque's animation interpolation was the only thing causing them to somewhat smoothly change poses.
I've reworked the logic behind cover poses to allow for something more fluid. Each animation can be a bit more complex and detailed than the old single-frame sequences. We can now include transitions in the beginning of our animations.
Here's what I'm trying to say: we have an animation for shooting around the left side of cover. Before, the animation would use Torque's interpolation, and you'd see the bot slide from the hiding pose to the peek-left pose. Now, the new peek left pose would consist of maybe one second of stepping out of the hiding pose, and five seconds or more of standing in place. Same goes for the other cover positions. The hiding-behind-short-cover sequence would be an animation of the character starting in the firing-over-short-cover pose, and crouching down into cover, where he would hold that pose for five seconds or more.
Another totally new cool thing is the newfound ability for bots to slide in to cover. This is mainly just a visual effect, but it helps take away from that rigidity and make things more lifelike. When a bot is running for cover, they'll use the new setSlideDestination function to glide toward their cover, and play a sliding animation.
Pardon the "BLUEH" and "OH THAT HURTS." Really guys? 12 years and no new pain sounds?
This animation is pretty easy to create. I just animated the character with a bit of velocity, sliding into a point 6 meters ahead of his origin. Once I was done making the animation, I removed the forward velocity while maintaining everything he does with his arms/legs/etc. This allows it to play seamlessly while setSlideDestination sails the bot smoothly into cover.
Turn Animations
Nothing all that special, but it still goes a long way in eliminating how robotic Torque AI tends to look. Think about something as simple as turning to the right. How do you turn right? You turn your head, step with your right foot, and then with your left foot. How do bots in modern AAA games turn right? You guessed it -- by using their feet, arms, and head in a way that looks fluid and realistic.How does Torque AI turn right? By rotating while frozen in place. Something's wrong here.
To combat this, TAIK now supports turning animations. Whenever a bot's aim location is set, it runs a script callback to check the angle of its turn. If the angle is high enough in either direction, he will play either a turn right or turn left animation.
At the moment, it's only working with two turn animations, but there's a lot of room for improvement for those willing to take their time animating. For example, turning while running would be a nice animation to have.
Improvements
Among the sea of dozens of bugfixes, here are some things that have been reworked.
Reaction
The "react" state was absolutely horrid. You'd see bots moving to cover, then backing up and moving torward it again. Bots staring at walls. Bots not knowing when it's appropriate to run. Bots picking cover and staying behind it for eternity. I did a lazy job ironing those out before release.That state behavior has been almost completely revised. The code's been changed to be more readable, and to more accurately figure out the state of things. Let's consider how a Tactical AI Player would behave when a bullet lands nearby.
He first needs to figure out where the round came from. If he heard the shot, he'll go by that. If not, he'll figure out where the shooter might possibly be based on his position, the position of the bullet impact, and the surfaces around him.
The next step is to run for cover. The bot will react if they take damage, if their threat position changes (i.e. another bullet lands by their current hiding spot), or randomly if the threat is not determined to be a sniper. As time passes, they'll move from cover to cover, eventually moving toward the assumed enemy position.
Other bots who may have heard the gunshot will enter a different reaction condition: "ShotsFired." They will move slowly toward the position, searching the area upon arrival. After sixty seconds of no new gunfire or other stimuli, they will start searching a wider area. Bots will react to explosions in a similar way, with the exception being that they will do whatever it takes to get away from the explosion during the first few moments of it. If a body is found, bots search the area. I take extreme care to make sure that everything an AI might need to react to is built in and ready to go.
Shooting Around Cover
One crippling bug that I somehow missed was that bots shooting around a thin wall might sometimes have to aim farther than the wall allows to shoot a target. In other words, they'll end up shooting the edge of the wall while they get picked off by someone else.
Bots will now notice this as it happens and shift further out to attack the target. Upon attacking a new target, they'll move back into cover, and adjust their required exposure again to keep them from leaning too far out of cover.

Maintaining Cover and Dying Less
Previously, bots would take cover to attack threats. That's a great thing, except for the fact that they'd leave cover upon killing a single target. That's right, after one kill, they ditch their cover and run out in the open, finding another cover for the next target. This got them killed pretty quickly, and was no fun in a firefight with dozens of bulletsponges. Bots using cover at a good vantage point would waste it by running away from it after a single kill, and that's no longer a thing. After making a kill from cover, bots will now spend 15 think ticks (7.5 seconds by default) behind their same cover looking for a new enemy to attack. They'll still move up to better cover when it's available, but now they won't be leaving their cover right away.Also, you'll now find them hiding behind cover a bit more than they used to. Previously their only conditions for popping back behind cover were to reload, and to hide from a slough of incoming gunfire. Now, I've added a simple random hide/unhide condition that makes them hide to avoid an attack that might happen. Simply by being hidden and unhidden half the time, we're now decreasing their chance of death behind cover by 50%.
You said something about a weapon pack last time, didn't you?
Sure did! Every so often I'd get an email from someone wanting the code and artwork for the weapons found in my TAIK demos. I never understood the want for the awful Milkshape 3D artwork, but the code and functionality is something I'd be happy to see in a game.
Like I mentioned before: the TAIK update will include a weapon pack. It contains sounds, weapon/arm models, and functionality for 28 unique weapons:
Weapon list
ACR
AK47
AKS-74u
AUG
F2000
FAL
Five-seveN
Glock-18
G36C
M110
M14 EBR
M16A4
M24 SWS
M249 SAW
M4A1
MP5A2
MP7
P228
P3AT
P90
PDW
PX4 Storm
RPG-7
SCAR-H
SIG550
Spas-12
UMP-45
USP-45
Here's a video of me erratically hitting the random loadout function and shooting at things. Enjoy!
Weapon Pack Functionality
I took a lot of care to ensure that firing these weapons looks, sounds, and feels as realistically as possible.Bullet Penetration - Bullets fired through thin surfaces will punch through them with lower velocity and lower damage, leaving an entrance and exit decal.
Reloading - Auto-reloading occurs when the magazine is empty, or the weapon can be reloaded by pressing the universal "R" key. It uses a backpacked-reload system in which unused magazine rounds are pooled, similar to many shooters nowadays.
Switching - The player gets three weapon slots: two primary weapons, and one pistol slot. As you might have guessed, the primary slots are only for non-pistols, and the pistol slot is for pistols.
Swapping - Weapons on the ground can be touched to show an on-screen prompt, telling the player what weapon they are on, its attachments, and to press F to swap their current weapon for it.
Grenade Throwing - Pressing G will toss a frag grenade which explodes after four seconds.
Aiming Down the Sights - Right-clicking will shift the weapon image up to bring the sights up to the player's eye. Its main purpose is to increase the player's accuracy.
Attachments - Weapons can support many attachments to alter their functionality. Red dot and ACOG sights will change the sight picture and provide different levels of zoom. A sound suppressor will change the firing sound and make the weapon less audible to all players, human or otherwise. A grenade launcher can be toggled by pressing 4, firing an explosive round at high speed. More than one attachment is supported per gun; feel free to attach any combination of sights, suppressors, and grenade launchers to a weapon.
Full Hud - I added a GUI showing an icon of your current weapon, its name, the fullness of your current magazine, the exact number of rounds in it, and the amount of "backpacked" ammo you have.
Weapon Sway - Instead of being stuck to the screen, the first person weapon will realistically bob with the movement of the player, sway as the player turns, and slowly float as the player remains idle.
Support for Takedown Cinematics -- A little over a year ago, I experimented with getting two characters to animate cooperatively. In other words, the idea was to have melee takedown sequences, where both actors would animate in such a way that it appeared the two actors were fighting one another. When the sequence was over, the winner would leave the fight constraints, and the victim would be killed off. I got a lot of requests for a system like that as well.
This requires a dedicated animator if you don't want to use my stock character, but all the code support is implemented and ready. Pressing T while facing a nearby enemy will initiate a takedown cinematic, killing that enemy. It works by locking your controls, switching the camera to render the third person model from first-person perspective, and having that camera follow your eye node. At the end of the sequence, control is restored, and the player is in awe. This works in both first and third person.
There are 4 parts to a fight sequence:
1) The "win" player initiates the fight with the "lose" player. Both the win and lose players are locked out of their controls and prepped to view the sequence. The winner plays the winning animation, the loser plays the losing animation.
2) disarmTime - The moment that the loser's gun is taken from him. If a disarm is part of the animation, this is the moment to remove the weapon.
3) noReturnTime - The moment that the loser cannot be saved; the exact moment he dies. Up until this point, if the winner of the fight is killed, the fight ends and the loser walks away. After the loser dies, killing the winner will not make a difference. This works both ways, too. Someone can also kill the loser before he dies from the fight (though the winner might be a bit angry at the stolen kill).
4) The end of the fight. The winner gets his gun back, and he's free to move around to his heart's desire. Picking up the loser's weapon is also encouraged as a trophy for the humiliating kill.
I should also mention that this works between both human and AI players: humans can takedown humans, humans can takedown AI, AI can takedown humans, and AI can takedown AI. I'm altering the dodgy "melee" AI code to allow for this system.
How many fight sequences can there be? As many as you want. I included four unnecessarily flashy fights that depend on the direction of attack: attacking from the right, left, front, and from behind. You might want to make more simple, less time consuming animations, a la Far Cry 3 and Battlefield 3 that just include a knife plunge. The heavy lifting is done for you already.
Oh, right. Video.
Just a quick note: When you see the player get attacked from the right while he's shooting his gun, it's not just shooting straight ahead. I've altered it to send bullets in the true muzzle vector during fight sequences, so bullets are actually being sprayed everywhere. Ain't that somethin'?
I WANT THIS STUFF
After reading all that, I sure hope so.
The update is almost there, guys. I'm working on it pretty much non-stop whenever I can, and I absolutely cannot wait to get it out the door. It's being developed for Torque 3D MIT.
Pricing
You can buy the Tactical AI Kit here for $74.95!
Email me if you buy it and it doesn't give you a download link. This is a problem from time to time.
If you are an owner of the Tactical AI Kit, the update including all of the features I just spewed on and on about will be completely free. When the update is released, I'm raising the price of the kit+update to $89.95 for those who don't have it by then.
Look at it this way:
Get TAIK now for $74.95, get the free update when it comes out,
or...
Buy them both later for an extra $15. I don't know about you, but I like that other option a lot. Either way, it'll help me hammer away at student loans and I'll love you forever.
Can I try it out first?
You can play the ancient demo from two years ago, running the old, rusty TGE 1.5 by clicking the picture:

It's not showing the bots at the level of intelligence they show today, but it'll give you a pretty good idea of how the AI behaves in response to combat and stealth play-styles. I'll have a new, shiny, updated T3D demo released alongside with the update fairly soon.
Thanks for reading, folks! Let me know what you think. I always like me some feature requests!
#22
Did u by any chance explored the possibility of RTT Scopes?
or do you plan to, it certainly is no must have
just wonder as
i did some tests with the fxGuiSnooper Resource, if it would be possible to mount it onto a weaponscope, it would act as a RTT Scope
i started a thread asking for advice regarding render to texture
www.garagegames.com/community/forums/viewthread/133047
it shows what i mean
at the end it would be only useful for sniper scopes
02/07/2013 (7:38 am)
@BryceDid u by any chance explored the possibility of RTT Scopes?
or do you plan to, it certainly is no must have
just wonder as
i did some tests with the fxGuiSnooper Resource, if it would be possible to mount it onto a weaponscope, it would act as a RTT Scope
i started a thread asking for advice regarding render to texture
www.garagegames.com/community/forums/viewthread/133047
it shows what i mean
at the end it would be only useful for sniper scopes
#24
@Stephen: Sure does! The AIManager even takes all clients into account when figuring out which AI players to activate.
02/07/2013 (2:06 pm)
@J0linar: I've never heard of that resource... Does it work well for you? I might add support for it if it works out. Is it just a texture that projects from a source?@Stephen: Sure does! The AIManager even takes all clients into account when figuring out which AI players to activate.
#25
The Resource: www.garagegames.com/community/forums/viewthread/127227
The only thing would be to get it onto a Weaponscope, as am freshly new to T3D - i didnt found a way todo that yet. (at least for now)
How it works:
Add the file "fxGuiSnooper.cpp" to your engine code (I put it in my projects source folder), compile and you should have a new control named "fxGuiSnooper" in the controls list within the GUI editor.
In the Object Editor, drop a cube object to use as the camera. Name it something like ViewCube.
Switch to the Gui editor and add a fxGuiSnooper control. Change the AttachedObject parameter to ViewCube. - by Ian Backlund
So as u see it is a extra camera - the effect is pretty common these days, it might be possible with some more knowlege about the weaponsystem in T3D to achieve this, or there might be even a better solution but for starters this would be it.
here is a video how something like that would look in the udk
www.youtube.com/watch?v=1Y8tcrAwdKk
and here one in crysis
www.youtube.com/watch?v=NgWp7qlNeqI
Note: It is usually the same way it is done, other engines are using render to texture aswell to produce this effect.
For example this was done in a modified W:ET - MOD TrueCombatElite CQB
www.youtube.com/watch?v=GDxdstoaWiI
this video shows its best i think.
now to the downside, the whole thing means that when u switch to the scope the scene gets rendered twice = double impact
but at the end just certain scopes would/ should have some kind of zoom option.
Had to edit it :p regarding Crosshairs
u could create a dynamic Crosshair?! now what is that
it is in the model itself
imagine having the crosshair as a extra cross in your model (actually just a alpha mapped plane - so no polymania there)
and animate the crosshair with the weapon = u could create some kind of loose focus and so on, think u get the idea
2ndEdit:
just realized that there is a resource to render a gui onto a object (texture)
www.garagegames.com/community/resource/view/10899
i will look into this and see if i can get it combined with the fxGuiSnooper - this might be the Solution to actually get it on a texture instead of a worldmodel
02/07/2013 (2:42 pm)
Hey Bryce, ye the implementation works well, it is at the end just an extra fileThe Resource: www.garagegames.com/community/forums/viewthread/127227
The only thing would be to get it onto a Weaponscope, as am freshly new to T3D - i didnt found a way todo that yet. (at least for now)
How it works:
Add the file "fxGuiSnooper.cpp" to your engine code (I put it in my projects source folder), compile and you should have a new control named "fxGuiSnooper" in the controls list within the GUI editor.
In the Object Editor, drop a cube object to use as the camera. Name it something like ViewCube.
Switch to the Gui editor and add a fxGuiSnooper control. Change the AttachedObject parameter to ViewCube. - by Ian Backlund
So as u see it is a extra camera - the effect is pretty common these days, it might be possible with some more knowlege about the weaponsystem in T3D to achieve this, or there might be even a better solution but for starters this would be it.
here is a video how something like that would look in the udk
www.youtube.com/watch?v=1Y8tcrAwdKk
and here one in crysis
www.youtube.com/watch?v=NgWp7qlNeqI
Note: It is usually the same way it is done, other engines are using render to texture aswell to produce this effect.
For example this was done in a modified W:ET - MOD TrueCombatElite CQB
www.youtube.com/watch?v=GDxdstoaWiI
this video shows its best i think.
now to the downside, the whole thing means that when u switch to the scope the scene gets rendered twice = double impact
but at the end just certain scopes would/ should have some kind of zoom option.
Had to edit it :p regarding Crosshairs
u could create a dynamic Crosshair?! now what is that
it is in the model itself
imagine having the crosshair as a extra cross in your model (actually just a alpha mapped plane - so no polymania there)
and animate the crosshair with the weapon = u could create some kind of loose focus and so on, think u get the idea
2ndEdit:
just realized that there is a resource to render a gui onto a object (texture)
www.garagegames.com/community/resource/view/10899
i will look into this and see if i can get it combined with the fxGuiSnooper - this might be the Solution to actually get it on a texture instead of a worldmodel
#27
A dynamic crosshair changes its scale based on spread. A lot of newer FPS's will enlarge the crosshair when shooting and moving, and a shrink it when the player stops those activities.
@Stephen: Yep! First person, third person -- no difference. You'll even see AI Players perform them. I'll occasionally catch two bots in a knife fight, and I'll sometimes even get to be the victim when I'm not checking my corners.
02/08/2013 (8:10 pm)
@J0linar: I'll start looking into it. I've always wanted to have something like that. I've seen it in a few games but I've never know the technical terms.A dynamic crosshair changes its scale based on spread. A lot of newer FPS's will enlarge the crosshair when shooting and moving, and a shrink it when the player stops those activities.
@Stephen: Yep! First person, third person -- no difference. You'll even see AI Players perform them. I'll occasionally catch two bots in a knife fight, and I'll sometimes even get to be the victim when I'm not checking my corners.
#28
Can the AI tell a difference from light and dark? Like you have a dark room that you are hiding in and a patrol AI walks by you. Can they detect you if you make noise or shine a flashlight?
02/09/2013 (10:12 pm)
@BryceCan the AI tell a difference from light and dark? Like you have a dark room that you are hiding in and a patrol AI walks by you. Can they detect you if you make noise or shine a flashlight?
#29
when including the Crosshair in the model
u can animate it accordingly to the animations
i will see if i can get the other thing/ the rtt scopes done
either way am glad that you consider to include this
02/11/2013 (2:38 am)
@Bryce, ye that is rightwhen including the Crosshair in the model
u can animate it accordingly to the animations
i will see if i can get the other thing/ the rtt scopes done
either way am glad that you consider to include this
#30
They will detect noise if you move too quickly or fire your weapon within earshot. As far as the flashlight shining goes, you could probably implement that the same way as the shadows. Modify the code so that AI will increase their sight distance for objects with their flashlight on, and if their light is on, increase that percentage by a lot.
02/11/2013 (5:55 am)
@Stephen: I don't have support for shadow detection at the moment. You could always have triggers that represent light and/or dark, and upon entering the trigger, the player could set a field that reflects this, such as obj.inShadow or obj.inLight. Then you could alter the visibility percentage based on this in the sight functions ( [/i]if (%obj.inShadow) %visProb *= 0.2; [/i] ). I have thought about altering visibility based on shadows, but from the looks of it, lighting is client-side while AI is server-side.They will detect noise if you move too quickly or fire your weapon within earshot. As far as the flashlight shining goes, you could probably implement that the same way as the shadows. Modify the code so that AI will increase their sight distance for objects with their flashlight on, and if their light is on, increase that percentage by a lot.
#31
02/11/2013 (8:47 am)
@Bryce: Do you think that this could be a later feature? How does the AI react to ladders?
#32
getting closer
it is in no way near usabel atm especially since it did not worked the way i wanted it but am sure sooner or later its gonna work how it should
02/12/2013 (1:09 pm)
regarding rendertoTexture scopes
getting closerit is in no way near usabel atm especially since it did not worked the way i wanted it but am sure sooner or later its gonna work how it should
#33
Not my intention to be annoying and neither to fill this blog with pointless stuff but honestly
what is the update progress of TAIK, there seems to be only silence now
(i actually sent you a e-mail, almost a week passed and no answer)
and another thing your brycesoftware site seems to malfunction
(at least it did for me)
so ye u should understand my concerns, will there be any news regarding TAIK update?
02/26/2013 (8:30 am)
@BryceNot my intention to be annoying and neither to fill this blog with pointless stuff but honestly
what is the update progress of TAIK, there seems to be only silence now
(i actually sent you a e-mail, almost a week passed and no answer)
and another thing your brycesoftware site seems to malfunction
(at least it did for me)
so ye u should understand my concerns, will there be any news regarding TAIK update?
#34
The way a lot of people as well as myself look at it is that it's better to release a complete product a bit late than to release a buggy, unfinished product right away.
02/26/2013 (8:33 am)
I never saw it, my spam filter must have hidden your email. These things take time, I'm still fulfilling some feature requests and I still need to update the documentation. I'm also encountering bugs left and right that I'm glad I caught before release.The way a lot of people as well as myself look at it is that it's better to release a complete product a bit late than to release a buggy, unfinished product right away.
#35
anyways thx for the reply
regarding my e-mail there isn`t much besides unpatients and a offer to help you regarding models if you need help.
and ofc it is better to release a product without bugs, just wanted a sign of life - :/
02/26/2013 (8:40 am)
Almost looks like you are sleepining/ camping in teh forumsanyways thx for the reply
regarding my e-mail there isn`t much besides unpatients and a offer to help you regarding models if you need help.
and ofc it is better to release a product without bugs, just wanted a sign of life - :/
#36
just a quick question about TAIK compatibility with other products
is it compatible with the GMK?
or is there already some kind of implementation for opening doors and sorts in TAIK?
mainly my question is if there is already some kind of interaction with enviroment (opening closing doors/ turning stuff on/off) in TAIK
note this not a feature request, just want to get a better picture of TAIK.
as always thx for taking the time
03/07/2013 (12:08 am)
Sry to bother again,just a quick question about TAIK compatibility with other products
is it compatible with the GMK?
or is there already some kind of implementation for opening doors and sorts in TAIK?
mainly my question is if there is already some kind of interaction with enviroment (opening closing doors/ turning stuff on/off) in TAIK
note this not a feature request, just want to get a better picture of TAIK.
as always thx for taking the time
#37
TAIK doesn't immediately support opening doors, but I had my own implementation of it back in the day. All I did was cast a ray forward about 1m in the AI thinking loop. If the ray found a door, and they were moving, I'd have the AI open the door.
It's all about implementation. I've got a ton of behavior pre-coded into TAIK, but you can always add new states. A capture the flag state would be made by adding something like "stateCTF()" to the thinking loop, and coding all the logic for a capture the flag game (if not holding flag > move to flag, if at flag > pick up flag, etc.) in that stateCTF function.
Behavior states off the top of my head: Idle, React, Hunt, Flank, FindCover, CloseAttack, EvadeGrenade, SquadRegroup, SquadHold, SquadMove, SquadObjective, and some others I think... They all have their own behaviors, and are triggered based on what's going on. An AI will be in the FindCover state to shoot from cover, and a grenade lands nearby -- then he transitions to EvadeGrenade until the grenade explodes -- then transitioning back to FindCover to resume what he was doing. If he's with a friend who's able to cover him, he might drop into the Flank state to circle around the enemy.
All I'm trying to say is that it's flexible!
03/07/2013 (12:18 am)
It's compatible with GMK, though I have to warn you: it's easily the worst product I've ever bought for Torque. Most features are buggy and disfunctional, it doesn't look like the developers tested it at all before kicking it out the door for Torque 3D.TAIK doesn't immediately support opening doors, but I had my own implementation of it back in the day. All I did was cast a ray forward about 1m in the AI thinking loop. If the ray found a door, and they were moving, I'd have the AI open the door.
It's all about implementation. I've got a ton of behavior pre-coded into TAIK, but you can always add new states. A capture the flag state would be made by adding something like "stateCTF()" to the thinking loop, and coding all the logic for a capture the flag game (if not holding flag > move to flag, if at flag > pick up flag, etc.) in that stateCTF function.
Behavior states off the top of my head: Idle, React, Hunt, Flank, FindCover, CloseAttack, EvadeGrenade, SquadRegroup, SquadHold, SquadMove, SquadObjective, and some others I think... They all have their own behaviors, and are triggered based on what's going on. An AI will be in the FindCover state to shoot from cover, and a grenade lands nearby -- then he transitions to EvadeGrenade until the grenade explodes -- then transitioning back to FindCover to resume what he was doing. If he's with a friend who's able to cover him, he might drop into the Flank state to circle around the enemy.
All I'm trying to say is that it's flexible!
#39
then schedule a job ~5 seconds later to close the door.
Bryce@ It seems the TAIK is using the recast resource? If so, is it compatible with the Walkabout tools as well? Or would it essentially just be redundant ?
03/07/2013 (1:50 pm)
J0linar@ I use the example from RRGTS assets (Downtown Districts?) ... they included a door with an open animation. just had to place the door and setup the ::onCollision() to trigger the animation and open the door.then schedule a job ~5 seconds later to close the door.
Bryce@ It seems the TAIK is using the recast resource? If so, is it compatible with the Walkabout tools as well? Or would it essentially just be redundant ?
#40
and thx for givin your personal opinion on the gmk - i will just wait for the TAIK update and decide then - since deepscratch took over the gmk it might get better or well at least stability and bugs might get better/killed
@jeff Yaskus, thx but am aiming more for a all in one solution with less workarounds as my time for my current project just runs out and tbh am not even close to understand t3d that great to implement the needed stuff thats why am happy that there are ppl like Bryce in this community who share their brains with their products.
03/07/2013 (3:01 pm)
cool stuff @Bryce, just saw the videos teh other day (got a eye on your channel^^)and thx for givin your personal opinion on the gmk - i will just wait for the TAIK update and decide then - since deepscratch took over the gmk it might get better or well at least stability and bugs might get better/killed
@jeff Yaskus, thx but am aiming more for a all in one solution with less workarounds as my time for my current project just runs out and tbh am not even close to understand t3d that great to implement the needed stuff thats why am happy that there are ppl like Bryce in this community who share their brains with their products.

Torque Owner Bryce
Tactical AI Kit
I've always wanted to get working on a crosshair that'd adjust itself based on the spread adjusters (bullet spread increases when moving, standing, not aiming, etc). Someday...