It's a graph algorithm to path selection, here is a good explanation https://www.redblobgames.com/pathfinding/a-star/implementation.html
I always do the movement in one of two ways:
- As I use Godot, if I have a non movement frenetic use case I use navigation agent 2d/3D.
- If I am using another engine or don't feel like using nav agents, I use the scent chasing. Where I put "scents" with position data every certain time to the chaser object, so they follow these points.
- I create a preconfigured grid with many position components, then I apply A* over this grid. I used this when I was trying to create a clone of hotline miami, the game was a failure xD but the algorithm worked hehe.
Most of the trending engines already have implementation of this algorithm, so you don't have to reimplement it again and again.