Bupaje,

Sure thing.. Although I wouldn't use the full Intense Ai code for that. I think I'd make a new Sensor action instead and reuse some of the functions that my Agents use for spotting an enemy. I'll think more about that for later versions. It's a nice idea.

So anyway, since I promised updates from now on, here's the first one!

I begun to optimize my code FPS-wise and tried to cut down in some of those costly instructions like c_trace, execute, etc..

First thing I looked in was my collision avoidance algorithm. It worked like this. Every moving agent would cast c_traces ahead of it for every single frame to check for obstacles. If the c_trace was blocked it would cast more c_traces to find out if the obstacle found was 'climbable' or whether it would have to go around it. Not only was that killing the FPS, in some cases it wouldn't work at all! Some Agents kept getting stuck to each other. So I scratched it and worked on a new approach!

It works with Repulsion vectors considering all the Dynamic entities which are close to the Bot. Every nearby obstacle casts its repulsion vector towards the agent, whith a magnitude relative to the distance between the obstacle and the Agent. All Repulsion vectors are then summed up and added to the direction vector which comes up with the Desired velocity. The velocity vector is then converted to a Gstudio angle and makes for the new direction of the agent.



Blue: Vector Pointing to Destination
Yellow: Repulsion Vector
Red: Repulsion Vectors Sum
Green: New Direction Chosen(velocity vector)

a Team, following their leader




Thus, no c_traces made for collision detection! I get a much better fps now, and this system worked for every possible situation I tried it so far.

With this out of the way, I'm now ready to build my Jailhouse level. I'll keep you posted .

Aris

Last edited by LarryLaffer; 12/15/05 00:28.

INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!