Patrolling Guard
A C# Unity exercise in keeping perception, navigation and guard state in sync.
Game AI Labs · Case study
These separate Unity exercises go from finding a path to deciding which action is worth taking. Each one has its own implementation history.
The patrol guard follows waypoints and switches to chase, search and return using sight and distance checks. In the A* lab I separated the path search, grid representation and movement. In the steering lab I blended arrival with separation instead of following a discrete tile route.
The behaviour-tree exercise moved the guard’s chase, search and patrol choices into ordered branches. Perception provides input to those branches; it is not responsible for driving navigation directly.
With GOAP, the agent chooses a costed sequence of available actions instead of following a fixed branch. I kept sensed facts separate from action effects and rechecked whether an action could execute before it began.
A C# Unity exercise in keeping perception, navigation and guard state in sync.
A Unity grid experiment in which search, tile state and agent movement are separate components.
A continuous movement exercise: agents share a target but should not collapse into the same point on the way there.
A Unity guard exercise that moves patrol, chase and search choices into explicit tree branches.
A goal-oriented action planning exercise that separates observed facts from changes an agent expects its actions to produce.
References
Sight starts the chase; the distance threshold ends it and leads to a search of the last tracked position.
Separates grid, node, search and movement. Uses Manhattan distance, excludes blocked tiles and reconstructs the route from parent links.
A steering agent blends weighted arrival and separation, caps speed and force, and draws velocity for inspection.
Perception feeds NavMesh chase, search and patrol sequences, separating sensing from action selection.
Separates sensed world facts from action effects, checks whether an action can execute, and limits replanning.