FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.61k stars 340 forks source link

Optimize A* pathfinder #442

Closed mrDIMAS closed 7 months ago

mrDIMAS commented 1 year ago

Current implementation has few major drawbacks:

1) It mutates vertices of the graph, which makes it impossible to parallelize path finding in a safe manner. 2) It uses quite slow linear search with O(n) complexity to find next vertex with lowest price. This can be improved by using binary tree with O(log n) complexity.