Pathing Solution and Other Ideas for Norb and Team to Think About
Posted: Sat Feb 11, 2012 6:23 am
I was thinking last night (SHOCK!), after Bucktails and myself bounced ideas off each other in the GCM lobby. One issue that came up was the pathing.
In the Civil War, there is no way regiments can march through each other. Men stand elbow to elbow; it is impossible to push your way through. Even with the updated pathing, we can still move troops through each other. Then I said, "Eureka," (and ran down the street naked
). Why not make sprites like buildings? Regiments auto march around buildings (they can't go through them obviously), so although sprites are only 2D, it still should be possible to make them go around. So instead of boxes on the terrain, making sprites unable to move through each other would alleviate the problem. I know that this would require a sight of coding, but I think the team should give it a try. It might even speed up the game because troops no longer need to worry about boxes on the field and such, they auto march around.
Obviously, there are a few requirments. The first is that sprites cannot squeeze inbetween other sprites. Then we don't see men trickle through lines to get in front. At some point, we would also need to have the game engine run a test to see if where the regiment was marching had enough of a gap in between objects to march through, if not, then march around the flank. I am sure there are many other conditions that will be neccessary, but if the gist of the idea from the paragraph above is achieved, the rest should be minor fixes and relatively simple in comparison (athough not simple at all in reality).
Finally, I can think of two other things to be changed in the game. The first is troops firing from behind other troops. This rarely happened in the Civil War. If you were behind another line, you would undoubtedly hit your own troops, unless you were way above them in elevation. So a test on both flanks of the line (regiment) should be performed which asks, is there a regiment in front of me? If yes, the regiment doesn't fire. If no, the regiment fires. Occasionally, it is possible to get two regiments to line up directly on top of each other, but that should be fixed if the pathing is fixed as suggested above. Second, when the AI is in control of a regiment, just have it stop once it reaches the range when it can open fire. Then have the regiment do a check that says, is there a defensive bonus within 25 or so forward yards of my position. If yes, advance to it, if no, halt. Obviously this one is a little trickier, but Bucktails and myself played a game where the AI charged a division into our line, all melee because of the auto melee flag when the enemy regiments would never stop. It happens a fair amount in sp as well, and is rather annoying. You just get giant melee fests.
Those are my ideas, I hope that they are recieved well (especially the first one). Good luck NSD!
In the Civil War, there is no way regiments can march through each other. Men stand elbow to elbow; it is impossible to push your way through. Even with the updated pathing, we can still move troops through each other. Then I said, "Eureka," (and ran down the street naked

Obviously, there are a few requirments. The first is that sprites cannot squeeze inbetween other sprites. Then we don't see men trickle through lines to get in front. At some point, we would also need to have the game engine run a test to see if where the regiment was marching had enough of a gap in between objects to march through, if not, then march around the flank. I am sure there are many other conditions that will be neccessary, but if the gist of the idea from the paragraph above is achieved, the rest should be minor fixes and relatively simple in comparison (athough not simple at all in reality).
Finally, I can think of two other things to be changed in the game. The first is troops firing from behind other troops. This rarely happened in the Civil War. If you were behind another line, you would undoubtedly hit your own troops, unless you were way above them in elevation. So a test on both flanks of the line (regiment) should be performed which asks, is there a regiment in front of me? If yes, the regiment doesn't fire. If no, the regiment fires. Occasionally, it is possible to get two regiments to line up directly on top of each other, but that should be fixed if the pathing is fixed as suggested above. Second, when the AI is in control of a regiment, just have it stop once it reaches the range when it can open fire. Then have the regiment do a check that says, is there a defensive bonus within 25 or so forward yards of my position. If yes, advance to it, if no, halt. Obviously this one is a little trickier, but Bucktails and myself played a game where the AI charged a division into our line, all melee because of the auto melee flag when the enemy regiments would never stop. It happens a fair amount in sp as well, and is rather annoying. You just get giant melee fests.
Those are my ideas, I hope that they are recieved well (especially the first one). Good luck NSD!