Hm, this board doesn't seem as active as it was at botman's forums. Or maybe it's because I just didn't check it as often then. Anyway, this isn't so much a problem as it is a question of opinion.
My bot, Grave Bot, is capable of using the longjump. Currently bots will use it in combat to do quick jumps behind the enemy, making them very difficult to keep track of. However, I also have been tinkering with the bots using the longjump for quicker navigation around levels.
The simplist method is: if distance to current waypoint < distance longjump jumps, do long jump. That however isn't very practical. I've found that with normal gravity (sv_gravity 800), a longjump will take a player about 540 units if they run, start a longjump, then take all hands off keyboard/mouse. That's a pretty far distance, especially when compared to the average distance between waypoints, which is maybe around 200 units. So, my above equation doesn't become useful if the distance between waypoints is 90% (estimate
) of the time less than 540.
Now, here comes my question, what kind of different method would you use? Planting out a seperate longjump waypoint "grid" seems uneconomical, and of course the simple distance check just doesn't cut it. Here's my thoughts: Starting at the current waypoint, loop forward through the waypoints required to get to the goal waypoint performing a few checks. The final waypoint chosen should be within line of sight for the bot, and not closer than 540 units. Example picture:
So, the purple blob, the bot, is at waypoint B. This bot has the longjump, so instead of just using the normal system and getting C as its next waypoint, it loops through C, then D, then E, etc. C through E are going to be too close, F is a candiate, but we don't know until we look farther, G is out of view. So, one waypoint back is F. The bot longjumps to F and then repeats the process.
So, sound like gold to you guys, or is this just dumb?