Game Development Community

AI bad guy

by Jesse P · in Torque Game Engine · 11/03/2007 (3:49 pm) · 10 replies

I'm looking for a bad guy AI that shoots at you for an FPS game. I've tried the AI Guard bot but the performance is so bad that it is completely unplayable when you add more than two or three bad guys to the level. I need something where I can add a good 10-20 bad guys around the level. Please help thanks
I'm using TGE 1.5

-Jesse

#1
11/03/2007 (5:52 pm)
I have 18 AI Guards in a multiplayer game. The performance is fine. You just have to comment out the console debug info. Dumping everything the ai does to the console takes up a lot of cpu power.
#2
11/03/2007 (8:30 pm)
Not sure what lines those are...
#3
11/03/2007 (10:27 pm)
Anything that starts with 'echo'
#4
11/03/2007 (10:37 pm)
Thanks I'll give it a shot, don't see much on the console though
#5
11/03/2007 (10:57 pm)
Is this in the AIguard.cs? because I only see a couple spots where it echos to the console when it is first loading, but after it is loaded I see no console activity when the game is playing in regards to the AIguard bot...
#6
11/03/2007 (11:20 pm)
That might not be your problem then, I was just offering the suggestion based on Mike's suggestion.

I don't know anything about the AI guard. I only looked at it briefly when first delving into the AI.

Let me however throw out another thought. One that I have had several times when looking at various implementations of Torque AI.

Say you add 20 spawn points to your level and they all spawn a new bot when you start the level.

So you have 20 bots, all with the same think delay, all processing on the same tick! That could skew things a little. Personally I add a small random factor to their tick delays and for my bots I make sure they start on different ticks (32 ms period).

If you are adding bots with a keypress or from the console you won't have to worry about this yet.

Eventually bot updates would get out of sync when they die and respawn but initially all bots tick at the same time.

This might have nothing to do with your problems though just something I've noticed and thought "hey, thats wrong".
#7
11/04/2007 (5:18 am)
Hey it's worth a shot, thanks.

Also if anyone knows of any other AI bad guy resources I can try other than the AI Guard please post it, thanks
#8
11/04/2007 (5:29 am)
There's always Killer Kork in the resources section. But you will probably run into some performance issues with that unless you tweak it heavily. Brian's offset think cycle idea sounds very interesting to me though . . . and it should be simple to test out.
#9
11/04/2007 (6:59 am)
Sorry it took so long to get back to this. It's Soccor Championships this weekend for my sons team. (ranked #2 in youth soccor) so won't be home much to see what changes I made in depth, but, after a brief look at my game, I have to amend what I stated above. I didn't stop the echos. (was still on my todo list)
I have 18 bots in a modified starter.fps game and the performance is fine, even in multiplayer mode. Testing with 25 gave me lag issues.
There are a whole slew of settings at the top of the cs file you can change. That may help you, or you may have other issues.
#10
11/07/2007 (6:26 pm)
Hmm, wish I could just find a dumbed down version of AIGuard, anyone out there with an FPS that has such a good and dumb bad guy?