Game Development Community

AIPlayer bug? 50+ bots do the herky jerky dance..

by Jason Gossiaux · in Torque Game Engine · 03/09/2008 (12:23 pm) · 2 replies

I was just stress testing my new pathfinding code, and ran into a really odd problem. Once I had 50 bots spawned, all the bots began improperly moving and animating their run animation. They'd play about half of it then jump back, and just acted all odd.

My testing area is pretty sparse, I get about 60fps in it with my 2Ghz Pentium-m w/ GF6800 card in RELEASE build. I am using the default Kork model and a custom AIPlayer think() routine. With all 50 bots on the screen I get 30-50fps depending on what DIF buildings are in view at the time. The game is smooth and I don't suspect I am starving any part of the engine from cycles (I'd hope it would just slow down if I was...).

This think() routine basically calls an A* pathfinding routine every second and tries to get the bots to pathfind to where the player is. I don't handle collisions, perform steering, or anything else fancier than the A*. I was hoping to see how the bots handled colliding with each other when in a large group...

When the player is in the line of sight with the bots, the A* is turned off and they just SetMoveDestination to him. So I am reasonably confident it isn't processor overload from the A* routines. I can run out into the open and they turn off their A*, and still do the herky jerk dance.

The dancing occurs almost precisely at 50 bots. If I look away to where only 1-2 bots are on the screen, the problem goes away... so perhaps it is related to the render engine?

I'd not heard of anyone else having issues with 200 bots in terms of improperly animating, so I am hoping it is something stupid on my part. Thank you for any help you can give me with this!

#2
03/09/2008 (5:11 pm)
Yeah I found that eventually but couldn't delete my thread :P The forum search is so hit or miss. Thanks though!