The control system for troop formation movement is a critical component in Real-Time Strategy (RTS) games, directly impacting gameplay quality and player experience. However, implementing these systems presents significant challenges, particularly in balancing rigid formation structure with pathfinding efficiency in dynamic environments containing complex obstacles. This study proposes an integrated framework for troop formation movement that synthesizes a virtual "Anchor" navigation paradigm with a "Fluid-Based Formation Position Allocation" algorithm. Unlike traditional leader-follower methods, the proposed system utilizes a virtual anchor to calculate global pathfinding via NavMesh, while constituent agents dynamically adjust their positions relative to this reference point. To mitigate trajectory conflicts during formation changes, the system employs a fluid-dynamics-inspired sorting strategy that deterministically maps agents to target slots using parallel processing. The architecture is optimized for real-time performance using the Unity Job System, allowing for the coordination of large-scale agent aggregates. Experimental validation was conducted through behavioral scenarios—including Tunnel, Split, and Crowd tests and stress tests involving up to 4,096 agents. The results demonstrate that the system successfully maintains formation integrity, executes autonomous regrouping after obstacle traversal, and ensures collision-free movement. Performance analysis indicates that the control logic remains computationally stable at scale, with the primary limitations shifting to graphical rendering overhead rather than algorithmic complexity.
Copyrights © 2026