Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/wiki.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For the recommended method of using SARIF files in Ghidra, see:
The Game itself
------------------
- :doc:`Load balancing of the core game engine <wiki/load-balancing-table>`
- Game Mechanics
- :doc:`Enemy awareness <wiki/game-mechanics/enemy-awareness>`
- Graphics and Sound Systems
- Modding Support
- Multiplayer Architecture
Expand Down
14 changes: 14 additions & 0 deletions docs/wiki/game-mechanics/enemy-awareness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Enemy awareness

Units periodically check for enemies. These checks are distributed over
different game ticks rather than performed by every unit at once.

The nearest enemy and the enemy chosen for attack are not always the same.
Target selection takes account of the unit's orders, its current target and
the kind of enemy it is considering. A nearby enemy can still affect a unit's
awareness even when that enemy is not chosen as its next target.

Each player has a shared list of potential enemies. The game refreshes these
lists periodically, excluding allies and unsuitable units. The lists have a
fixed capacity. With very large opposing forces, additional enemies can
randomly replace earlier entries, so the list need not contain every enemy.