Steven Kastelec
Game & Systems Designer
AI Playground
Brief Description
​
Small project to understand the basics of AI programming using State Machine Add-on.​
​
Made In
Unity
My Role
AI Programmer

Challenges:
AI Drone - Active
​
The AI drone is an offensive companion AI that allows the player to attack enemies without having to give away their position. The drone starts off on the players back and Activates on key press.


Attacking
​
When the drone is active, the player can click on an enemy and the drone will enter an attack state. In this state, the drone gets within shooting distance of the enemy then shoots 3 bullets before reloading. When the enemy is dead, it goes back to the player and awaits a new target.
Recharging
​
The drawback of the drone is that it can only stay active for a couple minutes before needing a recharge. Depending on where the drone is, it will immediately stop its current state and move towards the player to enter a recharge state. The drone needs to be reactivated but can't before a period of time.


AI Enemy - Detection Cone
​
The AI Enemy was built to add challenge for the player. Each enemy has a cone attached to them that is used to detect the player if they are in it.
Detection
​
Inspired by "The Last of Us" AI system, the enemy has two raycast points to target. the first is the head when the player is standing and running around normally. The second is the chest when the player is crouched. This allows the player to hide in objects but detect them if they stand up.


Chasing
​
When they player is caught, the enemy will begin to chase the player as long as they are within the cone. The speed of the enemy increases in chase mode but not enough to outrun the player so they can still get away. So while being detected is bad, it wont always lead to death.
Out of sight
​
If a player is able to leave the vision cone, the enemy goes to the last known position of the player. if nothing is found, the enemy speed is sent back to normal and they will stop in that position before returning back to their patrolling pattern.
