PDA

View Full Version : Director AI...



Chris Newman
04-09-2010, 02:16 AM
I'm working on a as of yet unannounced project using the unreal engine, my first assigned task was to make an AI system that was easy to control to go with the storyline but unpredictable enough to keep the game play fun.

I have only worked with ID TECH engines for the last 9 years and after a month of cursing how unreal does certain things I'm finally used to and can appreciate how it works.

Director AI is an internal and external bot maker.
The internal portion adds 20 new kismet functions for "Special" AI tasks.

The external is a bot builder written in visual basic.
At this point the external editor is console only just so i can get together a good proof of concept, but adding a GUI is very simple at this point.

The designer works like a questioner.
(Note, All random options are random decisions the bot will at run time)

Option 1.
Inventory]
(Bot inventory)

Option 2.
Cover Points] 0 1 2 3 4 5 6 7 8 9 10
(How many places in the area are there that the bot can use for cover)

Option 3.
Cover Order] Random Ordered
(Let the bot randomly decide were to cover or pre compute an order)

Option 4.
Duck] On Off Random
(Duck at cover)

Option 5.
Movement] Walk Run Random
(Walk or run always or random)

Option 6.
Target] Player Object Team Random@start Random@CoverPoint
(The bots target)

Option 7.
Assault(At health) 90% 80% 70% 60% 50% 40% 30% 20% 10%
Assault(At cover point) 0 1 2 3 4 5 6 7 8 9 10
(The point the bot goes F%&ck IT!,I'm taking this guy out!)

Option 8.
Bravery] High Low
(In Assault mode will the bot shoot from a distance or hunt you down)

Thats all i have working so far,should evolve over time.

Will release as soon as its fully functional and/or after the first beta of my project.

Here is a early build/Proof of concept i did a few days ago.
http://www.youtube.com/watch?v=_8jhjb26tC4
http://img168.imageshack.us/img168/4498/94997599.jpg (http://www.youtube.com/watch?v=_8jhjb26tC4/)

All opinions and suggestions welcome.

Thanks.
-Chris

Rives
04-09-2010, 03:42 AM
Working out pretty sweet. But as soon as it gets out of the block range, it just stands there. Still, it's really good.

mkandersson
04-09-2010, 04:18 AM
Really nice. gj

Chris Newman
04-09-2010, 05:41 PM
Thanks:)


But as soon as it gets out of the block range, it just stands there.

For that test i had the settings set to assault at 2nd cover and his bravery set to low.

High bravery is working well (He just hunts you down terminator style) but for low settings i need to add a player distance check.

Xendance
04-09-2010, 07:08 PM
Imho, at low bravery the bot should stay in cover UNTIL the player is at a certain distance and that there are covers closer to the player.

Rives
04-10-2010, 05:48 AM
I agree with Xendance. In addition, he can shoot randomly from cover. Just like in Gears of War.

Chris Newman
04-10-2010, 10:25 PM
@ Rives&Xendance
Thanks for the suggestions:D

I added a "Cower"(to shrink away or crouch especially for shelter from something that menaces, domineers, or dismays) option that will make the bot seek cover if he takes a hit in assault mode.

Also i found a major bug.
I took one of our WIP environments and set it up with bots and gave it to my son to test out.

He being a high ranked Gears Of War clan member quickly found that if he times it right he could sneak behind the bots while in cover mode and take them all out Rambo style.

The bots now have distance triggers that really bring them to life.

If cover trigger set 1 else 2.

Trigger set 1.
Medium distance=Assault mode.

Trigger set 2.
Short distance=Melee (Right now just does the hula hoop:))
Medium distance=Walk and fire@attacker.
Long distance=Run and fire@attacker.
(Note...@low/High bravery the bot will never walk away from the player)

After i polish up a few things i will post up a 2nd vid.

Thanks.
-Chris

Zomy
04-10-2010, 10:32 PM
Damm, you are really good.
I'll be waiting the vid.

Chris Newman
04-11-2010, 01:46 AM
Started work on the GUI (my fingers are getting buff from using the command line for testing:))

Wont be pretty(As it is an internal development tool) but will get the job done.
http://img685.imageshack.us/img685/3371/66580556.jpg

ThePriest909
04-11-2010, 01:55 AM
Excellent job. I'd love to have such a tool.

mkandersson
04-11-2010, 03:21 AM
nice feature! UDK should have a tool like that :)

Chris Newman
04-11-2010, 04:44 AM
Thanks guy's:D

Crammed in some more work on the GUI tonight.
Most GUI options are working but i just ran out of coffee so fat chance its getting done tonight:rolleyes:.

http://img80.imageshack.us/img80/3882/77520218.jpg
http://img8.imageshack.us/img8/4280/70397721.jpg
http://img255.imageshack.us/img255/313/86336324.jpg
http://img683.imageshack.us/img683/3307/82187364.jpg

RhinoMatte
04-11-2010, 05:17 AM
Nice GUI. You're doing that with UIScenes?

Chris Newman
04-11-2010, 07:54 AM
Nice GUI. You're doing that with UIScenes?

Im using Visual Studio.
I wrote a bunch of new AI related functions in Unreal Script for Kismet.
The editor builds the bot externally,then adds it to your map.
http://img208.imageshack.us/img208/3945/87853010.jpg
http://img709.imageshack.us/img709/9414/45198183.jpg

ThePriest909
04-11-2010, 04:27 PM
Chris any chance of including a couple of melee functions as well for non-shooter games or mixed combat?

Chris Newman
04-11-2010, 07:27 PM
Chris any chance of including a couple of melee functions as well for non-shooter games or mixed combat?

Actually... If you keep the weapon unchecked it will default to melee with up to 3 melee animations.

ThePriest909
04-11-2010, 11:16 PM
Actually... If you keep the weapon unchecked it will default to melee with up to 3 melee animations.

Great news!

nickmarks
04-11-2010, 11:53 PM
so excited! keep up great work!

Dregoloth
04-12-2010, 05:15 PM
wow! that's looking really great, and if you release it, I would definitely use it.
however, if I may be so bold as to suggest, you might want to add a 'run when shot' option to the movement.

EDIT
I wonder if it would be possible to implement this into the udk base installation in order to compete with the cryengine 3 AI editor