A* pathfinding
I got A* pathfinding working in Shape RTS.
C++ / RAYLIBSHAPE RTS / IN DEVELOPMENT
Before this, units would try to go straight to the place I clicked, even if something was in the way. Now I use a grid and A* to find a path around blocked cells.
The search checks nearby cells and keeps the cheaper route when it finds one. Units can move diagonally, but they can't cut through the corner of an obstacle. Once it reaches the destination, I turn the path into points the unit can follow.
It works now. I still want to see how it feels when a lot of units are moving at once.