Introduced also a small Unit test project to prove it.
- Separated caching capabilities from PathFinder class to increase cohesion and maintainability.
Refactored the pathfinding algorithm by extracting methods based on responsibilities like
calculating costs and reordering functions. These changes should provide a in average a small increase in
pathfinding performance and maintainability.
- Optimized the pathfinder algorithm to reuse calculations like the
MovementCost and heuristics.
- Introduced base classes, IPathSearch and IPriorityQueue interfaces,
and restructured code to ease readability and testability
- Renamed the PathFinder related classes to more appropriate names. Made the
traits rely on the interface IPathfinder instead of concrete PathFinder
implementation.
- Massive performance improvements
- Solved error with harvesters' Heuristic
- Updated the heuristic to ease redability and adjustability. D can be
adjusted to offer best paths by decreasing and more performance by
increasing it
- Refactored the CellLayer<CellInfo> creation in its own Singleton class
- Extracted the graph abstraction onto an IGraph interface, making the
Pathfinder agnostic to the definition of world and terrain. This
abstraction can help in the future to be able to cache graphs for similar
classes and their costs, speeding up the pathfinder and being able to feed
the A* algorithm with different types of graphs like Hierarchical graphs
When not disabled, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is disabled, then the modifying enumerable has one less condition to check inside the loop.
Changes in the shroud are now tracked. If a cell changes it will mark itself and its neighbors as dirty. During the render phase all dirty cells will have their vertices calculated and cached. If a cell is not dirty, the pre-calculated vertices are retrieved from cache. Then the sprite renderer is provided the sprite and the pre-calculated vertices to draw.
This prevents constant recalculation of vertices for the shroud in the render phase, requiring instead only dirty cells in the visible area. The update phase is reduced to a practical noop, instead incurring the cost only of changed cells each frame, rather than checking the visible area.
Improve error handling; fix utility command description
Revert output location to working directory for both map importers
Rework how the map tiles get populated
Remove actor comments