Commit Graph

15362 Commits

Author SHA1 Message Date
e3fc39469c Point a number of templates to their new <Icon> portraits.
Improve the look of the Seleucid cavalry actors to match their new
portraits.

This was SVN commit r26292.
2022-02-03 00:36:35 +00:00
30f0c58a0e Improved Portraits. Reviewed by: Stan
Adds consistent backgrounds, colors, lighting, and better camera
orientations (less apparent foreshortening).

This was SVN commit r26291.
2022-02-02 23:42:38 +00:00
643894c16b Disables depth test for minimap effect after a1f98b016b. Fixes #6426
This was SVN commit r26290.
2022-02-02 18:43:23 +00:00
a1f98b016b Moves depth and stencil tests to PipelineState and DeviceCommandContext.
Differential Revision: https://code.wildfiregames.com/D4471
This was SVN commit r26286.
2022-02-01 16:38:55 +00:00
709e8292b0 Moves color mask, depth mask and function management from CShaderPass to DeviceCommandContext.
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4465
This was SVN commit r26284.
2022-01-31 20:10:06 +00:00
99118fc2b7 Add garrison flags and projectile prop points to spart houses.
Refs: https://code.wildfiregames.com/D4221, #4581
- Fix naming of files.
- Improve AO
- Disable parallax on nature.

This was SVN commit r26279.
2022-01-30 23:17:41 +00:00
cfa567f24d Remove temperate_dead_forest actor from maps, as we have to no way to remove actors when placing buildings.
Patch by: @Langbart
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4464
This was SVN commit r26278.
2022-01-30 21:44:26 +00:00
3f73495653 Bring Walruss and Muskox back to the arctic biome.
Patch by: @marder
Accepted by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4266
This was SVN commit r26277.
2022-01-30 21:38:05 +00:00
0e403632cf Allow giving different weights to different templates when pushing.
This makes it possible to make units heavier, which both push more & get
pushed less by other units.
In particular, the diff does it for siege units & elephants.

This improves movement for these units in crowd situation, since they
will now basically not move when other regular units push into them.

Supported By: asterix, marder
Refs #6127

Differential Revision: https://code.wildfiregames.com/D4452
This was SVN commit r26275.
2022-01-30 14:22:27 +00:00
4df03ed2d2 Run the AI in the same Compartment as the simulation. Let the AI access Sim data.
This is a paradigm change for AI computation.
Historically, the AI was intended to be run in a separate thread from
the simulation. The idea was that slow AI wouldn't stop the renderer
from being smooth.

In that original design, the AI received a copy of the game world and
used that to run its logic. This meant the simulation could safely do
whatever it wanted in the meantime. This copy was done via AIProxy &
AIInterface.

This design ended up having significant flaws:
- The copying impacts the simulation negatively, particularly because
AIProxy subscribes to a lot of messages (sometimes sent exclusively to
it). This time cannot be threaded, and impacts MP games without AIs.
- Copying the data is increasingly difficult. Modifiers are a headache,
LOS is not implemented. Lots of logic is duplicated.

The intended benefits of the design also failed to realise somewhat:
- The AI was never threaded, and in fact, it is probably better to try
and thread Sim + AI from the renderer than just the AI, at which point
threading the AI specifically brings little benefit.

The new design is much simpler and straighforward, but this has some
side-effects:
- The AI can now change the simulation. This can be used for cheating,
or possibly for a tutorial AI.
- The AI runs in the same GC zone as the simulation, which may lead to
more frequent Sim GCs (but overall we might expect a reduction in
temporary objects).
- The AI state was essentially cached, so replacing some functions with
Engine.QueryInterface might be slower. The tradeoff should be balanced
by lower AIProxy computation times.

Future work:
- Threading some specific AI tasks could still be worthwhile, but should
be done in specific worker threads, allowed to run over several turns if
needed.

Technical note: the AI 'global' is in its own Realm, which means name
collisions with the same are not possible.

Other notes:
- The RL Interface uses the AI Interface and thus will gradually lose
some data there. Given that the RL Interface can now request data
however, this should be dine.

Refs #5962, #2370

Differential Revision: https://code.wildfiregames.com/D3769
This was SVN commit r26274.
2022-01-30 13:33:34 +00:00
410d2e883a Remove leftover terrain-based movement cost code.
6581796103 removed the ability for terrain to affect movement speed. The
JPS pathfinder cannot support it, and the approach was poor anyways,
coupling rendering data with simulation data.
This lets us remove the dependency on CTerrainTextureManager everywhere.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D4459
This was SVN commit r26269.
2022-01-29 08:22:28 +00:00
1d7eb7492e Make Palisades all use the same portrait. Remove now unused portrait.
Patch by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4462
This was SVN commit r26267.
2022-01-28 16:50:13 +00:00
144234cd05 Remove alpha from two spec textures.
Make trans_mask.png be RGBA instead of a two channel texture (Grayscale
+ Alpha)

This was SVN commit r26266.
2022-01-28 14:34:31 +00:00
wackyserious
01c5facdd5 1.) Added actor files for the Ptolemaic Skirmisher Cavalry (Mercenary Tarantine Settler)
Discussion:
https://wildfiregames.com/forum/topic/27046-task-ptolemaic-tarantine-cavalry-mercenary-tarantine-settler/

2.) partial naming convention edit for the Ptolemies.

This was SVN commit r26262.
2022-01-28 01:32:16 +00:00
1365585372 Unit pushing: lower static extension following 158cf8ea8d
The new values in 158cf8ea8d were too high, units would push each other
too much when building. This lower value should fix that, though further
adjustements may be necessary.

Reported by: Freagarach.
Differential Revision: https://code.wildfiregames.com/D4461
This was SVN commit r26261.
2022-01-27 17:34:37 +00:00
d4d1bc039f Moves culling mode and front face state management to DeviceCommandContext.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4456
This was SVN commit r26259.
2022-01-27 17:25:37 +00:00
wackyserious
299cb3d34b Improve Persian Cavalry back lamellar/scale prop
This was SVN commit r26258.
2022-01-27 05:07:48 +00:00
wackyserious
599e2fc605 Gallic unit texture variant reduction
This was SVN commit r26256.
2022-01-27 02:12:41 +00:00
wackyserious
547fc96450 Assign newer textures to Macedonian Champion Crossbowman.
This was SVN commit r26255.
2022-01-27 01:17:13 +00:00
wackyserious
fe816ecb1a Iberian Units Major Update
Discussion:
https://wildfiregames.com/forum/topic/27446-committed-iberian-unit-textures/page/7/#comment-475940

Historical accuracy comments and review by: Genava55, TKgokumelos,
UltimateAurelian, wowgetoffyourcellphone

This was SVN commit r26253.
2022-01-26 10:41:50 +00:00
73f741d266 Handle researching technologies in the TechnologyManager.
Moves the work done from cmpResearcher to cmpTechnologyManager.
No functional changes.

It allows fancy stuff in the future (#6364).

Differential revision: https://code.wildfiregames.com/D4438
This was SVN commit r26252.
2022-01-26 07:42:36 +00:00
588e6b0103 Fix anim sync by using another horse
Fixes
https://wildfiregames.com/forum/topic/67680-double-horse-tail/#comment-473779

This was SVN commit r26246.
2022-01-24 22:17:25 +00:00
158cf8ea8d UnitMotion pushing improvements
The main change is the introduction of a 'pushing pressure' counter on
units. This counter increases when units get pushed around, and
decreases over time. In essence, units under high pressure move slower &
are harder to push around.
The major effect is that units can now get bogged down when very dense
groups start colliding. This makes movement more realistic, makes unit
movement more 'chokepointy', and generally improves the mathematical
soundness of the system (lower values are easier to handle for our 200ms
turns).

Other changes:
- The logic to detect units crossing each other's path has been
reworked. Units that run towards each other should not more obviously
avoid each other.
- New parameters: 'Spread' is a measure of how strong the pushing effect
is based on distance. With the current settings, static-pushing is
rather 'on/off', whereas moving-pushing is more gradual (and thus the
max influence distance was increased when moving).
- Default values have been tweaked for lower overlap.
- Units only looked at other units within their grid region. This led to
overlap near grid-borders. Units now look at neighboring grid elements,
which largely removes this issue. While this may be slower, the
performance of pushing was largely negligible before, so it is unlikely
to become a main cause of lag (and overlap was generally disliked by
players).
- Units no longer orient in the direction of pushing, but instead keep
facing their target. This can look slightly odd under very heavy pushing
forces, but vastly improves behaviour of very slow units such as rams
(since they spend much less time turning around). As a side-effect,
clean up angle code following acc780bcbb .

Engine changes:
- Add a debug rendering mode at compile-time to help understand what is
happening.
- Make it possible to constexpr initialise fractional fixed numbers by
using FromFraction

The 'pressure' change was inspired by alre's suggestion at
https://wildfiregames.com/forum/topic/56436-for-a-better-unit-movement/#comment-461987

Refs #6127

Differential Revision: https://code.wildfiregames.com/D4439
This was SVN commit r26245.
2022-01-24 15:36:13 +00:00
026a7b1699 Fix AI counting exhausted resources in its dropsite list
dropsiteSupplies kept a list of resources and did not remove exhausted
resources, leading to possibly buggy resource-management in the AI code
(and needless computations).

Differential Revision: https://code.wildfiregames.com/D4442
This was SVN commit r26244.
2022-01-24 15:20:56 +00:00
647db0e2ee Remove usages of “fancy” grass from shaders.
Discussed with: @vladislavbelov

This was SVN commit r26243.
2022-01-24 15:14:33 +00:00
c41447360c Remove usages of “fancy” grass from terrains.
Discussed with: @vladislavbelov

This was SVN commit r26242.
2022-01-24 15:13:59 +00:00
351d1d2b9a Remove usages of “fancy” grass from maps.
Discussed with: @vladislavbelov

This was SVN commit r26241.
2022-01-24 15:13:10 +00:00
f787089588 Ceil the resource costs for insufficient resources.
A controversial change (refs. #3818, #4099,
https://code.wildfiregames.com/D1438), but good to have in some form.

Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4332
This was SVN commit r26236.
2022-01-23 07:41:45 +00:00
8926f5a94c Move the allowed formations from cmpIdentity to cmpUnitAI.
One needs UnitAI to be able to use a formation, so include the spec
therein (to keep information close to where it is used).
Modders can change their templates with the following script:
https://code.wildfiregames.com/P261.

Differential revision: https://code.wildfiregames.com/D4443
Comments by: @Stan
Idea accepted by: @wraitii
Fixes: #6399

This was SVN commit r26235.
2022-01-23 07:23:44 +00:00
f8d64a5f2c Fix Catafalque page not showing the Macedonian metal trickle.
The ResourceTrickle component has been changed to a global aura instead.
It increases the trickle slightly, but catafalques are unbalanced
anyway.

Patch by: @Grapjas
Differential revision: https://code.wildfiregames.com/D4383
Refs. #6032 by fixing the Macedonian specific case, but not showing the
tooltips, as requested.

This was SVN commit r26234.
2022-01-23 07:14:45 +00:00
5adbe4f1a3 Moves blend state management to DeviceCommandContext. Fixes #6420
Tested By: Langbart
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D4441
This was SVN commit r26228.
2022-01-19 17:28:47 +00:00
f66ca01603 Deselect only part of a formation when clicking the unit icon.
As requested by @wowgetoffyourcellphone to be more in line with
afc77e20a4.

Differential revision: https://code.wildfiregames.com/D4433
Tested by: @astrix, @wowgetoffyourcellphone
This was SVN commit r26221.
2022-01-15 13:44:43 +00:00
0005976b2b Fix selecting multiple entities and training.
Fixes a visual bug where selecting a trainer and a non-trainer counted
as two.

Introduced in 0c4f59d0a7
Reported by Purgator_ on the forums:
https://wildfiregames.com/forum/topic/67583-[[SVN:26182]]-ui-logic-bug.
Differential revision: https://code.wildfiregames.com/D4432
Tested by: @Langbart
Fixes: #6415

This was SVN commit r26220.
2022-01-15 13:42:15 +00:00
971b734873 Moves hardcoded blend state in debug overlay and water to their techniques.
This was SVN commit r26218.
2022-01-14 18:44:40 +00:00
fc223e3540 Moves hardcoded blend state in ParticleRenderer to the transparent particles technique.
This was SVN commit r26217.
2022-01-14 18:18:28 +00:00
829e37371b Moves hardcoded blend state in CCanvas2D to its technique.
This was SVN commit r26216.
2022-01-14 17:44:42 +00:00
5cbd46de94 Removes deprecated GL alpha test.
In GL3.0 alpha test mode was deprecated and removed in GL3.3. We should
use discard/kill in shaders instead.
In shaders alpha test was removed in d3a24c26ba, in FFP it was removed
with FFP in b7e6811ea6.

Differential Revision: https://code.wildfiregames.com/D4434
This was SVN commit r26211.
2022-01-13 17:50:28 +00:00
fb0a311cc7 Fix a change from c6b53e1677 to a wrong alpha material.
Discussed with: @vladislavbelov

This was SVN commit r26210.
2022-01-13 15:32:28 +00:00
1ef475ed98 Add an ARB equivalent for los_interp.
Accepted by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4420
This was SVN commit r26209.
2022-01-13 15:12:28 +00:00
a2ab6b9b72 Allow to cap FPS up to the current max refresh rates of gaming screens: 360Hz
Patch by: @OptimusShepard
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4366
This was SVN commit r26207.
2022-01-13 14:30:23 +00:00
6d14932d98 Convert 16-bit grayscale textures to 8 bit textures. It makes little difference for us.
Discussed with: @sera, @vladislavbelov

This was SVN commit r26204.
2022-01-12 15:21:53 +00:00
336b909c8e Convert 16-bit 16-bit/color RGB(A) textures to 8 bit textures. It makes little difference for us, and it wastes GPU memory.
Remove alpha channel for spec maps and convert an indexed color png to
rgb.

Discussed with: @sera, @vladislavbelov

This was SVN commit r26203.
2022-01-12 14:51:12 +00:00
794fa82efb Warn when finding an entity with Reasearcher/Trainer but without ProductionQueue.
As requested by @Silier and @Stan.
Following 0c4f59d0a7.

Differential revision: https://code.wildfiregames.com/D4404
Comments by: @Silier, @smiley, @Stan
This was SVN commit r26200.
2022-01-11 06:34:07 +00:00
98d213a9cd Fix modifications to unspecified techCostMultipliers.
8d80a2186e removed the values for the tech cost multipliers from the
templates, since the component uses those default values, but failed to
account for modifications thereof.
Those weren't applied since the template value didn't exist.

This changes that to iterating over all resources.

Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4409
Tested by: @Langbart
Fixes: #6408

This was SVN commit r26192.
2022-01-09 06:32:30 +00:00
07c0d95467 Write a GLSL equivalent for overlay_solid.
Fixes #6403
Patch by: z0rg
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4406
This was SVN commit r26168.
2022-01-04 21:14:41 +00:00
Angen
f6d2961a81 Fix bug where scenario map was not loading as revealed when set to revealed.
Introduced in dd90dbf8b5.

Differential revision: D4305
Fixes: #6356
Patch by: @Jammyjamjamman
Comments by: @Stan, @andy5995, @vladislavbelov, @Langbart, @Freagarach
Tested by: @Freagarach, @Langbart
This was SVN commit r26151.
2022-01-01 18:15:59 +00:00
7b8c66ec9f Adds config settings for borderless fullscreen and window modes.
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4106
This was SVN commit r26148.
2021-12-31 12:05:48 +00:00
Angen
70bd982c85 Fix OnOwnershipChanged missing in ResourceTrickle
This was SVN commit r26135.
2021-12-28 10:03:49 +00:00
Angen
e552f1280e Fix certain modifiers not being cleared corectly from cache
Issue noticed by Exodarion.

After researching technology for resourcetrickle modifiers were
returning old cached value because modifiers were not cleared for
structure when it was build and changed owner from invalid_owner to the
player so old values were kept.

Cause:
global cache depends on originalvalue.
Health and other modifiers use also player-wide modifiers and result
from that is used as the key, what means global cache is never used
because originalvalue will differ in that case.
That does not look to be case for resourcetrickle and possibly for
another scenarios.
Modifiers that get cached on init and do not get changed by player-wide
modifiers in combination with ownership being changed afterwards will
bug.
Since we dont reset cache for ownership going from invalid_player, the
old global cache is kept and used.

Another solution would be to not cache on init, but thats workaround to
hide the issue.

Differential revision: D4395
This was SVN commit r26134.
2021-12-28 10:01:36 +00:00
2c33c28a09 Add the ability to do simple (de)serialisation cycle in the JS unit tests. (And change the PQ, Trainer and Researcher serialisation.)
To catch e.g. typos.

- Use the same structure in the ProductionQueue item (de)serialisation
as in Trainer and Researcher.
- Also iterate over the serialisable attributes on deserialize, as
proposed by @elexis (on IRC), for its symmetry.

Proposed by: @Stan
Differential revision: D4388
This was SVN commit r26133.
2021-12-28 08:23:59 +00:00