Game Development Community

AIPlayer overhead?

by Daniel Buckmaster · in Torque Game Engine · 10/16/2007 (12:40 pm) · 3 replies

My game will (haha) feature large battles, something on the order of over a hundred individals per side. Think of a strategy game, even though it'll be played as an FPS. My question is, can this be done with standard AIPlayers? I know I'll have to be very careful with the design of the AI they use, but for now, I simply want to know whether it's possible to add two hundred AIPlayers to a mission and still be able to play the game.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
10/16/2007 (2:04 pm)
I have around 30 in a game and it works fine. There are times tho, when it will lag. The AIGuard::Think() function takes a whole lot of cpu power. If you write your AI right, you should be able to get lots more than I have. I had to set the think process to a slower number to get over 30.
#2
10/16/2007 (2:07 pm)
I'd worry first about rendering performance.
depending on the complexity of your characters, that can easily be the biggest hit.
how many do you expect a player will see at once ?
#3
10/17/2007 (7:59 am)
Well, the battlefields will be as large as possible, so squads should be fairly spread out. Combine that with a little fog, and I'd say an absolute maximum of fifty. That's pretty generous, I think. But I'll try to make use of as much LOD as possible, and our models aren't exactly going to have next-gen poly counts...

As far as AI goes, I won't have anything like a scheduled method for every AIPlayer all running at once. The thinking for a squad will be done by its leader and a special 'squad manager' object. The squad members will only need to do simple stuff like firing and getting behind cover. The squad manager will handle target allocation, enemy detection, etc. I've got some really cool ideas for this, which hopefully will cut down processing time for AI to a minimum.