For this project, I worked alongside a team of my peers that were completing their final capstone course for graduation; I took part in the project through my Studio Collaboration course, which is intended to provide some insight into the development process and prepare us for what our final year will look like. I joined the team halfway through the development cycle as an assistant programmer. Our team communicated through Discord and Microsoft Teams to coordinate tasks and stay up to date on the overall progress of the project.
My main focus during my time with this team was on rebuilding the game's enemy AI. I set up the enemy pathfinding behavior using the A* search algorithm, following a series of videos created by Sebastian Lague (check out the A* playlist here, and his channel here). Essentially, this method turns the entire game scene into a grid that the enemies then use to determine the best route to their target.
The in-editor screenshot below shows the horror level of the game with the pathfinding grid overlayed on the environment. Red nodes are avoided by the AI and grey nodes are walkable. The different colored diamond gizmos in the scene indicate different points on each enemy's walking path.
Within this scene there are four enemies: a security guard and three bullies. You can see below how each enemy follows the path set out for them while avoiding unwalkable areas on the grid. The bullies simply follow their path, while the security guard will constantly check if the player is within range to start chasing them. If the player is being chased but moves outside of the guard's targeting range, he'll go back to his normal patrol path.

You may also like

Back to Top