Division Inspited AI Prototype
oct/2023 - present
The aim is to make an AI system for a third-person shooter game, inspired by Tom Clancy's The Division’s Faction System. Instead of making the enemies harder by making their guns stronger, I'll tweak their behavior as the game progresses like making them more aggressive or by increasing they weapon accuracy. I am going with a data-driven approach, so I only need one type of behaviour for all enemies, making things easier to manage. I'll adjust how aggressive or defensive they are using data, so the game gets tougher without just making the enemies bullet sponges.
Core Attributes
-
Cover System
-
Token System
-
Data-Driven AI
-
Cover and Non-Cover Combat
Cover System
Achieved dynamic cover selection using EQS with a static cover placement system, enhancing gameplay control by considering covers as smart objects that are removed from search lists once occupied.
​
Cover Types
-
Crouch Cover: Cover objects where AI has to crouch to take cover, and un-crouch to get out of cover.
-
Peak Cover: Cover objects where AI has the ability to peak through the cover, (its more like a standing cover)(it can also do crouch peak, but that functionality is not yet added)
Cover Generation
-
Generation: Created the cover generation in such a way that I can just put the cover in the level, scale it up according to the need, and then just click on the generate button and it will generate the cover shape and cover points, also created a utility widget to automate this process.
​
Manual cover generation
Auto cover generation
-
Cover Searching(EQS)
-
Cover Object selection: I am using 2 different cover search EQS, one EQS is only used at the start of the combat, to find the closest cover, and 2nd EQS is to help AI switch to new covers in such a way that they will keep on getting close to the player by switching the cover.
-
EQS to find next cover after 1st cover has been used/searched.
EQS to find the first cover
Cover Point Selection
-
Crouch Cover Point: I am searching those crouch points on the cover that are farthest to the player, as they will most likely be able to hide the AI, but there are cases where this method does not always work, especially those cases where the crouch points are only on one side of the cover, for ex. an elevated window.
-
Peak Cover Point: For the peak points I am finding a pair of crouch and peak points together, a crouch point such that AI can hide from the player, and a peak point from where AI can see the player.
AI
Achieved flexible AI behavior variation using a shared, data-driven Behavior Tree, simplifying development by adjusting AI attributes through data assets, enabling easy creation of both easy-to-defeat and challenging AI variations
-
AI Types( in current build)
Currently, there are only 4 types of AI in the build, but I can create new types just by creating a new data asset, as you can see the SharpShooter, is not in the build as of now, but I can create it without changing the Behaviour Tree.
Bahevior Tree
-
I have created multiple sub BT’s like: Cover Combat, Non-Cover Combat, Common Behaviour, etc for our project and then combined those BTs into a single one, and each AI is using that combined BT.
Cover Combat BT(simplified form)
Non-Cover Combat BT
Combat
-
Token System: I added a Token System to manage how many AI can shoot at the player simultaneously. Each AI needs a token to shoot, and if there's one available, it can fire. This helps balance the game's difficulty, as I can adjust the number of tokens given out. I also linked this system to our cover system, so AI won't all change cover at once, making gameplay smoother.
Combat without token
Combat with token
This is how Token works at base level
Location Reservation: I set up a system where AI reserve their goal locations, and when another AI needs a goal, they get points that are a certain distance away from reserved locations. This helps keep AI spread out during combat.
Cover and non-Cover Combat: I have setup-ed the AI to adapt to different combat scenarios. Cover AI can fight in both cover and open areas, while non-cover AI sticks to open combat. Using EQS, non-cover AI approaches the player, keeping a safe distance. Cover AI uses EQS to find new cover and gradually closes in on the player. If the player gets too close, they switch to open combat, shooting without needing a token, then seek new cover at a safe distance.
Non-Cover Combat
Cover Combat
Encounter space: This "combat space" acts as a control center for the AI during combat. It allows AI to communicate with allies, assigns tasks like throwing grenades or investigating, and selects cover options within its boundaries. It also helps AI understand its surroundings during combat.