Commit graph

25661 commits

Author SHA1 Message Date
Cayleb-Ordo
915493bc3a Add a module to fetch and setup Windows prebuild libraries
This module downloads the given svn revision based on the current
architecture selected. It also sets up the `CMAKE_PREFIX_PATH`.
Add new option to disable fetching, which assumes that the libraries
are already in the correct folders.
2026-05-17 18:22:22 +02:00
Cayleb-Ordo
dac1036c44 Add Root CMakeLists.txt and custom cmake modules
CMake is de facto the industrie standard for building C/C++ Code.
It is cross platform, supports presets and packaging for
Linux Distributions can be made with CPack. This also eliminates
the dependency to build and patch premake. Furthermore a lot of
IDE's are supported.

Add a BuildFlags CMake module with an INTERFACE library encapsulating
relevant build Flags and definitions. To provide support for multi
configuration generators use generator expressions as much as possible.
Add a (currently) empty 0ad-Functions module for later usage.
2026-05-17 18:22:05 +02:00
wowgetoffyourcellphone
9df2dc2585 Temple of Athena Nike by @nifa
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Temple of Athena Nike by @nifa

SpecificName from @Outis and @Thalatta
2026-05-14 13:38:32 +02:00
Vladislav Belov
017aa3b736
Adds splitted shader effects to materials
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-05-10 23:57:27 +02:00
Vladislav Belov
59e36be140
Splits shader effects to reuse in material passes 2026-05-10 23:57:23 +02:00
Vladislav Belov
18a16aa135
Moves all rendering to material passes
Now we should use material passes instead of context and defines to
select a needed shader. It allows us to reduce the number of
shader combinations we use and reduce memory consumption.
2026-05-10 23:57:20 +02:00
Vladislav Belov
aced56c336
Adds material passes to choose different shaders
All shaders were selected by context (set of defines) which increases
the number of needed permutations. For example: we don't need to know
about shadows when rendering silhouettes.
2026-05-10 23:57:16 +02:00
Vladislav Belov
9aee507e28
Adds wireframe techniques for particle and terrain 2026-05-10 23:57:12 +02:00
Vladislav Belov
75bd640bd8
Removes context of terrain shadows and silhouettes
We were unnecessary passing all combinations of our scene shader context
even if we don't need it as for shadows and silhouettes for terrain
rendering. Since we only need to draw a solid color.
2026-05-10 23:56:57 +02:00
Vladislav Belov
58d3527130 Adds profile table for renderer backend statistics
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
2026-05-10 19:26:16 +02:00
Vladislav Belov
2e87f6b5aa Adds renderer backend-specific statistics
Different backend have different metrics to watch and debug. So we need
a simple way to collect that.
2026-05-10 19:26:16 +02:00
phosit
3549cc1e6c
Remove the hint that ai-rejoin isn't supported 2026-05-10 14:18:52 +02:00
phosit
b3552ebccb
Clone the position in attackPlan 2026-05-10 14:18:52 +02:00
phosit
e2466e9bd5
Consistently sort the ai-queues
When the returned value of the compare function is `0` the order is
preserved. Before the sort, the order between joining clients and
non-joining clients differ.
Additionally sorting by name should make the order consintent.
2026-05-10 14:18:51 +02:00
phosit
6d31e6de89
Serialize the isIdleConfirmed for the AI
The AI only noticed for changes to `isIdleConfirmed`. That is done to
avoid recursions and don't send to many messages. But when the AI is
deserialized it get's `isIdle` from the simulation. Leading to an OOS.
2026-05-10 14:18:51 +02:00
phosit
be03605eac
Update unitCollection in attackPlan 2026-05-10 14:18:51 +02:00
phosit
86289a89fd
Clone the bonuses
Sometimes the same object was serialized.
2026-05-10 14:18:51 +02:00
phosit
53a67e560f
Sort templateModifications after inserting
The insertion order might not be consistent when clients join.
2026-05-10 14:18:51 +02:00
phosit
b572fed672
Consistently sort the build order
When the returned value of the compare function is `0` the order is
preserved. Before the sort, the order between joining clients and
non-joining clients differ.
Now everything important (which is used later on) is included in the
comparison. If still `0` is returned it's not importent which element is
taken.

Another solution would be to have one array per category.
2026-05-10 14:18:51 +02:00
phosit
c4dd0040ee
Never serialize an event when it's not owned 2026-05-10 14:18:51 +02:00
phosit
2f86d4a2f8
Don't write entity-metadata when deserializing
The metadata where written every the turn of deserialization. When on
the non rejoining client it was only written when that AI makes a turn
and handles the events.
2026-05-10 14:18:51 +02:00
phosit
55f2d356ff
Clone targetPos in attackPlan
On a rejoined client the data isn't the same anymore. But it's equal.
Likely this is because the data isn't aquired at the same turn.

