A Model of Enemy Vision

Not a reproduction of any real game. It checks distance, facing and blocking for one centre point. Sound and lighting are not included.

Drag the dot to try any position. Changing a setting resets the gauge to 0. Change the "can see" conditions and the "spotted" conditions one at a time.

About this model

This is our own model, used in the video "Why do stealth game enemies spot you behind walls?" on the YouTube channel "How Games Are Made" (ゲームのつくり方の歴史). AI was used to make the diagrams and code, and the facts were checked against sources by the creator. No game footage or official assets are used.

What this model shows

It splits the moment a stealth game enemy decides "I see you" into three checks. A uses distance only. B adds facing (the angle of view). C also draws a line from the eye and checks whether a wall blocks it.

How to try it

Switch the version A → B → C, change the path between "Behind the back", "Behind the wall" and "Approach diagonally from the front", and watch how the gauge of frames needed to spot you changes. Drag the dot to try any position. In A you are spotted even behind the enemy's back, B makes the back safe, and only C turns the space behind the wall into a hiding place. "Brief exposure" shows that being seen for a moment does not count as spotted if you hide again quickly.

Key idea

An enemy's eyes are not one test. They are a stack of checks: narrow down by facing and distance, then check for blocking. Where you draw each line decides whether the same spot is seen or not. Sound and lighting are not included, and this is not a reproduction of any real game.