Project Shinrin

I’m still working on the Dijkstra implementation. In close range I get the desired results, however for the AI it’s not really efficient at the moment…
Yes, it is faster to choose the unit and the tile for the AI(1-2ms) But the algorithm checks all tiles until it has found every enemy unit. So not sure what I do wrong that makes it so slow.
In a way I don’t have that much problem with it as if I were to put the function on another cpu thread I could use something that indicates that the enemy is thinking instead of having a short freeze.

Help would be appreciated as I had hoped I would be further ahead at this point.
Thanks for reading

EDIT: I tried the experimental BP cooker that turns BP’s in c++ and the algorithm ran 2x as fast or faster. So I will definitely rewrite it in C++ if I can. :slight_smile: