Game Development Community

FPS starter Kit AI Bot? How to?

by michael · in General Discussion · 03/04/2009 (9:27 am) · 17 replies

I am making a level for the FPS starter kit and I cant figure out how to make a bot like the one they have in the example level. I just want to make a bot that runs around, how do I do this? Is there a specific code file where they are spawning this bot from or a script file cause Ive looked through the code and I dont see where they are defining this bot.

Any help is appreciated!

#1
03/04/2009 (10:29 am)
Kork is set up in AiPlayer.cs. That is also where the AIManager is defined.
#2
03/04/2009 (10:39 am)
For "running around" you can also do a search for "wander" on this site. There are several script implementations of wandering, which should help get you moving in the right direction (my puns are always intended ;)
#3
03/04/2009 (10:48 am)
Look at the stronghold and barebones missions and see how the AI paths are set up in the mission files and the editor. The AIPlayer.cs is what controls the behavior and functionality, but you'll need a path to get them started.
#4
03/04/2009 (11:45 am)
You could also look up AIguard and AIpatrol... something that should be standard in Torque by now..
#5
03/04/2009 (3:23 pm)
Thanks all but my problem is more of a basic one what are the steps I need to take to get a bot into my game and have him move along the path I direct?

Can I add the player in the world editor and then assign him a path? I tried this and it doesnt seem to work.

I'm very much a noob so if you guys can point me to a tutorial that will give me step by step instruction that would be wonderful!
#6
03/04/2009 (3:26 pm)

#1
Kork is set up in AiPlayer.cs. That is also where the AIManager is defined.

I understand that he is set up there but where is the script that starts him up in the game?

For instance I dont understand how if all of the levels share these basic files then how can they each be customized for each levels needs? You get what I mean?

Because it doesnt seem that the .mis file really holds the Bot info or implementation.
#7
03/04/2009 (3:50 pm)
its because your using the demo you don't get a AI player in the demo you have to have the full version you also don't get access to source with demos.
#8
03/04/2009 (4:18 pm)
its because your using the demo you don't get a AI player in the demo you have to have the full version you also don't get access to source with demos.


Why do you assume that I have the demo?

I have the full SDK.
#9
03/04/2009 (5:29 pm)
You don't have the full SDK. If you do under another account, please use that account.
#10
03/04/2009 (6:35 pm)
Umm ok well I got the torque engine through my school and I will have to find that information, but what does this have to do with my question?
And I think I would know if I had the full SDK. You saying I dont is really stupid because if anyone would know it would be me since I can see all the source code and I know I have the full SDK.
#11
03/04/2009 (6:59 pm)
its because we cant give you source code to help you out. if we don't see the engine in your account we cant give you the source that you need.
#12
03/04/2009 (7:01 pm)
What Brandon is saying is correct. If you bought the Torque Game Engine, it would be under your account. If you got the engine through your school, isn't there an account they assigned with it?
#13
03/04/2009 (8:05 pm)
Im not asking for source code guys im asking how can I implement a bot in the game. Thats all im not asking for you guys to give me code. I just need to know how to do it.
#14
03/04/2009 (8:07 pm)
http://www.garagegames.com/community/resource/view/6742/
#15
03/04/2009 (9:16 pm)
If you've got access to the SDK through your school then you should have the Stronghold example right? also known as the FPS starter kit (starter.fps for TGE). The stronghold and barebones mission files show how to set up path markers for the AI - path markers are just that and you'll follow the same procedure/setup for all maps. When the game starts it calls the creation of the AIManager (see function startGame() in game.cs), which is defined in aiPlayer.cs along with the rest of the scripted pathed AI controls. The AIManager looks through the mission and finds a path and spawns a bot on that path, no path == no AI. All that bot will do is run around on that path. That's all there is to the basic AI in stock Torque. You could also look at the demo example and see how to make him shoot at a designated location.

For more advanced bot behavior you'll need to make modifications. AiGaurd is supposed to be a good one - but requires source changes. There is a newer aiGaurd resource that is totally scripted. There is also the Killer Kork resource, which I believe is also scripted.
#16
03/04/2009 (11:36 pm)
CodeSampler.com has a Bot Path-finding tutorial that should be of help.
#17
03/05/2009 (3:17 am)
Quote:There is a newer aiGaurd resource that is totally scripted.

I guess that's my cue to randomly spam this link: Improved AI Guard Unit Resource