AI Game Programming Planning : Taking Physics in Account

The physics system may well implement things at the lowest level but it’s equally likely that player motion is done without much recourse to the physics system at all. Either way, the job of the AI system is usually to generate a path such that the act of locomotion is simplified, eg. along a sequence of straight unblocked paths. This means the physics of the player’s motion becomes mostly irrelevant for the purposes of making the path. However, if the low level physics or collision handling detects a new obstacle during execution of that plan, it can report that back to the AI system and re-plan the route. (Preferably after trying intermediate recovery strategies, eg. steering around the obstacle.)

To actually plan for the exact detail of what the physics will do would require immense CPU time as you’d really need to simulate every nearby object in the system for many timesteps to predict what would happen. It may actually be practical to do this to extrapolate your current position to anticipate any problems, but it’s not going to be practical to do this for every node of the planning tree.

If on the other hand by ‘physics’ you are really just meaning the acceleration and velocity of the player, then that is trivially calculable in the original pathfinding plan – but then that doesn’t take int