Categories
Video Games

Stealth AI

Bounty Hunter Screenshot 4

I have been working on Bounty Hunter for nearly two months now. So far, I have managed to create a player that can move and shoot, NPC that walks and runs from gunshots, and guards that chase and kill the player when they see him. Now I want to improve the AI of the guards. I am going to improve the AI of the NPC but at a later stage of development as they are not that important just yet.

Now I have been researching on how to make the AI feel more human and react better when they see the player, see a dead body, or hear some noise. Here are the things I will (try to) implement into the game to achieve my goal of better stealth AI.

Calling for backup. Guards will call for reinforcement when they have been fighting or chasing the player for a long period.

Changing patrol routes. Guards will change their patrol routes and go nearer to areas of disturbance or last seen location of the player. This gives the guard AI intelligence so that it can react to what the player does. The guard will first call for backup in the area. If none is available, then the guard will call in for the reinforcement team.

Central control system. To make all the guards interact with each other, I am going to have a central control system. For the time being I will call this the headquarters. The headquarters will control all the security cameras, alarms, etc. The headquarters will tell the guards to check out any alarms triggered, suspicious sightings or noises, noises, and events. The guards will have to report to the headquarters with their findings. If they do not report back, then the headquarters knows something is up and will put the guards on an alert state. Making the guards report to a central headquarters gives the immersion that the guards are a part of a big, evil corporation.

Level alert states. Each level in the game will be in one of four states. For the time being, I will call these states one, two, three, and four. State one is what the level starts in. This is where the guards will patrol or guard as they were ordered.

State two is when a guard hears something suspicious and checks it out. If the guard finds nothing, it will report and the level alert state will return to state two. The level state will go to state three if the guard does find something.

State three will be when a guard saw the player but lost him, found something suspicious, or a guard does not respond to headquarters. State three involves either guards calling for backup, guards changing patrol routes, or a guard or headquarters sending in a special reinforcement team to the last known location of the disturbance. In this state, the guards will be more alert and most likely go on different patrol routes. To make it more realistic AI, the state will be very difficult to go back down. This is because the guards know there is someone out there after them.

State four is when a guard finds a dead body. Most guards will change their patrol routes to be nearer to the area of disturbance, more guards will be guarding the exits, and there will be reinforcement team guards in the level. To keep the guard AI realistic, the level state will not go down once it gets to this state. This is because the guards know there is someone out there killing them.

By implementing the four features listed here, I should be able to give some intelligence to the guard AI. They should be able to react to what the player does to them or on the level. If this does not work, then I will have to revise the features and maybe even scrap or add some features.

As always, you can download the latest prototype build from itch.io.

One reply on “Stealth AI”

Leave a Reply

Your email address will not be published. Required fields are marked *