Copout

Copout is a arcade endless driving game made in Unity. After robbing a bank the player has to drive through the city and avoid getting captured by the police. The longer you keep driving the more points you get.
The main goal for this project was the development and implementation of an interesting AI. I wanted to give the police a dynamic behavior based on their surroundings including other police cars. After some research and trying different systems I ended up with a centralized squad system with one class managing and passing commands to the squads. Police cars follow their individual behaviour tree routine until the squad manager says otherwise. Commands depend on the squad size, position and the position of the player. This simple system is easy to expand and interesting situations can emerge out of it.


 
Used Tools: Unity, Visual Studio, Blender


 
AI features:
-Grid based A* pathfinding
-Behaviour Trees
-AI car avoidance
-Red light stops
-Dynamic squad regrouping
-Centralized squad system
-Squad commands for two and three police car squads
 



 

Cars stop at red lights and line up correctly. This is achieved with behaviour trees and trigger boxes.


A* grid and path indicator in Unity Editor

 
 



A squad manager automatically regroups squads based on their distance

 
 



Police blocking street, this is part of the behavior for squads of two police cars

 
 


blocking

Squad of three police cars target the sides of the player’s car