Good day, subscribers! Another week in the books. We’re diving deeper and deeper into Debris’ mechanics, specifically AI (artificial intelligence). A lot of the logic in Debris is triggered dynamically based on the perceptions of the creatures in the world. It’s important to track not only what each creature can detect, but what the player can detect as well. Our AI system consists of emitters (eg. lights), detectors (eg. eyes) and a point of interest manager that filters results based on what the creature cares about. Here are some examples:

The large circle represents the vision range of the flashlight fish (detector). The small circle represents the body of the fish and determines whether it is visible to other creatures (emitter). The cone is the volumetric light (like sunbeams or a flashlight in fog) that can be detected by other creatures (emitter).

There are a number of situations we have to account for to determine if a detector has direct or indirect vision of an emitter. This can be shown using elegant diagrams, like so: