ON large screens like 5120x1440 calculated shadow map was 32768. That
was 16x more than high setting, 32x more than medium setting and 64x
more than low setting.
After this change shadow map sizes using very high setting by resolution
will be following:
1920x1080 - 4096
2560x1440 - 4096
3840x1440 - 4096
5120x1440 - 8192
3840x2160 - 4096
7680x4320 - 8192
Patch by: @karmux
Reviewed by: @vladislavbelov, @Stan
Differential Revision: https://code.wildfiregames.com/D4723
This was SVN commit r26983.
192 worked as well but the error spam isn't really nice going above 256
is madness anyway.
Reported by: @Langbart
Fixes: #6578
This was SVN commit r26969.
Follows f8d2927748.
There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we
occasionally need to ignore it when considering line-wrapping, because
we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.
The method introduced here uses the SFeedback structure to properly
report it and generalises the checks.
Note that multiples spaces are not collapsed in 0 A.D., and for
consistency the word-separator-collapsing behaviour is ignored.
Comments by: phosit, vlasdislavbelov
Fixes#6551
Differential Revision: https://code.wildfiregames.com/D4662
This was SVN commit r26915.
- Update GMP to a version that supports arm64 darwin
- Patch spidermonkey 78 to build and run on arm64 darwin
- Choose the correct architecture dynamically in build scripts
- Include python workaround that fixes python related errors on
spidermonkey build
Based on a patch by: kumikumi
Based on a patch by: Langbart
Fixes#6474
Differential Revision: https://code.wildfiregames.com/D4607
This was SVN commit r26881.
Follows 8eecc39e71.
Piping the autostart through a GUI page is easy but requires using the
GUI in non-visual mode, which is problematic since it's not initialized.
The GUI is not needed, only its ability to load scripts, so this diff
fixes the problem by adding an 'entrypoint' script in the new
`autostart` folder that gets called with this unique ability, setting
things up properly. The mod mod gets a placeholder.
Other changes:
- Fix some issues with networked autostart:
- Players were not assigned slots.
- The host didn't actually wait for other players.
- Move gamesettings from `gui/gamesettings/` to `gamesettings/`. This
moves attributes as well.
- Move autostart files from `gui/autostart/` to ` autostart/`. Note that
`gui/autostart/` still exists as it's used in the tutorial button from
the main menu.
- Rename the JSI_VFS functions to be explicitly about their function:
the ability to write and the potential restricted folders.
- Don't require `autostart` when using `--autostart-client` in
non-visual mode.
Starting the autostart client/host has poor UX in some situations, but
improving that feature is beyond the scope of this diff.
Suggestions for future work:
- Some files in gui/common should probably be moved elsewhere
- Template loading code is duplicated
- The gamesetup code still needs work for proper UI/logic separation.
Help & comments by: smiley
Reported by: vladislav / Langbart
Fixes#6513
Differential Revision: https://code.wildfiregames.com/D4628
This was SVN commit r26879.
Follows ea72437739. Fixes it by providing a convenience function in the
component Manager that matches the API in the GUI / AI
Refs #6444
Differential Revision: https://code.wildfiregames.com/D4630
This was SVN commit r26867.
Fixes 5de50c447c
Changing the passability class at runtime breaks some UnitMotion
assumptions in unrecoverable ways and will lead to units getting into
impassable terrain.
Formation controllers can tolerate it since units still check their own
obstruction.
Until some code is added to recover from the above bad case,
de-activated changing passability class for non-formation controllers.
This also fixes serialization issues related to clearance & passability
classes following that diff.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D4629
This was SVN commit r26865.
60befbd1cf added the exact same implementation to the rmgen tool,
469d0fe5c5 removed the rmgen tool along with the original implementation
of noise.
Patch By: smiley
Differential Revision: https://code.wildfiregames.com/D4611
This was SVN commit r26810.
Reduces duplication across components.
Allows to provide specific names and history for formations.
Differential revision: https://code.wildfiregames.com/D4476
Comments by: @bb, @StanFixes#6400
This was SVN commit r26476.
While at it fix the messages.json from ea72437739 (missing excludeMask
and make the keywords objects not arrays)
Comments By: Freagarach
Differential Revision: D4483
This was SVN commit r26422.
- Removed obsolete C++-side `addPlayer`, introduced in 4fed9b8242, moved
out of Atlas in 1c0536bf08, unused after 9ee44bd9b8.
- Get the player settings from a local function (avoids passing
arguments).
- Removed setting the standard diplomacy (done in cmpPlayerManager since
132020f88e).
- Create entity when adding a player instead of creating it and
instructing the playermanager to add it.
- Changed/Removed some comments.
Differential revision: https://code.wildfiregames.com/D4482
Comments by: @Stan
This was SVN commit r26404.
- Add support for mul_round
- Correct table
- BUGFIX: correct roster table via the mixin Civ fix
- avoid long lines for PEP8 compliance
- for mod development outside .svn repo, create symlink
- replace all TAB indents to 4 spaces for PEP8
- TAB to 4 spaces to be PEP8 compliant
- refactor complex inline logic to compute and formatting
- beautify and avoid long lines to be PEP8 compliant
- beautify and simplify JS table format code
- Using more accessible color scheme
- Better color scheme
- main analysis file
- Rename the new version back to keep consistancy
- dependency JS library
- Unit analysis result
- Rewrite specilized table logic to only show changed
- Prefer numeric flag over string flag to refactor
- Re-format HTML templates into readable source code
- Civ specific table now renders non-empty
- Update computeCivTemplate to parse A25 template dir
- Cleanup debugging flags
- Update copyright notice to 2022
- Explain how the code works for future development
- Initial README
- Refactor: put HTML IO code in a single function
- Refactor: include JavaScript as verbatim str
- Refactor: separate computation from IO
- Refactor: compute templates before HTML IO
- Refactor: compute CivTemplates before HTML IO
- Refactor: compute separate from IO code
- Fixed melee and ranged attack damage parsing
- Fixed Resistance parsing
- Implement the undefined function complain
- Rename Armour -> Resistance
- Simplify NumericStatProcess logic
Patch by: @hyiltiz
Differential Revision: https://code.wildfiregames.com/D4445
This was SVN commit r26403.
- Add support for tips
- Fix other scripts not writing to the correct output (they were writing
info messages to stderr)
Based on a patch by: @mammadori and @cyrille
Differential Revision: https://code.wildfiregames.com/D3213
This was SVN commit r26350.
Since the players/civs already have cmpIdentity, use it.
This forces civs to have corresponding XML in the `special/players/`
folder.
Also moves the files from `special/player/` to `special/players/`
consistent with other folders. And moves the generic `player.xml` one
level up.
Differential revision: https://code.wildfiregames.com/D4473
Help and comments by: @Stan, @wraitii
This was SVN commit r26298.
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.
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.
Users sometimes ended up with bad (wrong version) XMB files in the user
mod. This resulted in A25 loading a black screen.
There is a combination of unfortunate code paths that lead to this. The
core issue is that:
- cdd75deafb changed the XMB loading code that if there is an error in
Init from a cached XMB, it reports an error. This error happens to be
silent, because the GUI expects CXeromyces to do its own error reporting
(a pretty poor decision, all in all, but whatever). This explained why
the black screen showed no errors.
- The code flow attemps to load an 'archive' XMB first, then only a
loose cache. _But_ if the XMB that fails to load is an archive (which
generally never happens except when using incompatible mods, which is
generally less easy in A25 since we added code to stop that), then the
game will try to recreate the XMB as an 'archived' path, not a 'loose
cache' path as it would usually do.
- Because the 'archived' path already exists in the VFS, the game will
attempt to overwrite that. It so happens that in non-dev copies, this
writes to the user mod.
- Because the user-mod is always loaded, this was unexpected for users.
Fixing this is rather simple: the game should never attempt to write
'archive' XMBs in that function. Added explicit barrier, which shouldn't
matter performance-wise but fixes the issue by writing in the proper
place, and also properly recovering in case of read failure.
I will note that the game will still try to load the archived file, and
recreate it every time, but I don't think that's a particularly big
deal, in general having engine-incompatible mods in the future should be
harder because of A25 changes there.
(NB: users that have used both A24 and A25 should perhaps still be
advised to check their user mod folder, otherwise they'll end up
recreating those files forever).
Reported by: dave_k
Fixes#6320
Differential Revision: https://code.wildfiregames.com/D4275
This was SVN commit r26272.
The UnitManager already lists all units, so we do not need to go through
the visual actor of entities to update them. This is faster and
decouples simulation & graphics code slightly.
Further, the simulation does not need to know about texture changes (see
also 410d2e883a), so remove those calls in Atlas.
Differential Revision: https://code.wildfiregames.com/D4455
This was SVN commit r26270.
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.
There is no need to have BuildAnimation in CModel when everything is
done in CObjectEntry anyways.
This removes a pointer in every CModel object, which is nice.
Accepted By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4454
This was SVN commit r26254.
RENDERDATA_UPDATE_COLOR was used to precompute lightEnv-dependent data
on the CPU. This is no longer done following engine upgrades, and in
particular d7d02a4740 which explictly always did this on the GPU.
ModelAbstract had a 'SetDirtyRec' hack for it because of decals, which
can also be removed. The 'dirty' bit of CRenderableObject is renderdata
for the specific item, never its props, so it never actually needs to be
recursive.
CheckLightEnv is also useless as a result, and removed.
Differential Revision: https://code.wildfiregames.com/D4453
This was SVN commit r26249.
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.
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.