Game Development Community

The Universal AI Starter Kit

by Twisted Jenius · in General Add-On Discussion · 09/24/2009 (4:30 am) · 191 replies

If you have any pre-purchase questions about The Universal AI Starter Kit, post them here and I'll get back to you as soon as I can. If you have already purchased The UAISK and have a question, please post it in our private forum.

As of December 22, 2011 version 1.9.0 is the most recent version of The Universal AI Starter Kit.


Made with T3D 1.2 Chinatown demo and The UAISK version 1.9


Made with T3D 1.1 South Pacific demo and The UAISK version 1.8


Made with The UAISK version 1.7 + Arcane-FX 2


Made with The UAISK version 1.4


Made with The UAISK version 1.0


Made with The UAISK version 1.4


Made with The UAISK version 1.1

About the author

Developer of The Universal AI Starter Kit and Twisty's Asylum Escapades.

#21
09/26/2009 (10:05 am)
Glad you're enjoying it, and thanks for letting me know about the T3D changes. I'm slowing trying to make some "unofficial" T3D install instructions based on information other people are telling me.
#22
09/26/2009 (1:42 pm)
Will the update be emailed to me or just redownload from my GG account?

I'm still trying, for the life of me, to figure out what update I did to my engine, that makes my AI guys seem like there running in slow motion. Whats the most you can set for maxforward speed on a AI player?

I have a good question if anyone happens to know, what all files control the AI players movement in my engine files, or what files all pertain to just the AI player???

For now my AI players speed is set to

maxForwardSpeed = 14;
maxBackwardSpeed = 13;
maxSideSpeed = 13;

seems high already huh, but in game they look like their running in slow motion. By the way, thanks for all your hard work on the kit and taking time to answer any questions we have........Donnie
#23
09/26/2009 (2:11 pm)
You'll have to redownload any updates from your GG account, but I'll make sure to put up a forum post (if not a blog as well) to notify everyone whenever I put out a major update.

Just for fun while I was testing, sometimes I'd set the movement speed to numbers in the 20s and 30s. So it can go a lot higher than that without any serious issues; but of course just raising the speed a lot probably isn't the "correct" way of fixing your problem.

The first thing that comes to my mind is that you're missing or have an extra "setMoveSpeed" somewhere; but I can't say for sure. If you’ve made any changes to the stock AI code (the source code or kit’s script), try just using the default code.
#24
09/26/2009 (2:44 pm)
Twisted can you tell me why I have to set the
maxdamage, maxforwardspeed, maxbackwardspeed,maxsidespeed, in aiPlayerDatablocks, if I already have its set in my player.cs file???

Hate to bug ya, just trying to understand is all.....Donnie
#25
09/26/2009 (3:14 pm)
Actually you don't have to set them in the AI datablock at all (as long as they're set in the player's datablock). I just put them in there because I thought some people might want to have those as different values than the player. You can delete them if you want.

Edit: I'll add a comment about that in the next release. And now that I'm looking, I never used "shootingDelay" anywhere in the code, so you can get rid of that too.
#26
09/26/2009 (11:08 pm)
Cool, Thanks Twisted, and as a matter of fact, when I got rid of those settings in aiPlayerDatablocks file it seemed to fix my ai player from moving in slow motion. This kit is awsome and I hope alot more people buy it, again Thanks so much for your hard work Twisted....Looking forward to any tuts you come up with......Donnie
#27
09/27/2009 (9:29 am)
hi,
having a small issue, maybe someone can help with.
it would be beneficial to all of us.
I've integrated the Flexible A* Pathfinding System,
and would like to let my bots make use of it, but the console methods for a* call to AIPlayer. now when you create a new AIPlayerMarker, you are actually creating a StaticShape, so the console will throw an "unknown command" error.
ie; a command to get the bot to wander goes like this: bob.wander(20);
bob being a name you give the bot,
and the console says this:
01.==>bob.wander(20);   
02.<input> (0): Unknown command wander.   
03.  Object bob(1051476) bob -> StaticShape -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject
it thinks bob is a StaticShape.
so...
is there a way to create the bots as PlayerData, not StaticShapeData?
this will allow the bots to have access to a very easy to use a* resource.

thanks to anyone who can help with this.
#28
09/27/2009 (10:05 am)
Can I ask why you need an A* system in the first place? For most situations I find the stock navigation system along with basic pathing to be enough.

