We've said from the beginning that we want characters in Keep the Peace to behave realistically, even when they don't receive any input from the player. Officers should be able to chase fleeing suspects, make arrests, and defend themselves if necessary, even if you don't give the order. Suspects should make realistic decisions about whether to surrender, run away, or fight. We want Keep the Peace to be a game about strategy, not about micromanaging the individual actions of dozens of characters running all over the map.
But before these characters can make smart decisions about the situation around them, they have to be aware of what's going on around them. In preparation for the first playable prototype of Keep the Peace, we've been working hard on the system through which characters can detect, identify, remember, and react to, the people and things they encounter in the world. This awareness system is fundamental to almost every other artificial intelligence element in the game.
Components of the Awareness System
All characters in Keep the Peace have an absolute maximum range within which they can detect and identify other things. Not all characters have the same range -- an officer with superior perception skill might be able to detect objects from farther away, for example, and environmental conditions could moderate this further. An officer perched atop a building could provide long-range oversight across an entire scene, while one in a crowded alleyway wouldn't be able to see very far at all. We hope to eventually incorporate weather elements into the game -- snow, rain, fog, etc. -- and these too could impact the visibility of your officers and suspects at a scene.
Other factors too can impact detection, and might therefore affect the tactics you choose to use. An idle suspect might have a limited field of view, paying attention only to what's in front of them, and allowing officers to sneak up from the side or from behind to gain an advantage.
When approaching from the side or the rear, officers can get much closer to this suspect before being detected. (Debugging lines: The light blue circle is the absolute maximum awareness range of the suspect. Red lines indicate elements within range but not yet detected/identified. Green lines indicate elements that have been detected. Grey lines indicate previously detected elements that are no longer seen but are remembered by the suspect.)
Characters can also get distracted. A suspect that is vigilantly standing guard is more likely to spot your officers than one who is dozing off, or one who is deep in conversation. We plan to incorporate ways for you to deliberately use distraction tactics within the game. For example, a discussion with a hostage negotiator could distract a suspect long enough for a tactical team to sneak by and get into position. Or, when executing a high-risk arrest warrant, you might try coaxing a wanted suspect out of their home so they can be arrested in the open, eliminating the need for a dangerous building entry.
This time the suspect doesn't notice the side-approaching officer until even later because they are distracted by a conversation.
Visibility is also affected by "conspicuity". A fully-marked police vehicle with its lights flashing and sirens blaring will be much more conspicuous -- and thus can be detected from a farther distance -- than a stealth vehicle, or an officer on foot. Choosing the type of units you send to a scene, the direction from which they approach, and whether they do so loud-and-fast or slow-and-quiet, can have a dramatic effect on how an incident unfolds.
Though fast moving vehicles can get officers into position quickly, they might also be sooner detected.
Characters can also have multiple awareness systems with different properties -- for example, a sense of sight and a sense of hearing. The former might require "line-of-sight", and might be significantly affected by the character's field of view, while the latter would not. They also have memory -- when they lose sight of something, they remember where they last saw it, what it was doing, and its direction of travel. Characters can also share their awareness information with others on their same "team". Just because an individual officer can't see something that their teammates can, doesn't mean they'll ignore it.
What We're Working On
Over the past few weeks we've completely built out the core of this system -- characters react based on field of view, their awareness/distraction level, and the conspicuity of the objects they can detect. They remember objects they've lost sight of, and they share awareness among team members. Next we'll be connecting this system to the user interface so that officer awareness will also dictate what you, the player, can see. Right now, the player can (quite unrealistically) see everything and everyone that exists in the map. Soon this will be more limited, and you'll be dependent on the perception and positioning of your officers -- and other sources of intelligence -- to know what's going on.
In the future, we also plan to add various other ways that you can improve your situational awareness. Traffic cameras, helicopters, even drones (!) could all have a significant impact on your ability to understand your surroundings, and thus allow you to make better decisions about how to approach challenging incidents.