Hi guys! I'm working on a first-person RTS game. I've already completed almost everything except for the GUIs. However, I'm currently stuck because I need to figure out how to make an army follow a player. Have you ever played Conquerors Blade? I'd love to implement a similar system but with more advanced features.
The problem I'm facing is that I have no idea how to display the units following the player and add functionalities like "protect the king." For instance, having all long-range units (archers) encircle the player in a perfect formation, and if there are too many archers, they should form multiple circles. After the long-range units, the short-range ones should surround and protect everyone. Do you see what I'm saying?
I've already considered creating numerous patterns like "if the player has 13 archers and 28 guards, execute this pattern." But I think I'll have around six types of units to start with, and if they have 100 soldiers, it's like dealing with 10^9 patterns that I'd have to create manually, which is quite overwhelming.
Do any of you have ideas on how I can approach this? Thanks a lot! <3