Re: towards a better layout of WalkPath() functions -
21-01-2004
Based on the bots speed and the distance to the next way point, you could calculate how long it should take in the worst case to reach the next point (in time units or frame counts). If the worst case time elapses (assuming there's no battles inbetween, or changes in speed) then you can assume the bot is not succeeding.
Another thing you could do by itself, or in combination with the first method, is calculate the distance from where the current bot position is to the next navpoint position. You could then check to see if the distance is shrinking over time (or over frames) or not. Using this method, you will have the ability to decide if the path is making fast progress, slow progress, negative progress, or zero progress.
Maker of the (mEAn) Bot.Admin Manager
"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
|