Fabio Pedretti 88f5cbc922 Compute the data about the foes once per army and turn in DefenseArmy.assignUnit
assignUnit looped over all the foes of the army for every unit assigned
and, for each (unit, foe) pair, fetched the foe entity and its position,
tested its class, read its UnitAI order data (up to four times) and, when
the foe was close to saturation, tested the Hero and siege classes again.
None of this depends on the unit being assigned.

- Add the module function getFoeInfo(), which gathers once for all the
  foes of the army the entity, its position, the unit it is attacking (if
  any) and, lazily, whether it is a hero or a siege unit and its access
  index. The army keeps the result in foeInfo, which is reset when a foe
  is added, removed or renamed, and at the beginning of update(), as
  positions and orders change from one turn to the next.
- assignUnit reads that table instead of querying the entities. The foes
  are still visited in the same order and with the same checks, so the
  chosen foe is unchanged. assignedAgainst is still read live, as it
  changes while units are assigned.
- Read ent.position() only once.
2026-10-21 11:42:19 +02:00
2026-10-12 18:48:10 +02:00
2026-10-19 20:48:10 +02:00
2025-08-22 13:04:38 +02:00
2025-06-11 10:33:57 +02:00
2026-07-21 17:15:07 +02:00
2025-05-08 19:50:21 +02:00
2025-06-29 08:31:50 +02:00
2025-03-30 18:05:56 +02:00
2024-09-08 13:08:11 +02:00
2026-10-11 07:38:01 +02:00
2025-03-22 14:11:24 +01:00
2026-08-01 16:19:18 +02:00

0 A.D. Introductory Information

FreeBSD Build Status Linux Build Status macOS Build Status Windows Build Status

Game References Checks Status Pre-commit Checks Status

Bi-Weekly Bundles Status Technical Docs Status Nightly Build Status

0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform real-time strategy game of ancient warfare.

This is currently an incomplete, under-development version of the game. We're always interested in getting more people involved, to help bring the game towards completion and to share the interesting experience of developing a project of this scope.

There are several ways to contact us and find more information:

Running precompiled binaries on Windows

A precompiled, ready-to-play development version of the game is available from a checkout of the nightly-build SVN repository. If you are using the git repository, you have to follow the steps below.

In a checkout of the nightly-build SVN repository, open the "binaries\system" folder.

  • To launch the game: Run pyrogenesis.exe
  • To launch the map editor: Run Atlas.bat or "pyrogenesis.exe -editor"

Compiling the game from source code

The instructions for compiling the game on Windows, Linux and OS X are at BuildInstructions.

Reporting problems

Bugs should be reported on Gitea. For information on reporting problems and finding logs, see ReportingErrors.

Contributing Code

If you want to help out programming for the game, have a look at GettingStartedProgrammers or contact us on #0ad-dev on irc.quakenet.org

Contributing Artwork

If you want to make artwork for the game, have a look at For Artists or visit the forums.

Translating

You can help translating the game at https://www.transifex.com/projects/p/0ad for more information, see Localization

S
Description
Public pull mirror of upstream 0 A.D. from Wildfire Games Gitea.
Readme
14 GiB
0 Stars 1 Watchers 2 Forks
Languages
C++ 56.1%
JavaScript 35.9%
C 3.1%
Python 2.3%
Lua 0.6%
Other 1.7%