0ad/source/simulation2/helpers
wraitii 0ebc08b13c Thread the pathfinder computations using the task manager.
The pathfinder computations are run asynchronously (and potentially on
the main thread) in-between simulation turns, thus reducing
pathfinder-related lag considerably in common cases.

To make this most efficient, the number of paths computed during a turn
via MaxSameTurnMoves is reduced from 64 to 20.

This has a hard dependency on the obstruction manager (via the vertex
pathfinder) not being modified in-between simulation turn (or to put it
more generally on the simulation state not changing outside of turn
computation), otherwise results will be non-deterministic and go OOS.
This is currently entirely safe (as in, it indeed does not happen that
the simulation state changes in-between turn), but future work towards
improving simulation sandboxing would be good.

Thanks to Kuba386 for maintaining & improving the patch in 2020
Thanks to everyone who tested the various iterations of this patch.

Fixes #4324

Differential Revision: https://code.wildfiregames.com/D14
This was SVN commit r25657.
2021-06-03 16:21:28 +00:00
..
CinemaPath.cpp Move CinemaPath class to the simulation helper directory, because it contains predominantly simulation data that is already serialized. 2017-04-14 23:20:49 +00:00
CinemaPath.h Move CinemaPath class to the simulation helper directory, because it contains predominantly simulation data that is already serialized. 2017-04-14 23:20:49 +00:00
Geometry.cpp Avoid overflow in UnitMotion. 2020-11-09 13:25:50 +00:00
Geometry.h Implements correct distance to edges for the building snapping feature. 2020-08-17 20:13:18 +00:00
Grid.h Use templates to replace explicit serialization helpers. 2020-12-19 09:10:37 +00:00
HierarchicalPathfinder.cpp Replaces UNICODE characters in the code by consistent ASCII characters. 2021-01-15 10:07:36 +00:00
HierarchicalPathfinder.h Further reduce usage of TERRAIN_TILE_SIZE in non-terrain components 2021-05-02 17:40:00 +00:00
LongPathfinder.cpp Adds std namespace to shared_ptr usages in scriptinterface and simulation. 2021-05-22 19:30:18 +00:00
LongPathfinder.h Adds std namespace to shared_ptr usages in scriptinterface and simulation. 2021-05-22 19:30:18 +00:00
Los.h Decouple LOS resolution from terrain resolution 2021-03-02 16:44:40 +00:00
MapEdgeTiles.h Unify the magic number indicating the number of impassable tiles at the map edge redundant in the Pathfinder, RangeManager and MapGenerator. 2019-07-12 16:38:51 +00:00
Pathfinding.cpp ParamNode: switch to utf8, ToXML -> ToXMLString, test tweak, PCH tweak 2021-04-11 09:23:10 +00:00
Pathfinding.h Further reduce usage of TERRAIN_TILE_SIZE in non-terrain components 2021-05-02 17:40:00 +00:00
PathGoal.cpp Consider that the point could be inside the goal area in some PathGoal functions 2018-01-16 02:15:04 +00:00
PathGoal.h Consider that the point could be inside the goal area in some PathGoal functions 2018-01-16 02:15:04 +00:00
Player.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
Position.h Further reduce usage of TERRAIN_TILE_SIZE in non-terrain components 2021-05-02 17:40:00 +00:00
PriorityQueue.h New long-range pathfinder. 2015-06-12 18:58:24 +00:00
Rasterize.cpp Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
Rasterize.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
Render.cpp Fix some warnings. 2021-05-02 15:45:40 +00:00
Render.h Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
Selection.cpp RangeManager: Grid for 2D array, enum cleanups. 2020-06-13 09:05:40 +00:00
Selection.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
SimulationCommand.h Clean up header includes, add new forward declarations. 2020-11-21 11:20:29 +00:00
Spatial.h Use templates to replace explicit serialization helpers. 2020-12-19 09:10:37 +00:00
VertexPathfinder.cpp Make pathfinder debug rendering thread-safe. 2021-05-17 09:38:24 +00:00
VertexPathfinder.h Thread the pathfinder computations using the task manager. 2021-06-03 16:21:28 +00:00