But if you really do need A* for some reason, here's a tips on how you might go about putting it in:

You want to tell the bot to wander, not the marker. The bot and the marker are two completely different objects, and it seems that currently you're sending your commands to the marker and not to the bot. So your code should look more like: 1234.wander(20);

With "1234" being the ID number of the bot. Of course that's not the really what the bot's ID number will be, so you have to get the actual ID before you can send commands to it.
#29
09/27/2009 (10:54 am)
awesome!!
thanks TJ, it works.

the reason I want a* is for the extra functionality it provides,
ie;

- "findPathTo" This takes either a point or an object as an argument, and simply finds a way to the point.

- "findCoverFrom" This also takes a point or object, and finds a place hidden from it.

- "searchCover" This takes no arguments, and makes the bot go to the nearest place it can't see.

- "sneakUpOn" This takes either a point and a vector or an object as an argument. It finds a path to the point or the object that can't be seen by it.

- "wander" This takes a distance as an argument and wanders around for this distance

my levels are huge, and mapping the paths to every point and destination, from various starting points just isnt an option, also, with a*, the player doesnt know the route a bot will take, so setting up ambushes are much more difficult.
#30
09/27/2009 (12:24 pm)
Hey Twisted, is the A* resource what I need to make my aiplayer search for cover when I shoot at them, or am I wrong all together, which is most likely......Donnie
#31
09/27/2009 (12:31 pm)
The game I'm making doesn't require a cover system; so honestly, I've never even looked into it. I checked into A* for pathfinding, but never looked at its cover features (if it has any).
#32
09/27/2009 (2:04 pm)
Twisted, if you had to make your AI run for cover, how would you do it, or any ideas to point me in the right direction?

For me it seems any AI that takes damage would want to seek cover and make it feel alittle more real, unless of course you dont want it to seek cover like turrets or something.....Donnie
#33
09/27/2009 (2:31 pm)
If I wanted realism, I'd just go for one shoot kills and then I wouldn't need a cover system. :P

But on a more serious note:
I have a number of raycasts that check to see if there is a line of sight between the bot and player. You could do the same raycast checks but in reverse, meaning you want the bot NOT to have line of sight (because that would mean it's not behind cover). You'd probably want to add that code to the bot's "Defending" state.

That's one idea at least.
#34
09/27/2009 (3:33 pm)
Twisted I got a question for ya, I hope you don't think I'm a bug but, I put in a health patch and in aiplayer.cs I set $AISK_SEEK_HEALTH_LVL = 0.2; and $AISK_DETECT_ITEM_RANGE = 150; for some reason I shot my ai guy and he doesn't seek the healthpatch as stated and its right by him....Any ideas or am I doing this wrong?......Donnie
#35
09/27/2009 (3:45 pm)
Item seeking (both health and ammo) may not be functioning properly. This is why I didn't list it as a feature anywhere. I may fix it at some point in the future, but it's not my highest priority so it would be a while until I got around to it.

Edit: Item retrieval isn't the highest thing on my list, but it is fairly high up there. I just can't say for sure when or even if I will get around to fixing it. But if I do fix it at some point, I'll likely redo the whole system to give it more features, better performance, etc.
#36
09/28/2009 (12:56 pm)
a question about the AI's "awareness"...
is there a way to make them "aware"?
what?
well if you shoot at them, from a distance, they do, well, nothing.
I'd like to have them at least respond to being shot at, like, turning to face the player, or move away, anything.

also, is there a way to have them respond to projectiles hitting the ground nearby?

thanks
#37
09/28/2009 (1:15 pm)
To have the bots respond when being shoot from a long distance, increase the values of $AISK_ENHANCED_DEFENDING_DISTANCE and $AISK_ENHANCED_DEFENDING_TIME as needed (both are located at the top of aiPlayer.cs).

Quote:is there a way to have them respond to projectiles hitting the ground nearby?

That would be something you'd have to do yourself. There are no stock features for hearing or awareness of projectiles that aren’t hitting the bot.
#38
09/28/2009 (2:46 pm)
awesome, thanks!!
#39
09/29/2009 (1:22 am)
i have a question we can use that kit on torque X?
i will work on that engine?
#40
09/29/2009 (6:37 am)
I just quickly downloaded and looked at the free trial of Torque X 3D; and based on that, I think it's unlikely that The Universal AI Starter Kit would work with Torque X.