Skip to content

five-on-it / packages/sim/src/cameras

packages/sim/src/cameras ​

The level's security cameras (GAME_DESIGN §5.5, §8): one entity per camera of the level (LevelData.cameras), created with the world in the level's order, so the server's and every client's are the same and a snapshot names one by its index. A camera is a small box on a fixed body at its lens, which shots hit like anything else: CAMERA_HEALTH hit points, then it is destroyed and sees nothing. A mission switches it off and on. Its view cone sweeps from side to side about its heading on a fixed plan, a pure function of the tick (cameraYaw), so the AI that watches through it and every client that draws it agree without a byte on the wire; only its state (on, off, destroyed) travels.

Variables ​

Functions ​