SHADOWS OF REDEMPTION
AI GAME PROGRAMMER
PRIMARY RESPONSIBILITY: AI design and programming
Created a dynamic patrolling system.
System allows any enemy to be assigned as many waypoints as needed.
Enemies can patrol these waypoints and find their way back to their original position.
System enables enemies to investigate anomalies.
After investigating, they can continue back on their patrol path.
Unity Engine / C#
PATROL PATH IMPLEMENTATION
ARRAY TO LIST:
Initially, patrol waypoints are identified and stored in an array using GameObject.FindGameObjectsWithTag(“PatrolNode”) to find all game objects tagged as patrol nodes.
This array is then iterated over, and each waypoint (patrol node) found is added to a List (PatrolNodes), enabling dynamic management of the waypoints.
LIST TO QUEUE:
When preparing for patrol, waypoints from the List (PatrolNodes) are enqueued into a Queue<GameObject> (enemyNavQueue) as the NPC progresses through its patrol route.
This queue is used to dynamically manage the patrol path, allowing the NPC to move to the next waypoint in order, once the current destination is reached.
This process facilitates a flexible patrol mechanic where waypoints can be easily added, removed, or reordered, and the NPC can dynamically adjust its patrol route based on gameplay conditions.