A* Path finding algorithm running extremely slow [duplicate]
问题 This question already has an answer here : Implement A star (A*) path algorithm in large map, low performance (1 answer) Closed 3 years ago . I am currently working on my first game for android, and my first time creating an a* path finding algorithm. It is a 2d game. I have created one enemy containing this algorithm (ie. It is being ran once every frame) and it slows down performance from 60fps to 1-2 fps. Obviously something is horribly wrong, I have tried looking online for solutions but