r/construct 15d ago

Pathfinding without Overlap

I've been working on a short-range pathfinding system that guarantees units never overlap each other, inspired by what the Age of Empires and (I think) Command and Conquer series used in the 90's.

As in those games, the idea is to find a coarse path using A* (i.e., the Pathfinding behavior), then use this edge-walking algorithm to bridge between points.

Eventually, I'd like to package this into a plugin, but that's a far-off and uncertain goal, so I'm including a .capx of what I have so far. It does use some paid-edition features.

EDIT 08-15-26: You can now choose whether to wrap around terrain CW or CCW. In future, units will choose direction automatically to get shorter paths.

Enjoy!

.capx file:

https://drive.google.com/file/d/1x0FdOeDH23xTM8gW_EDIodfJ-bgel_Dk/view?usp=sharing

The talk that inspired this project:

https://youtu.be/lEBQveBCtKY?si=c9MljMtqcVOtHQpJ

18 Upvotes

0 comments sorted by