Skip to main content
2 of 4
Cleanup
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

Maintaining unit formation while following path

I'm currently working on a 2D Age of Empires style RTS game. I'm using Pyglet, a framework for Python. I know that Python is not at all the best programming language to create video games, still I'm fine with it and I know the limits.

Here's my problem:

I'm currently using the A* algorithm (via Path finding package) to move my units.

When you select a "group" of units and set a destination, all units inside of the battalion will follow an A* path and go to the destination. Here's a video of what it looks like.

I want that the group of units stays solid; I want that the whole group stays united and follows the path without the individual units separating.