darkf / darkfo

DarkFO, a post-nuclear RPG remake (of Fallout 2)
Apache License 2.0
136 stars 12 forks source link

Implement our own pathfinding #18

Open darkf opened 8 years ago

darkf commented 8 years ago

We currently use a modified fork of Pathfinding.js (I believe), but it's a bit bloated and generic for our needs.

We can implement our own optimized pathfinding working only on hexes. It may also have an upper bound to limit the distance it may look for each path (FO2 does this).

It will likely use A* pathfinding.

darkf commented 8 years ago

I attempted to do this, but the result came out somehow slower than the exiting solution (fork of PathFinding.js), even though it should have allocated less and used the same binary heap implementation. ¯(ツ)

Seems this will have to be put on the backburner for now. Optimizations could still be made to the existing solution, however, and it may be the best option in the long term.