Queens Vector AI Controller

I am currently developing Quantum Winter Queen’s Vector, a narrative-driven Sci-Fi raid-like shooter. This project aims to challenge players with intense, raid-like shooter combat while preserving their freedom to approach each encounter in their own way.

To meet the gameplay needs of Quantum Winter Queen’s Vector, I designed a comprehensive system that incorporates various abilities, particularly the ability to cloak and sneak around. This necessitated the creation of different AI states to respond effectively to player actions. Initially, I encountered issues where the AI would continue targeting the player even when cloaked. To resolve this, I implemented a check to determine if the player was cloaked and adjusted the AI’s state accordingly.

This system leverages several features of Unreal Engine, including Environmental Query System (EQS), behavior trees, a custom AI controller, and a custom patrol component.

Demonstration of AI.

On initialization, we set the behavior tree and define variables that will be used later.

On initialization, we set the behavior tree and define variables that will be used later.

When perception is triggered, the AI verifies if the target is the player. If confirmed, the location is logged, and the detection marker is made visible.

When perception is triggered, the AI verifies if the target is the player. If confirmed, the location is logged, and the detection marker is made visible.

Once the detection marker is visible, the AI calculates its distance from the target and adjusts the detection time based on proximity.

Once the detection marker is visible, the AI calculates its distance from the target and adjusts the detection time based on proximity.

The AI enters attack mode if the player remains in its perception too long or shoots the enemy. Either event triggers the attack state, allowing multiple ways for the AI to engage.

The AI enters attack mode if the player remains in its perception too long or shoots the enemy. Either event triggers the attack state, allowing multiple ways for the AI to engage.

When the AI loses sight of the player, it is visually marked in the world. Then the AI enters a search state. Upon an unsuccessful search, the AI goes back to patrol.

When the AI loses sight of the player, it is visually marked in the world. Then the AI enters a search state. Upon an unsuccessful search, the AI goes back to patrol.

This function is triggered when the player activates a cloaking ability. It retrieves all the AI in the level, checks their current state, and changes it if necessary.

This function is triggered when the player activates a cloaking ability. It retrieves all the AI in the level, checks their current state, and changes it if necessary.

With EQS, I created a custom context so that I could generate points around it. I then scored the points based on distance and visibility to the player.

With EQS, I created a custom context so that I could generate points around it. I then scored the points based on distance and visibility to the player.

At the start of our patrol task, I get the list of Patrol points on our AI. This component controls the patrol point location and has a wait function.

At the start of our patrol task, I get the list of Patrol points on our AI. This component controls the patrol point location and has a wait function.

The AI will iterate through the list of patrol points and navigate to each point in the game world.

The AI will iterate through the list of patrol points and navigate to each point in the game world.

After reaching the intended location the AI may wait before proceeding to the next patrol point.

After reaching the intended location the AI may wait before proceeding to the next patrol point.

This section is responsible for selecting the next patrol point in the list. After that, the patrol process restarts.

This section is responsible for selecting the next patrol point in the list. After that, the patrol process restarts.