Tactical AI Kit Single Player Demo #3
by Bryce · 10/21/2009 (11:22 pm) · 19 comments
You want another Tactical AI Kit demonstration? Of course you do.

Click here to download the meaning of life
Since the last demo back in April or May, a LOT of stuff has been added and improved to the kit. No, it's not up for sale yet, but this will be the last demo before it gets released sometime in the near future (don't ask me when). So, your comments and suggestions will determine the final changes to be made.
New missions and modes:
Endless AI Mode-- Self-explanatory. You kill an AI Player, another one drops in to replace him. Fun for the whole family. You get four teammates, and seven enemies spawn. When you die, you get to respawn with two random weapons! Nifty! There are two maps available in this mode.
Airplane and Linear Middle-Eastern Town: Same missions from the second demo, but these use the new zone feature. All NPCs are spawned at once, and are activated when they need to be. You command your squad in these ones (controls below).
Palace: Again, this isn't new, but this time you're commanded by an AI squad leader.
Close Quarters: There are 10 NPCs in this mission, and you spawn with two random weapons. There are many spots to hide and ambush, but keep in mind that the guards will do the same thing if they are alerted. If you get a silenced weapon, use that as much as possible. Also, prioritize the patrols; they can find bodies.
----Controls----
Left mouse: Fire
Right mouse: Aim down the sights
W,A,S,D: Guess...
Q, E: Lean left/right
Shift: Sprint (if you sprint into a low object, you mantle over it)
G: Throw a flashbang (frag grenade in the endless AI maps)
C: Crouch/Stand
R: Reload
Tab: 1st/3rd person
1: Switch to primary weapon
2: Switch to the secondary weapon
3: If the M4-M203 is equipped, this activates the grenade launcher. You'll get an on-screen tip about this if you get this weapon.
Y: Command your squad to move to the location you're pointing to
U: Command your squad to follow you
I: Command your squad to hold their position
O: Set your squad to fire at will or return fire only/stealth kills
B: SHANK
F: Pick up the weapon you're pointing at. Due to Torque's getMuzzlePoint oddness, you may need to fire a shot or change stances to pick up a weapon if it isn't working.
Cheater keys :]
4--Slow motion
5--Airstrike where you're aiming
Have fun! If someone can provide me with a mirror, send me an email. LEAVE A COMMENT!

