Game Development Community

Adding AI without engine codeing

by Joseph Jonathan · in Torque Game Engine · 11/06/2006 (9:42 am) · 8 replies

Hello all I am looking for a way to add AI (that will weild weapons and attack the player) to my missions without scripting the engine. I have used the ai code from CodeScripter, but it does not attack or weild.

I cant use engine scripting because i got the code from 3DGPAI1.

Some help would be greatly apriciated.



Joseph

#1
11/06/2006 (9:56 am)
The Advanced book covers basic AI in TorqueScript. That is the direction I would point you since you are already familiar with the original book. Most of the AI resources that I have seen require at least basic changes to the source.
#2
11/06/2006 (12:15 pm)
Right now my favorite Torque AI resource is Killer Kork AI, by Matthew and Daniel Evans. It's script only, which is amazing. And the level of tweakability is positively awe inspiring.

Killer Kork AI was designed for Torque 1.3, but also works in 1.4/1.4.2. Unfortunately, it doesn't seem to work with Torque 1.2 (which is what the book version was done in).

If I were you, I would download the demo version of TGE 1.4.2 and add the Killer Kork scripts to it.

Here's a link to the 1.4.2 demo . . .

www.garagegames.com/demos/browse/development/

And here's a link to the scripts . . .

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10278
#3
11/06/2006 (12:25 pm)
[Update]

Hmm. Weird. Apparently, the Killer Kork script resource is locked for non TGE owners. That shouldn't happen since KKAI is uses script changes and no source code. Not sure what's going on with the resource.

Hopefully someone at GG will unlock it so you can tinker with it.
#4
11/06/2006 (12:53 pm)
Uh yeah. as a non-SDK owner (check the "notes" section in my profile if you don't believe me. it says "none" rather than SDK owner) Ive noticed every resource is silently being locked, regardless of what it consists of.

and why is there a "notes" section in the profile anyway? the only thing it says is either "SDK Owner" or "none". the category should instead say "SDK Owner?" and then either "Yes" or "No".

Joseph, in order to understand how AI works in Torque, you need to get to know the "aiplayer" class. this class is based on "player" class and adds functionality for things like movement and aiming. learn and understand what the aiplayer class functions do.
#5
11/06/2006 (12:57 pm)
@Aaron
Ah cool! I didn't realize that Killer was script only. I'll have to tinker with that before I break my already nebulous code!
#6
11/06/2006 (2:32 pm)
@David

Just a warning: tinkering with Killer Kork AI is fun and addictive.

:)


@Sean

The notes section also indicates when a user is a Commercial licensee, which is important for those of us who are doing contract-based development.
#7
11/06/2006 (5:50 pm)
I am an SDK owner, and this sounds like a good resource so I may look into it.

But I must add, I learned some basic AI stuff by reading the 3DGPAI1 book. There is a demo in a "desert" type area (I can't remember which one...it's been over a year since I read it and looked that the demos) but in that demo there are several bots which patrol an area and then when you get close they fire at you. It's on the CD that comes with the book.

This demo was the Rosetta Stone for me in terms of me seeing how to code AI with bots in Torque that's pretty convincing.

It's all on the CD. check it out.
#8
11/07/2006 (7:09 am)
Yea I coppied the ai.cs script from emaga6 to my game that I started with starter.fps but the scripts are not working. does someone know what i have to change to make it work?