Tactical AI Kit: Screaming Terrorists
by Bryce · 12/23/2008 (2:13 pm) · 7 comments
Hello Everyone! Merry Christmas--er---Happy Holidays!
I've finally gotten around to improving the Alert Level System in the Tactical AI Kit. I've been working to make it give NPCs a more detailed idea of what kind of threats are lurking in their area and what to do about it.
Not too long ago, I implemented a pretty basic alert level system for the Tactical AI Kit. It consisted of alert, and not alert. A little too basic, and not very immersive, either. It was too vague, and as a result, I couldn't get many cool behaviors out of it.
After I quit procrastinating, I finally programmed it! The new, improved alert level system can now make an NPC determine how to react to certain things, e.g. not going out to investigate suspicious movement while being shot at. The new alert level system looks like this:
Alert level 0: Doing nothing, not really paying much attention. NPCs at alert level 0 can be sneaked up on very easily by moving slowly.
Alert level 1: Something suspicious has happened, but we aren't sure if it's something that could hurt us yet. This is triggered by hearing (enemy) players moving fast enough nearby. We go out to investigate, and after we're done searching, we go back to Alert level 0.
Alert level 2: We know there is something that could harm us, but we aren't sure if we are in immediate danger or not. This alert level is entered when we find a dead body or hear gunfire.
Alert level 3: We are in immediate danger. This is triggered by spotting an enemy or coming under fire.
This system is also useful for using the playAudio() function to make the NPCs say things. The alert level system is the difference between hearing suspicious movement and saying "is someone there?" or yelling "I know you're there! You can't hide from me!"
Also, for my entertainment and to add the illusion of panic and surprise, NPCs entering alert level 3 will scream. It's a pretty nice effect, I'd say :-D
Video: www.youtube.com/watch?v=QXyQ0GIJGKc
Please rate and comment!
I've finally gotten around to improving the Alert Level System in the Tactical AI Kit. I've been working to make it give NPCs a more detailed idea of what kind of threats are lurking in their area and what to do about it.
Not too long ago, I implemented a pretty basic alert level system for the Tactical AI Kit. It consisted of alert, and not alert. A little too basic, and not very immersive, either. It was too vague, and as a result, I couldn't get many cool behaviors out of it.
After I quit procrastinating, I finally programmed it! The new, improved alert level system can now make an NPC determine how to react to certain things, e.g. not going out to investigate suspicious movement while being shot at. The new alert level system looks like this:
Alert level 0: Doing nothing, not really paying much attention. NPCs at alert level 0 can be sneaked up on very easily by moving slowly.
Alert level 1: Something suspicious has happened, but we aren't sure if it's something that could hurt us yet. This is triggered by hearing (enemy) players moving fast enough nearby. We go out to investigate, and after we're done searching, we go back to Alert level 0.
Alert level 2: We know there is something that could harm us, but we aren't sure if we are in immediate danger or not. This alert level is entered when we find a dead body or hear gunfire.
Alert level 3: We are in immediate danger. This is triggered by spotting an enemy or coming under fire.
This system is also useful for using the playAudio() function to make the NPCs say things. The alert level system is the difference between hearing suspicious movement and saying "is someone there?" or yelling "I know you're there! You can't hide from me!"
Also, for my entertainment and to add the illusion of panic and surprise, NPCs entering alert level 3 will scream. It's a pretty nice effect, I'd say :-D
Video: www.youtube.com/watch?v=QXyQ0GIJGKc
Please rate and comment!
#2
12/23/2008 (2:41 pm)
@Steve: I've been planning on improving that. At the moment, the NPCs will over to where the player was heard, stop, then walk back. I'm going to soon add area searching, where the NPC will search every spot that it can't see within a radius of where the player is heard. This makes the AI look much smarter and adds more of a challenge to the game.
#3
Looks like youre making progress though. Although I think you need to improve the pathing from the last demo I saw.
Also, you might want to consider dynamic cover, these days you have to be able to deal with your cover being destroyed (look for the killzone 2 ai demo video over at aigamedev for an example).
12/23/2008 (2:47 pm)
Bryce: there is a "hunt the player" article in one of the AI Wisdom books. Think its 1, but you can check on the website.Looks like youre making progress though. Although I think you need to improve the pathing from the last demo I saw.
Also, you might want to consider dynamic cover, these days you have to be able to deal with your cover being destroyed (look for the killzone 2 ai demo video over at aigamedev for an example).
#4
12/23/2008 (3:26 pm)
@Phil: My last plan post addressed the destructible cover thing. If a piece of cover is destroyed, all that needs to happen is for the 'weight' field on the cover marker to be set to 0. That says that the marker can no longer be used. Code that does this could be added in the object's ::onDestroyed() method.
#5
12/24/2008 (6:44 am)
In other news, I finally added squad formations to the code to prevent squad NPCs from crowding up all the time:
#6
12/24/2008 (7:36 am)
great, great, great..... looking forward to see more :)
#7
12/24/2008 (4:52 pm)
I'm looking forward to a release. :-D It's looking better and better all the time. 
Associate Steve Acaster
[YorkshireRifles.com]