This could also be solved more generally by copying all data which is
pushed to the AI. Or by using the same serializer for AI as for the rest
of the simulation.
2026-05-10 14:18:51 +02:00
phosit
3ddf101a06
Inform the AI about builders when initializing
This wasn't a problem since there are no builders on a fresh match but
now when deserializing there might be builders.
2026-05-10 14:18:50 +02:00
phosit
9aea56e4a2
Also serialize unitCollUpdateArray in AttackPlan
It needs to be serialized so it's known which units to update next.
2026-05-10 14:18:50 +02:00
phosit
f35595610a
Sort entitycollections when adding entities
On joining clients entitycollections are always sorted. To stay in sync
non-joining clients also have to sort entitycollections.
2026-05-10 14:18:50 +02:00
phosit
130ea06ce8
Don't add queues when deserializing AttackPlans
When deserializing the queues are already there. It was an error to try
to add a queue since sometimes there must not be a queue.
2026-05-10 14:18:50 +02:00
phosit
cca2cfe05c
Don't updateTerritories when deserializing
Clients which didn't late-join only get a change to `uptadeTerritories`
when the ai playes a turn. When joining clients do it at the turn when
they deserialize the ai they might be ahead of the others. That would
lead to an out of sync.
2026-05-10 14:18:50 +02:00
phosit
e9339591c2
Reset turnCach at the begin of the turn 2026-05-10 14:18:50 +02:00
phosit
911285e625
Always update territories 2026-05-10 14:18:50 +02:00
phosit
4b516b336e
Get the UnitAI order data directly
The cached data wasn't always up to date. I coudn't figure out when to
update it.
2026-05-10 14:18:50 +02:00
phosit
3afdf64eee
Update territories when a construction is finished
Constructions can change the territories. So they should be updated.
2026-05-10 14:18:50 +02:00
phosit
f5e926f6fe
Remove remanents of entityObj
All uses have been removed.
2026-05-10 14:18:49 +02:00
phosit
b6243966f3
Remove usage of entityObj from Destroy event
`entityObj` is not available on clients which just have rejoined. As not
all clients have access to it the data shouldn't be used for anything
elaborate.
2026-05-10 14:18:49 +02:00
phosit
0a2294171e
Remove usage of entityObj in VictoryManager
This is done by remembering the ID of the assigned healers and guards.
2026-05-10 14:18:49 +02:00
phosit
b59d2c91e3
Remove usage of entityObj in TradeManager
Now `source` and `target` are only entityID. So that we can check
whethero one of them got destroied.
Additionaly it's much simpler to serialize.
2026-05-10 14:18:49 +02:00
phosit
d18a6392b3
Reduce usage of entityObj in SharedScript
The information where a unit is and which resource it provides wasn't
available on joining clients. Now the `resourceMap` is reset when a
resource is destroide.

It would be performance intensive when the `resourceMap` would be reset
when any unit would be destroied. To prevent this the `SharedScript`
remembers which entities are resourcesources.
2026-05-10 14:18:49 +02:00
phosit
8d7de7fde7
Remove usage of entityObj in BuildManager
When destroying a builder it might not be known anymore what it was able
to build. Now the entityIDs of the builder is stores. So that it can
easily be looked up and removed.
2026-05-10 14:18:49 +02:00
phosit
4f6b01ccb8
Reduce usage of entityObj in BasesManager
Some functions in the `BaseManager` expect a complete entity but only
the ID is used. When an entity is destroied the entity isn't available
anymore.
2026-05-10 14:18:49 +02:00
phosit
7b50e32b28
Always delete metadata when destroying entities
On newly deserialized clients there is no property for the destroied
entities. Because of that the metadata of the entity wasn't remembered
in the event and wasn't destroied.
2026-05-10 14:18:49 +02:00
phosit
08340ca18a
Call GetFullRepresentation only internally
`GetFullRepresentation` doesn't reset `this.changes` to `null`. So when
a message arrives the ai-interface will not be informed.
The ai-interface calls `GetFullRepresentation` and removed the dirty
flag from the ai interface.

This two behaviors lead to the error that the ai never receives messages
from entities which exist at game start.
2026-05-10 14:18:49 +02:00
phosit
f81cf7e602
Clear changedEntities on initialization
When initialized all entities get queried. But the set of entities to
query wasn't cleard. This lead to an OOS.
2026-05-10 14:18:48 +02:00
phosit
e07b4df6ba
Serialize dropsiteSupplies
The assignement has to be done for new dropsite but must not always be
done as it sends a command.

Serialized data shouldn't be too complicated. Because of that the `ent`
property is removed.
2026-05-10 14:18:48 +02:00
phosit
6facc9ee17
Fix AI OOS on rejoin related to random calls
Based on a diff from @Silier: https://code.wildfiregames.com/D2573
2026-05-10 14:18:48 +02:00
phosit
8151e18d51
Enable the ai to be tested with -serializationtest 2026-05-10 14:18:48 +02:00
phosit
c042b3ca2c
Start the serializationtest at a specivic turn
This enables to only test critical game sections.
2026-05-10 14:18:48 +02:00
vyordan
843f39ba55 Use dynamic budget for progressive load timeout
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
The progressive load timeout was hardcoded to 10ms, causing the CPU
to be mostly idle during map loading. This commit replaces the fixed
value with a dynamic budget derived from the display refresh rate
when VSync is enabled, or from the configured adaptivefps.menu limit
otherwise.

Fixes: #8774
2026-05-07 19:38:31 +02:00
phosit
f38b956eb3
Update code owners
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
2026-05-04 18:47:53 +02:00
Jonny McCullagh
e903506f13 More ai names for the germans
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Fixes: #8408

Forum thread: https://wildfiregames.com/forum/topic/140675-more-ai-names-for-the-germans/
2026-05-02 13:13:01 +01:00
wowgetoffyourcellphone
5268cb62a6 Persians -> Achaemenids
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
Persians -> Achaemenids
Pers -> Achae

Addressing Checkrefs

Internal Achaemenid and Persian references

Reported by @Stan`

Update unit_tables.py
2026-05-02 02:50:39 +02:00
Ralph Sennhauser
6514230330
Allow building without lobby
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Commit 6a8366b99a added additional
libraries to the report but didn't consider gloox be optional. Address
this false assumption allowing to build pyrogenesis without lobby
support.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-05-01 08:20:38 +02:00