Opened 13 years ago
Last modified 4 years ago
#930 closed enhancement
Incremental update of pathfinder's passability grid — at Initial Version
Reported by: | Sylvain Gadrat | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 19 |
Component: | UI & Simulation | Keywords: | patch pathfinding |
Cc: | Patch: |
Description
When there is changes of the terrain or passability obstructions on the map, the pathfinder has to update a tile based representation of the world. This grid of tiles is needed by the long pathfinder to compute speedily long range paths.
Currently, when the pathfinder need to update its grid, it recompute the full grid instead of taking care only about regions that are modified. It is a little waste of time.
Since the grid is easy to compute there is nothing worrying for now but it can become harmful when we will try to optimize the pathfinder. Optimizations will need to have a way to reprocess only modified tiles because it is basically done by precomputing more than the tile grid.
This ticket is related to some "TODOs" in the simulation code that can be found
- in CCmpPathfinder::HandleMessage()
- in CCmpPathfinder::UpdateGrid()
- in CCmpObstructionManager::Rasterize()