collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
872 stars 99 forks source link

JPS path finder optimizations #65

Open collinsmith opened 4 years ago

collinsmith commented 4 years ago

I've implemented a JPS path finder, but my short tests show it isn't performing nearly as well as I expected -- actually noticeably worse than my A*. I think this is because of how the jumps are generating/looking up nodes. Perhaps some kind of intermediate Point2 implementation may be necessary in order to avoid calling MapGraph#getOrCreate(int,int) (thus avoiding the cost of generating those graph nodes until they are actually resolved by the algorithm).

Originally posted by @collinsmith in https://github.com/collinsmith/riiablo/issues/63#issuecomment-557847514