Great job and a few comments
Hi Alex,
great job on reviewing the game AI of RTCW. I enjoyed reading the article and recognized many of the events and behaviors you mention.
On two occasions, however, I either fail to understand you or we disagree:
Multiple times over the course of the game, I've witnessed a couple soldiers getting stuck together in a small doorway. They'd just run forward in slow motion, and not get very far at all. This reveals two things:
- The inability of AAS to deal with crowded dynamic environments, where entities that are not enemies. Those that are dangerous can simply be destroyed, and don't really pose a problem!
I don't think it is correct to blame the _path finding_ subsystem for bad AI _path following_ / _steering behavior_ / _obstacle avoidance_. It is not the resulting path that is flawed, it is the AI behavior that does not respond properly to dynamic obstacles that it runs into while travelling the path.
Perhaps it is possible to develop a pathfinding system that takes into account dynamics and tries to avoid collisions. However, in general, a combination of a dedicated pathfinding system that just returns (shortest) paths, and an on-the-fly collision avoidance system together get the job done, and do so very efficiently.
Not only is a deliberative approach not necessary, but I'll also argue it's not any more efficient than a simple reactive behaviour. Finding cover can be done by tracing a few boxes around the current position, and finding which end position is not visible by the threat.
Looking up cover positions from a table is over hundred times more efficient than issueing ray casts (and does not hit on (slow) memory and thrash the cache, as does traversing part of the BSP). Typically finding a good cover spot requires more than a handful of ray casts, because:
- you don't want an AI to act like he's safe while his left arm / knees / ankles are still visibile and exposed;
- you don't want an AI to pick a cover spot which is visible to the attacker when the attacker moves 0.5m to the right or left.
I may be picky about these details, but as said above, I enjoyed this review and look forward to future reviews.
What about Operation Flashpoint (for some AI that is capable of doing believable squad combat on foot, in tanks, fly choppers, all on a 12 x 20 km island)
William
|