Update v0.468: A Pathfinding Story
What's more important than good pathfinding in a Real Time Strategy game? It's so important that it's probably the feature we have spent the most hours on throughout the years developing The Fertile Crescent series.
Not only is it important for the game to feel good and be fun to play, but it's also really hard to get right. Oh, and what about the fact that it's even more difficult to make performant!?
For TFC2 (and TFC1), we have implemented 3 different pathfinding systems that depends on the use case , and it works really well for most cases.
However, due to design changes in TFC2, it still didn't quite cut the edge...
Copper for the King: The Problem!
If you've gotten to mission 5: Copper for the King, you might have questioned the enemy attacks, and if you have, it's for a good reason. Let us explain.
In TFC1, enemy groups always find the best path to their destination. Always! They will take the longest detour there is, if there is one, and will never penetrate walls if there is a path, unless they are ranged and spot an enemy within firing distance. Melee units will always take the full detour, unless they can reach a tower connected to the walls. If you go back and play Horde Mode in TFC1, you can make a TD maze!
Improving Pathfinding for TFC2
For TFC2, we wanted enemies to feel smarter sieging your walled village. So among various other tweaks and improvements, we added a wall penetration feature to pathfinding. If the detour was too long, units would instead attempt to penetrate walls. It worked well in theory and during internal testing. However, we had to limit the length of possible detours due to performance issues, and so once we launched into Early Access, players reported AI units getting stuck... behind their own walls! Of course, and this means we had to revert to the old pathfinding until we found a new solution.
The problem with the old solution (TFC1 pathfinding) in Copper for the King is that it kinda renders walls useless. If you make a wall, the enemy always finds a detour around an unwalled area, and so you kept getting surpriced in the area you invested the least in with defensive walls and towers. It's okay for this to happen occassionally, but not for every single attack. It's just bad game design. If you read Steam discussions, we're fairly confident this mission alone has led to some bad reviews.
The Solution?
We have finally come to a solution - a good compromise if you want - while retaining good performance (actually, we did improve performance as well). So we're really excited about that!
The image above is from the Copper for the King mission. Our new solution is that when there is a very, very long detour (blue arrow), we allow wall penetration (orange arrow), whether it's the enemy attacking or even your own units.
The reason is that even if your units technically could find a long detour around, most players would be confused as to why your units move away from the destination. We received reports on when trying to attack units, units would move away... so if the detour is too long, even your own units should try to move through the wall and get blocked. At the same time, the detour required for wall penetration is long enough for AI skirmish units to never get stuck in their own base.
We're keen to hear about your experience with this new update and read what you think. Let us know in the comments section or Steam Discussions!
Change Log 0.468
- Improved high-level pathfinding system that allows for wall penetration (or being blocked to avoid confusion) when shortest detour is deemed too long
- Improved peformance of high-level pathfinding
- Skirmish AI will attack more often late-game despite meeting a large army in their last attack, if they manage to re-train a large army of their own
- Mission 9: late-game attacks from Desert Nomads have slightly lower capped army sizes, and slight increase of time between each attack throughout the mission
- Hardened Troops correctly adds 20% hit points to all units like description said (was 15% by fault)
- Fixed a load save crash that could happen when loading a snapshot of an enemy's watchtower
- Hattic Irrigation +1 soil level also works and gets updated for farms already constructed
This announcement was originally published by Wield Interactive on Steam on Sep 1, 2026.
Open the original on Steam