Click here to download the meaning of life
Since the last demo back in April or May, a LOT of stuff has been added and improved to the kit. No, it's not up for sale yet, but this will be the last demo before it gets released sometime in the near future (don't ask me when). So, your comments and suggestions will determine the final changes to be made.
New missions and modes:
Endless AI Mode-- Self-explanatory. You kill an AI Player, another one drops in to replace him. Fun for the whole family. You get four teammates, and seven enemies spawn. When you die, you get to respawn with two random weapons! Nifty! There are two maps available in this mode.
Airplane and Linear Middle-Eastern Town: Same missions from the second demo, but these use the new zone feature. All NPCs are spawned at once, and are activated when they need to be. You command your squad in these ones (controls below).
Palace: Again, this isn't new, but this time you're commanded by an AI squad leader.
Close Quarters: There are 10 NPCs in this mission, and you spawn with two random weapons. There are many spots to hide and ambush, but keep in mind that the guards will do the same thing if they are alerted. If you get a silenced weapon, use that as much as possible. Also, prioritize the patrols; they can find bodies.
----Controls----
Left mouse: Fire
Right mouse: Aim down the sights
W,A,S,D: Guess...
Q, E: Lean left/right
Shift: Sprint (if you sprint into a low object, you mantle over it)
G: Throw a flashbang (frag grenade in the endless AI maps)
C: Crouch/Stand
R: Reload
Tab: 1st/3rd person
1: Switch to primary weapon
2: Switch to the secondary weapon
3: If the M4-M203 is equipped, this activates the grenade launcher. You'll get an on-screen tip about this if you get this weapon.
Y: Command your squad to move to the location you're pointing to
U: Command your squad to follow you
I: Command your squad to hold their position
O: Set your squad to fire at will or return fire only/stealth kills
B: SHANK
F: Pick up the weapon you're pointing at. Due to Torque's getMuzzlePoint oddness, you may need to fire a shot or change stances to pick up a weapon if it isn't working.
Cheater keys :]
4--Slow motion
5--Airstrike where you're aiming
Have fun! If someone can provide me with a mirror, send me an email. LEAVE A COMMENT!
#4
When the Ai are the squad leader you could do with a compass or map or something when they order a regroup, because I got seperated and lost.
But it's really great work, Bryce.
10/22/2009 (12:12 am)
Ass kicked quite a lot.When the Ai are the squad leader you could do with a compass or map or something when they order a regroup, because I got seperated and lost.
But it's really great work, Bryce.
#5
Btw: that screenshot does look awesome, I'm glad you got another demo out!
10/22/2009 (1:13 am)
Awesome DLing it right now, cant wait to see the new progress.Btw: that screenshot does look awesome, I'm glad you got another demo out!
#6
Packing a dual-core 2.8, 2 GB of ram, 64-bit Vista.
Otherwise, they seem to be reacting pretty well, and it's quite fun to snipe them from afar.
10/22/2009 (3:51 am)
Oddly, the performance was pretty abysmal for me. the plane level ran fine, but any other level where I got multiple AI doing stuff actively(the palace, as an example, when the AI's were having a firefight and I was nearby) the frame-rate plummeted to slide-show rates.Packing a dual-core 2.8, 2 GB of ram, 64-bit Vista.
Otherwise, they seem to be reacting pretty well, and it's quite fun to snipe them from afar.
#7
10/22/2009 (8:58 am)
Oh yeah! I'll definitely download this today!
#8
The plane was different. The close-quarters nature of that map makes it so that NPCs who can't see you can probably see one of their friends who is attacking you, and will gain all known information about you through him. There was no need for them to go through the react state for very long on the plane.
10/22/2009 (9:09 am)
@Jeff: The horrible performance at the palace was poor zoning on my part...I'm guessing the framerate went down in that prison yard-looking area with the tower and balconies? That's because I forgot to separate the zone for that area and the zone for the server room (where that screenshot above was taken) with yet another zone. Basically, when you were there, around 20 NPCs were active...Enemies taking cover and firing at you from it do not suck up much performance at all, the problem was the NPCs who were not part of the fight. At the moment, the reaction system is messy and badly written, and will be redone before release.The plane was different. The close-quarters nature of that map makes it so that NPCs who can't see you can probably see one of their friends who is attacking you, and will gain all known information about you through him. There was no need for them to go through the react state for very long on the plane.
#9
One question - I noticed the demo's have been TGE-based, but I see you do own T3D so a) will it be T3D compatible or b) will you port it or c) do you see any major issues with porting over to T3D?
Thanks...
10/22/2009 (1:56 pm)
Wow.. This just gets better with every blog - amazing stuff and perfect for our project. Guaranteed sale here..One question - I noticed the demo's have been TGE-based, but I see you do own T3D so a) will it be T3D compatible or b) will you port it or c) do you see any major issues with porting over to T3D?
Thanks...
#10
I've already gotten the C++ stuff ported to the latest version of T3D, and that's the most difficult part. Since everyone wants to use the cooler tech, I have no choice ;]
10/22/2009 (5:56 pm)
@Eikon Games: I use TGE because that's all my computer is powerful enough to run, so that's all I am comfortable developing with. I've got a copy of Torque 3D, and I'll have the kit ported for it before release.I've already gotten the C++ stuff ported to the latest version of T3D, and that's the most difficult part. Since everyone wants to use the cooler tech, I have no choice ;]
#11
if you want, I could run another bout of testing and email back a more detailed run-through of what was happening where?
10/22/2009 (6:06 pm)
Thanks for the response back bryce. The plane running best makes sense, like you said, but when I was talking about performance drops, I was referring to pretty much every other level I tried. They would generally run ok at the start, but when I got too close to an AI group, or a lot of AIs were reacting, the framerate slide-showed. The linear middle eastern town was running sluggishly at the very start, and slide-showed as I made my way to the first spot the enemy AI shows up in. The palace got particularly bad on the library room and the balconies as you mentioned. Snowy forest ran fine until it randomly entered a slide-show when i walked over a hill. I didn't actively see any AI nearby, but I assume they saw me. The open-ended middle eastern town ran fine until I took a couple dozen steps into the maps and looked over to one side, and the framerate plummeted again. if you want, I could run another bout of testing and email back a more detailed run-through of what was happening where?
#12
10/22/2009 (6:29 pm)
@Jeff: I looked into it, it's a problem with the exponential spawning. There's a variable you can set on the spawn markers that can respawn x number of NPCs at that marker every time an NPC that came from that node dies. They aren't properly added into their zone, resulting in unnecessary overhead. If you go into the demoMission.mis file in data/missions, and change every instance of numRespawns = "[number bigger than zero]"; to numRespawns = "0";, you'll disable respawning on all markers and it should be playable.
#13
10/23/2009 (6:02 am)
Perfect - thanks Bryce.
#14
10/23/2009 (7:20 pm)
Was I only supposed to change it in the demoMission file? Did the change, and still had it slideshow in the balance first time I ran into a group of enemy AI.
#15
10/23/2009 (8:19 pm)
I'll look into it. I think I know where to look, it's the pesky wander function. It searches through every navigation node in the map, makes a list of nodes that are close to the NPC, and runs an A* path to each to make sure the NPC can move to them. I think that map has around 700 nav nodes...Yeah. That needs work.
#16

