Largest number of AI Bots tested?
by Terence Tan · in Torque Game Engine · 04/25/2006 (8:47 am) · 8 replies
I was playing around with AIGuard, and adding about 15 bots to the game to see how 'badly' I could get it to perform(our game needs at around that amount)..It get pretty bad with 15 or so.
Alot of the behaviour in AIGuard is controlled by scripts, so my first idea would be to convert alot of those scripts to C++. Does anybody have anything run with large numbers of bots? Any indication if working with AIGuard is a good idea, or just figure out how to roll your own.
Just checking before I get too far in one direction or the other.
Alot of the behaviour in AIGuard is controlled by scripts, so my first idea would be to convert alot of those scripts to C++. Does anybody have anything run with large numbers of bots? Any indication if working with AIGuard is a good idea, or just figure out how to roll your own.
Just checking before I get too far in one direction or the other.
About the author
#2
04/25/2006 (10:06 am)
1000 bots - AMD 3700+, ATI x800, 1Gb RAM - average 40-60 fps
#3
what are those bots like ?
are they basically Kork ?
are they visible ?
04/25/2006 (10:08 am)
Wow!what are those bots like ?
are they basically Kork ?
are they visible ?
#4
Sorry. I was actually going to say..I definately need alot of monsters in the level (more then 15 obviously) but 15 on screen at once at least. I am just testing the upper limits a bit so I can figure out when we are doing level design what to do and what not to do.
I think the AIGuard(Mark Holcomb's resource) is a little bit too complicated, and I could probably simply it. Alot of the game is basically like an Aliens type game anyways where hoards of monsters charge at you.
Uh Alexander ...Yeah are they Kork? They don't move do they?
A side question is of course, monster off screen don't need to be spawn and their AI Cycle shouldn't need processing(or at least be on a extended sleep cycle scanning for enemies). Haven't done enough digging yet in AI, but if I put 1000 bots and only maybe 20 are in the vicinity..I only should be tweak the scan/wake cycles right? or perhaps I could tie it into player movement...
04/25/2006 (5:19 pm)
Yeah,Sorry. I was actually going to say..I definately need alot of monsters in the level (more then 15 obviously) but 15 on screen at once at least. I am just testing the upper limits a bit so I can figure out when we are doing level design what to do and what not to do.
I think the AIGuard(Mark Holcomb's resource) is a little bit too complicated, and I could probably simply it. Alot of the game is basically like an Aliens type game anyways where hoards of monsters charge at you.
Uh Alexander ...Yeah are they Kork? They don't move do they?
A side question is of course, monster off screen don't need to be spawn and their AI Cycle shouldn't need processing(or at least be on a extended sleep cycle scanning for enemies). Haven't done enough digging yet in AI, but if I put 1000 bots and only maybe 20 are in the vicinity..I only should be tweak the scan/wake cycles right? or perhaps I could tie it into player movement...
#5
04/25/2006 (5:32 pm)
I had a good 40+ soldiers moving, maintaining multiple squads, while utilizing the A* pathing resource with little slowdown. All custom sripted (not using AI Guard, then again script is a bit slower too).
#6
04/25/2006 (5:43 pm)
Now that you mentioned it ...it did look kinda wierd...I still had the regular AIPlayer 'Kork' running when doing the test in the village. The AIGuard bots were really really slow...but Kork was happily doing his laps...It did feel kinda strange. It could that Mark Holcomb's scan may be too agressive or some piece of code could be doing something it shoudn't..time to check the console logs.
#7
:) Those bots are kind of infamous Kork - running around paths, shooting on demand.
To shock you again ;P, I had 4,000 bots all moving in squad formation on the same machine, it was 5-10 fps though... I think that the visible amount of bots was around 100 or less.
I was test stressing TGE and RTS kit for some ideas, those were stock versions.
I believe that TGE can be optimized even more for crunching big number of bots behind the scenes.
04/25/2006 (6:20 pm)
@All: :) Those bots are kind of infamous Kork - running around paths, shooting on demand.
To shock you again ;P, I had 4,000 bots all moving in squad formation on the same machine, it was 5-10 fps though... I think that the visible amount of bots was around 100 or less.
I was test stressing TGE and RTS kit for some ideas, those were stock versions.
I believe that TGE can be optimized even more for crunching big number of bots behind the scenes.
#8
The shadows can be fairly expensive to render depending on the detail settings and the amount of players on the screen. Try setting them to the lowest detail (check the prefs.cs file) and see how things perform.
04/26/2006 (5:22 am)
How many polygons do your bots use? Probably the big hit isn't their scripts, it can be rendering both bots and their shadows.The shadows can be fairly expensive to render depending on the detail settings and the amount of players on the screen. Try setting them to the lowest detail (check the prefs.cs file) and see how things perform.
Associate Orion Elenzil
Real Life Plus
as far as evaluating the performance hit of the AI behaviour, before converting script to C++,
i would recommend adding in 15 however many you think you may need, but making them plain AIPlayers, who don't have much AI at all going on. If you still see the FPS hit, you know it's probably not AI behaviour, it's probably rendering.
if you're going to have a large number of bots (or players) but plan on only seeing a few of them at a time,
you may want to do some visibility testing via client-side rayCasts before actually rendering them.
- i outline a method for that here.
- that change actually jumped our average framerate from like 15FPS to 70FPS in the case where there's lots of bots who you can't actually see because they're behind walls or whatever.