Thank you for playing, for the guard's view I first measured if the player was close enough to the guard, and if the guard was facing the player(had a 45 degree cone of view, and 90 in the final level), then if the distance and direction conditions were both met, the guard will cast a ray cast toward the player and only begin to chase the player if nothing was in the way(ignoring items like glass). While chasing the guard doubles his view cone and loses interest in the player after a few seconds of not seeing him. I'm sorry about the brightness, I should've realized that everyone wouldn't know the layouts as much as me and a brighter experience would've been better.