RottPhiler
Approved user
- Joined
- Apr 12, 2017
- Messages
- 72
1. Instead of using Euclidean distance to determine the nearest building, use your own algorithm that determines the best path to reach said building to determine the nearest building along that path.
Often times my tanks will be closest (in Euclidean distance) to a tower or mortar behind a wall and will happily roll in front of an anti-tank gun to shoot it. Also, cannons and shooters will determine that a mill is closest (in Euclidean distance) and happily walk in front of a redoubt or tower.
2. Rally: weight your algorithm by wall strength to determine shortest path based on quickest time of travel and breaking necessary wall segments to get there.
You must be doing some form of this already, but currently two things happen - a) multiple units attack multiple wall segments to break through, and b) units go the long way to attack a partially broken wall segment when breaking an intact wall segment closer to the rally point might be quicker, and therefore the shortest path.
Disclaimer: this could break something else though, so extensive testing might be required. It will help if you could recreate the scenarios above.
Often times my tanks will be closest (in Euclidean distance) to a tower or mortar behind a wall and will happily roll in front of an anti-tank gun to shoot it. Also, cannons and shooters will determine that a mill is closest (in Euclidean distance) and happily walk in front of a redoubt or tower.
2. Rally: weight your algorithm by wall strength to determine shortest path based on quickest time of travel and breaking necessary wall segments to get there.
You must be doing some form of this already, but currently two things happen - a) multiple units attack multiple wall segments to break through, and b) units go the long way to attack a partially broken wall segment when breaking an intact wall segment closer to the rally point might be quicker, and therefore the shortest path.
Disclaimer: this could break something else though, so extensive testing might be required. It will help if you could recreate the scenarios above.