Good work on the demo! I'll definitely play around a little more.
No performance issues, except it seemed to choke a bit at the start of each level - then it was fine after a few seconds.
10/24/2009 (3:04 am)
After a quick play, I noticed that sometimes the AI seems uncannily eagle-eyed. For example, this terrorist was pistol-sniping me (and hitting me!) from such a distance away that we could barely see each other:
Good work on the demo! I'll definitely play around a little more.
No performance issues, except it seemed to choke a bit at the start of each level - then it was fine after a few seconds.
#17
That would be the sniping state. Here's a quick break-down of what happens:
1) He sees you from that distance, meaning he was previously alerted by loud gunshots or a found body. You were probably firing a weapon without a sound/flash suppressor, or you were moving quickly while he was looking your way.
2) He notices that you're far enough away that if you stop moving or firing, he won't be able to see you any more, so he enters the snipe state. In this state, the view distance is increased and his aim inaccuracy is lowered.
3) He aims for your head and squeezes off a shot every think tick.
The problem was that I forgot to incorporate the cone-of-fire resource with the pistols, so they have 100% perfect aim...Normally, you wouldn't even try to pistol snipe in the first place, so I'm thinking that I should add a maxSnipeDist variable in the weapon image datablock so this doesn't happen.
This is a lot better when they're holding a rifle, like a Dragunov or G3. The reason I added the snipe feature in is because it looks rather silly when he shoots at you, you stop moving, and he stops shooting...When I see an NPC way down the street, I can usually spot his silhouette, aim down the sights, and shoot him in the head. That's the idea, anyway. There are a ton of global variables that can tweak this for each AI type.
At the beginning of the linear missions, all AI Players are dropped in at the same time, run a think tick, and then the AI Manager shuts off the NPCs that aren't in the active zones. So that's your beginning framerate hit.
10/24/2009 (12:40 pm)
@Daniel: That would be the sniping state. Here's a quick break-down of what happens:
1) He sees you from that distance, meaning he was previously alerted by loud gunshots or a found body. You were probably firing a weapon without a sound/flash suppressor, or you were moving quickly while he was looking your way.
2) He notices that you're far enough away that if you stop moving or firing, he won't be able to see you any more, so he enters the snipe state. In this state, the view distance is increased and his aim inaccuracy is lowered.
3) He aims for your head and squeezes off a shot every think tick.
The problem was that I forgot to incorporate the cone-of-fire resource with the pistols, so they have 100% perfect aim...Normally, you wouldn't even try to pistol snipe in the first place, so I'm thinking that I should add a maxSnipeDist variable in the weapon image datablock so this doesn't happen.
This is a lot better when they're holding a rifle, like a Dragunov or G3. The reason I added the snipe feature in is because it looks rather silly when he shoots at you, you stop moving, and he stops shooting...When I see an NPC way down the street, I can usually spot his silhouette, aim down the sights, and shoot him in the head. That's the idea, anyway. There are a ton of global variables that can tweak this for each AI type.
At the beginning of the linear missions, all AI Players are dropped in at the same time, run a think tick, and then the AI Manager shuts off the NPCs that aren't in the active zones. So that's your beginning framerate hit.
#18
EDIT: I guess it seemed a little cheap because the fog on the map should have obscured me, or so it seemed. Does the AI take weather conditions into account?
I had a bit more of a play with it. The AI can be brutal! I like it. It's great fun to just go to free-camera in an endless IA match and watch them playing. Do you have any sort of higher objectives in the kit - or plan to? It'd be great to be able to script some objectives for each side, and have them perform accordingly. For example, the soldiers would actually try to attack and hold ground instead of just reacting to the enemies in their presence.
EDIT: Is the 'how it all works' file still current? I'm having lots of fun reading through it, but it seems like some things you mention in there don't tally with how the AI behaves (for example, I've seen them using grenades... well, once).
EDIT: Just played Palace. It's really cool being commanded by the AI squad, but it would be great to see them being alittle more cautious, and using stuff like flashbangs. As it is, they just sort of walk in and clear the place out without too much difficulty ;P.
10/27/2009 (2:37 am)
Quote:The problem was that I forgot to incorporate the cone-of-fire resource with the pistols, so they have 100% perfect aim...Heh, that sounds like it ;P
EDIT: I guess it seemed a little cheap because the fog on the map should have obscured me, or so it seemed. Does the AI take weather conditions into account?
I had a bit more of a play with it. The AI can be brutal! I like it. It's great fun to just go to free-camera in an endless IA match and watch them playing. Do you have any sort of higher objectives in the kit - or plan to? It'd be great to be able to script some objectives for each side, and have them perform accordingly. For example, the soldiers would actually try to attack and hold ground instead of just reacting to the enemies in their presence.
Quote:At the beginning of the linear missions, all AI Players are dropped in at the same time, run a think tick, and then the AI Manager shuts off the NPCs that aren't in the active zones. So that's your beginning framerate hit.I figured it was something like that.
EDIT: Is the 'how it all works' file still current? I'm having lots of fun reading through it, but it seems like some things you mention in there don't tally with how the AI behaves (for example, I've seen them using grenades... well, once).
EDIT: Just played Palace. It's really cool being commanded by the AI squad, but it would be great to see them being alittle more cautious, and using stuff like flashbangs. As it is, they just sort of walk in and clear the place out without too much difficulty ;P.
#19
No, at the moment they figure view distances by global variables that are unique for each AI type.
I had a facepalm moment when I uploaded the demo and realized that I forgot to change those files...Yes, they're very outdated.
I've thought about that too. Whenever your squad leader gives you a move up order, he's sending you into an area that he can't see. I'm wondering if I could compare the area they are already in to the area they're about to move into...If the unfamiliar area is more visible, and they're not worried about making a ton of noise, I could find a way to make them toss in a flashbang and clear it out. The main problem here would be figuring out how to get them to bounce the 'nade around the corner.
11/05/2009 (6:53 pm)
Sorry for the late response, Daniel. Didn't see your edits until I read this over again.Quote:I guess it seemed a little cheap because the fog on the map should have obscured me, or so it seemed. Does the AI take weather conditions into account?
No, at the moment they figure view distances by global variables that are unique for each AI type.
Quote:Is the 'how it all works' file still current?
I had a facepalm moment when I uploaded the demo and realized that I forgot to change those files...Yes, they're very outdated.
Quote:Just played Palace. It's really cool being commanded by the AI squad, but it would be great to see them being alittle more cautious, and using stuff like flashbangs. As it is, they just sort of walk in and clear the place out without too much difficulty ;P.
I've thought about that too. Whenever your squad leader gives you a move up order, he's sending you into an area that he can't see. I'm wondering if I could compare the area they are already in to the area they're about to move into...If the unfamiliar area is more visible, and they're not worried about making a ton of noise, I could find a way to make them toss in a flashbang and clear it out. The main problem here would be figuring out how to get them to bounce the 'nade around the corner.
Associate Steve Acaster
[YorkshireRifles]