The Universal AI Starter Kit
by Twisted Jenius · 09/23/2009 (3:04 am) · 37 comments
I’d like to announce the arrival of The Universal AI Starter Kit, which is now available at the GG developer store.
As I’m sure many of you know, AI is an essential element of many games and I think that this kit is a much needed resource that will undoubtedly aid many game designers in the Torque community. The idea for this kit originally began with a desire to have quality AI for my own gaming project and then, after planning and working on it, I began to realize that this had the makings of a great product that many other people in the Torque community could use.
As a result of this, many of the elements that you will find in The Universal AI Starter Kit are not things which I needed for my own game, but are things which I programmed deliberately with the benefit of other users in mind. I’ve attempted to make this AI as flexible or “universal” as possible, so that it can be an asset to almost any game that is in need of combat AI. This kit also features some options for non-aggressive, NPC bots as well.
For all of you hobbyists out there, I should tell you that aside from its practical usage, this AI is just a lot of fun to mess with! Having your creations actively chase and shoot at you can be very exhilarating. The Universal AI Starter Kit is specifically designed to focus on AI and to do it well.
Features List:
-Eight selectable behavior modes, including both aggressive and non-aggressive. Select from chase, guard, leashed, turret, teammate, NPC, KillableNPC, and escort behaviors.
-A team system. Have as many teams and bots as you want; with selectable friendly fire and free for all options.
-Bots can automatically change weapons based on your specific settings. Select from pattern, best, range, and random weapon modes.
-Easy installation and heavily commented and documented code. No source code changes are required but the stock source is utilized for maximum performance.
-The foundations of a dialogue system.
-An advanced spawning system. Spawn or kill as many, or as few, bots as you wish to at any time.
-Advanced movement and navigation that requires no nodes or mesh. Bots can follow their selected target or use basic pathing.
-Performance optimized enemy targeting, selecting a target either by distance or lowest health.
-A GUI based marker editor, great for non-programmers.
-You can have scripted events using non-looping paths and trigger based spawning.
-Numerous distance, weapon and other variables that can each be set per datablock and/or individual bot.
Demo Video:
You can purchase The Universal AI Starter Kit here right now.
As I’m sure many of you know, AI is an essential element of many games and I think that this kit is a much needed resource that will undoubtedly aid many game designers in the Torque community. The idea for this kit originally began with a desire to have quality AI for my own gaming project and then, after planning and working on it, I began to realize that this had the makings of a great product that many other people in the Torque community could use.
As a result of this, many of the elements that you will find in The Universal AI Starter Kit are not things which I needed for my own game, but are things which I programmed deliberately with the benefit of other users in mind. I’ve attempted to make this AI as flexible or “universal” as possible, so that it can be an asset to almost any game that is in need of combat AI. This kit also features some options for non-aggressive, NPC bots as well.
For all of you hobbyists out there, I should tell you that aside from its practical usage, this AI is just a lot of fun to mess with! Having your creations actively chase and shoot at you can be very exhilarating. The Universal AI Starter Kit is specifically designed to focus on AI and to do it well.
Features List:
-Eight selectable behavior modes, including both aggressive and non-aggressive. Select from chase, guard, leashed, turret, teammate, NPC, KillableNPC, and escort behaviors.
-A team system. Have as many teams and bots as you want; with selectable friendly fire and free for all options.
-Bots can automatically change weapons based on your specific settings. Select from pattern, best, range, and random weapon modes.
-Easy installation and heavily commented and documented code. No source code changes are required but the stock source is utilized for maximum performance.
-The foundations of a dialogue system.
-An advanced spawning system. Spawn or kill as many, or as few, bots as you wish to at any time.
-Advanced movement and navigation that requires no nodes or mesh. Bots can follow their selected target or use basic pathing.
-Performance optimized enemy targeting, selecting a target either by distance or lowest health.
-A GUI based marker editor, great for non-programmers.
-You can have scripted events using non-looping paths and trigger based spawning.
-Numerous distance, weapon and other variables that can each be set per datablock and/or individual bot.
Demo Video:
You can purchase The Universal AI Starter Kit here right now.
About the author
Developer of The Universal AI Starter Kit, which is available in the Add-ons store on this site. Also working on the game Twisty's Asylum Escapades.
#22
Which file and function can I see the NPC collision check at?
09/25/2009 (1:23 am)
Having fun with the kit. Getting my butt kicked by the AI.Which file and function can I see the NPC collision check at?
#23
All bot's collision is handled by the Torque physics system, not the AI. I'm not exactly an expert in that area, so I can't say the specific function that would handle that.
09/25/2009 (8:19 am)
@Leathel GrodyQuote:Which file and function can I see the NPC collision check at?
All bot's collision is handled by the Torque physics system, not the AI. I'm not exactly an expert in that area, so I can't say the specific function that would handle that.
#24
You said it was:
If we can get that working in the Torque MMOKit, you will probably get alot more purchases. Currently the collision is turned off because the mobs stack onto each other. So interested in seeing where that code is specifically and if useable for us.
09/25/2009 (11:04 am)
Sorry, probably worded wrong. I was referring more to Josh's request of the NPCs not stacking on each other. You said it was:
Quote:Before moving, all bots do a raycast to see if there are any obstacles in-between where they are and their destination. This check includes looking for other bots.
If we can get that working in the Torque MMOKit, you will probably get alot more purchases. Currently the collision is turned off because the mobs stack onto each other. So interested in seeing where that code is specifically and if useable for us.
#25
dontMoveAlongTheWall(%this, %obj)
checkMovementLos(%this, %obj)
In general, what you want to do is use a "containerRayCast" to check what objects are in-between a specific starting and ending point. And if there's something in the way, go around it or don't move to that position.
On a side note: You're more than welcome to use my AI as an example (that's one of the reasons it exists in the first place); but if you are plan on ripping out large sections of the code and sticking it in your own kit, that could cross the line on a few legal issues. I'm not suggesting you were planning on doing that; I'm just making sure you're aware of it.
09/25/2009 (11:38 am)
The two functions responsible for most of the movement are:dontMoveAlongTheWall(%this, %obj)
checkMovementLos(%this, %obj)
In general, what you want to do is use a "containerRayCast" to check what objects are in-between a specific starting and ending point. And if there's something in the way, go around it or don't move to that position.
On a side note: You're more than welcome to use my AI as an example (that's one of the reasons it exists in the first place); but if you are plan on ripping out large sections of the code and sticking it in your own kit, that could cross the line on a few legal issues. I'm not suggesting you were planning on doing that; I'm just making sure you're aware of it.
#26
No, it would be more, if you want to enable NPC collision, go buy the Universal AI Starter kit. That's why I say, if it can work, then you'd get alot more purchases. Wouldn't dream of including any portion of the code as a default for the MMOKit. But because the AI source code was modified and of the networking, need to see if they can even work together.
Unfortunately I am not a coder so will probably require somebody like Josh to look at, but for now, I'm having fun with it just in the Base Torque product :)
09/25/2009 (12:08 pm)
Thanks, I'll check those out. No, it would be more, if you want to enable NPC collision, go buy the Universal AI Starter kit. That's why I say, if it can work, then you'd get alot more purchases. Wouldn't dream of including any portion of the code as a default for the MMOKit. But because the AI source code was modified and of the networking, need to see if they can even work together.
Unfortunately I am not a coder so will probably require somebody like Josh to look at, but for now, I'm having fun with it just in the Base Torque product :)
#28
09/25/2009 (4:41 pm)
Does it work with the RTS Starter kit?
#29
09/25/2009 (5:44 pm)
I can't say for sure, but it's likely that it will work with the RTS Genre Kit after a little customization. But even though you might be able to get The Universal AI Starter Kit and the RTS Genre Kit both working together, this AI system is not at all designed for a RTS. So if you're planning on making a classic style RTS, you'll have to very heavily modify the code to get it to work.
#30
09/26/2009 (2:34 am)
Alright, cool, I'm thinking of an RTS more like dawn of war II with less buildings and stuff and just a squad of infantry.
#31
09/26/2009 (4:38 am)
In that case, The Universal AI Starter Kit should suit your needs fairly well.
#32
09/27/2009 (11:21 am)
I can't afford this as im 12, but it does look pretty cool. Well done.
#33
10/01/2009 (8:25 am)
@ Twisted: Well I kept to my word and bought it :D Experimenting now!
#34
10/07/2009 (2:56 am)
Twisted genius can you please send me an email. My email is bishop.alexander@gmail.com
#35
*** LOADING MISSION: base/data/missions/Heartofwinter.mis
*** Stage 1 load
*** Stage 2 load
Executing base/data/missions/Heartofwinter.mis.
ACTIVATE sequence found
ACTIVATE sequence found
ACTIVATE sequence found
ACTIVATE sequence found
*** Mission loaded
Preparing Markers...
--------- ( Preparing Markers... ) ---------
aiPlayer.cs (193): Unknown command getFieldValue.
Object MissionInfo(1048685) MissionInfo -> ScriptObject -> SimObject
Object padlight(1049272) sgUniversalStaticLight -> fxLight -> GameBase -> SceneObject -> NetObject -> SimObject
Hiding Bot Markers...
Now spawning group: all
base/scripts/server/common/aiPlayer.cs (218): Unable to find object: 'allMarkersSet' attempting to call function 'getCount'
Hiding Bot Markers...
Engine initialized...
10/16/2009 (11:02 pm)
I am unable to get the starter kit working.. I had the resource working no problem. I have a few errs that show up over 30 times on server start..*** LOADING MISSION: base/data/missions/Heartofwinter.mis
*** Stage 1 load
*** Stage 2 load
Executing base/data/missions/Heartofwinter.mis.
ACTIVATE sequence found
ACTIVATE sequence found
ACTIVATE sequence found
ACTIVATE sequence found
*** Mission loaded
Preparing Markers...
--------- ( Preparing Markers... ) ---------
aiPlayer.cs (193): Unknown command getFieldValue.
Object MissionInfo(1048685) MissionInfo -> ScriptObject -> SimObject
Object padlight(1049272) sgUniversalStaticLight -> fxLight -> GameBase -> SceneObject -> NetObject -> SimObject
Hiding Bot Markers...
Now spawning group: all
base/scripts/server/common/aiPlayer.cs (218): Unable to find object: 'allMarkersSet' attempting to call function 'getCount'
Hiding Bot Markers...
Engine initialized...
#36
the resource worked fine on the SS2845 ATR.. this dose not...
10/17/2009 (8:21 pm)
I fell like i wasted 26 bucks..the resource worked fine on the SS2845 ATR.. this dose not...
#37
10/19/2009 (3:56 am)
Jack, I'd suggest you post in the topic in the General Addons forum, as it's more visible than posting in an old blog.
Torque 3D Owner Twisted Jenius
Thanks a lot for the T3D instructions! I'll likely add them into the next release as "unofficial" instructions.