Game Development Community

Torque 3D AI FPS Tutorial ?

by Akash · in Torque 3D Beginner · 04/04/2013 (5:33 am) · 5 replies

1. I was looking(searching) for the Alien and it's Script in FPS Tutorial(Alien is shown in the Intro Video) to understand the AI, how the Alien walked, ran, shot at the player, it's code, in simple words. But,; i couldn't find it, where is the Alien Script in the FPS Tutorial ZIP ?

2. In WHICH script file of the Full Template, is the Player(declared as "Armor" i think) object declared with new Player object(in simple words, could you please tell me the name of the Script file which has the code to spawn the Player)?

Thanks

#1
04/04/2013 (9:26 am)
The Alien isn't part of the FPS Tutorial, it's a content Add-On pack that's available for purchase in our store. There also isn't a tutorial on AI currently, at least one from GarageGames. There are some community members that have been working on tutorials for AI as well as products in our store to provide more advanced AI functionality. The default included AI script is pretty simplistic, it just follows a predefined path.

As a side note, the Alien in the video was another player in a multiplayer match, not AI.

As for spawning a player, I'm pretty sure the tutorial covers this, but look for the spawnPlayer function in server/spawn.cs.
#2
04/04/2013 (9:49 am)
Thank you,

i checked the full template again and it seems that server/gameCore.cs file is responsible for spawning the player, i will check the spawn.cs file too.

The reason i was looking for a script file with enemy AI is that i have absoloutely no idea how i'm supposed to script intelligence in the enemy bots in Torque 3d as there is no function that performs specific task every frame for the gameobjects in the scene(sort of what i'd do with the Update() function in unity)
#3
04/04/2013 (10:37 am)
The spawn function in scripts/server/gameCore.cs overrides that of the default spawn function found in core/scripts/server/spawn.cs
#4
04/04/2013 (1:30 pm)
Hi Akash,

If you are looking for AI scripts for FPS genre game in Torque 3D, then you should buy this awesome software called "The Universal AI Starter Kit by Twisted Jenius". Believe me, you will not find anything better out there in this category ready to use in Torque 3D than this program.

The Universal AI Starter Kit has been easy install, is not necessary to change the source code; I mean no recompile, rebuild, build action, or similar stuff you will need to do; it's just following the software install instructions and bang; you will be prepared to go.

Furthermore, this software works fine in Torque 3D MIT as well.

Below is the link:

http://www.garagegames.com/products/ai-starter-kit

Have fun!
#5
04/04/2013 (4:17 pm)
To spread the love a little, the Tactial AI Kit is sweet, too!

You can look at the scripts in my tutorial repo but it is a work in progress with no documentation. If you use Windiff or a similar tool to compare these scripts against the stock T3D set you'll readilly find where I was working - primarily in server/aiplayer.cs, but there was a load of stuff in the art/datablocks folder for various player-type dependent scripts.

Just fiddling with those should probably convince you to go ahead an buy one of the AI kits available - there is a ton of work in it, let me tell you.

Also, check out Steve's Chinatown Recast/Detour deathmatch and Steve's Tactics-Action Hybrid series for more nifty stuff....