Into Game Mechanics: Guards Patrol — Part 2

Daniele Quero, PhD
Geek Culture
Published in
3 min readSep 24, 2021

Objective: Optimize patrol, introduce random patrol, introduce guard animations

Today we’re going to make thing better for the guards. First thing is to optimize their behaviour. I thought about it and leaving all in update methods results in useless calculations and vector comparisons. So, I’m going to shove everything in a coroutine and start it in the .Start() method.

Daniele Quero, PhD
Geek Culture

A professional developer with passion for game developing and skill-growing. A former Nuclear Physics Researcher who changed his life to pursue his dreams