Game Development Community

What AI Scenarios interest you?

by Phil Carlisle · 12/28/2005 (3:44 am) · 21 comments

The AI pack is coming along nicely, just waiting for some more communication to happen post-christmas, but one of the things I'm working on now, is getting a bunch of useful demos together so that people know how to make useful AI with the pack.

Now I'm going to use them as tutorials too, so they have to be reasonably broad in nature. I thought I should get a bit of feedback from a plan about the typical usage cases we might want to cover for the pack.

So if you have any ideas, please post em in a response. For my idea, I present it like this:

Tutorial 1 - Treasure chest

In this scenario, you play an adventurer who is intent on finding a new treasure. You have been told to go and speak to in a nearby village, who will give you instructions on how to find the treasure.

AI - Town full of NPC folk. Most of these are using a townsfolk state machine which lets them either move from interesting point (usually outside shops) to point, but if they spot someone along the way they will stop and chat. The central character is located in the village.

When the player moves within range of the main NPC, he will then trigger a recognition sequence which will result in the giving of a gold key and a script sequence showing the treasure chest and an guarding it.

The main NPC will then say "follow me" and will guide the player towards the monster/chest. At a certain distance, the NPC will trigger a sequence which says "Now you go on alone" and will return back to his starting position.

At which point, the will activate (using an event) and turn into Melee/Guard mode. The monster state machine will allow it to guard the chest and behave like a typical monster in an MMO, with a "rage" meter and the possibility of techniques like kiting (running away faster than the monster) or will engage in combat within melee attack distance.

Once the is defeated, the treasure chest will be unlocked by simply pressing the "use" button within the range of the treasure chest.

Scenario Ends.

As you can see, there is a bunch of stuff involved here. Sensors to activate an NPC, Events to activate an NPC, pathing for the NPC to guide you to the monster area. Pathing for the monster to hunt you down. Agression based state machine for the monster to "calm down" and go back to its guarding etc.

I ideally want to incorporate a few of these types of scenarios into the pack to give a better idea of how it all hangs togther.

Of course, this will all be done with placeholder art for the most part, unless someone donates some useful art for the pack.

If anyone has any useful short scenarios similar to this, please let me know and we'll take them into consideration while finishing off the tutorials.

Ta.

Phil.
Page «Previous 1 2
#1
12/28/2005 (6:19 am)
I would be interested to see a "squad" based AI tutorial. *Keep in mind that I'm building a space sim, so my interest lie in flight sim AI.

Scenario:
A squad of 4 NPC patrol in a group formation. NPC1 being the leader and NPC2, NPC3, and NPC4 following NPC1.

The player gets too close to the NPC squad and they react to the player. I would like to see the formation break into 2 separate formations and attack the player. So this would create a scenario that needs one NPC to be the other NPC's wingman.

Afterwards, (if the NPC's survive) regroup and continue the patrol.

This probably isn't as broad as you want for a tutuorial, but I think there is a tutorial in there somewhere ;)

-Tim
#2
12/28/2005 (6:27 am)
sounds good. i probably won't have much trouble implementing my own AI but heres a couple scenarios which would be interesting to me:

Monster attack:

A huge monster is attacking the town and everyone must run away from it. the monster's movement speed is constant and civilian running speeds are randomized and the monster eats whoever he gets close enough to but cannot eat more than one person at a time.

Mime:

an annoying mime is mimicking everything you do. run, jump, shoot the mime will follow and mimick all your actions.

Ninja race:

Ninjas race through a bamboo forest. they all follow the same general path but independently dodge trees, jump over obstacles, and avoid collision with each other. everyone knows how fast and agile ninjas are, they should never collide with anything.
#3
12/28/2005 (7:16 am)
swarms?
#4
12/28/2005 (10:37 am)
How about scouting/searching?
#5
12/28/2005 (11:11 am)
Squad teammates that will actually help defend you and the fellow squad mates.

Say you must reach a particular area of the mission in order to accomplish a task but there is pretty much no chance of you reaching the destination alone because of the number of enemies.
#6
12/28/2005 (11:29 am)
Pet / Team AI would be nice as mentioned above. Also don't forget the sheep hearder.. Well I want to do Bison. Heard AI.
#7
12/28/2005 (12:37 pm)
Some thoughts on the subject...how much of the following could be applied to what you have in development I dont know.

Areas of concern for me would be with schedules, animation control, and with pathing. I dont play too many games (doesnt help that I have an older computer with a geforce2 also), but for such an old game, I still find the AI in a game like Ultima 7, and more recent game about Robin Hood (rts game) was much better than even a lot of modern games like Elder Scrolls: Morrowind had. Anyways...

SCHEDULES/STATE-MACHINES:
You mention npc's have a state machine to perform actions. Can these state machines be made such that a schedule is created so the NPC performs specific state machines at designated times. Basically, primary state-machines would drive secondary state-machines; once secondary state-machines are finished, the NPC returns to its primary schedule.

Example:
Schedule for NPC is set to perform different 'chores' depending on the time of day.
Primary State-machine for NPC has a schedule to do the following:
Morning state-machine: wake up.
Day state-machine: perform work.
Evening state-machine: go to sleep.

Secondary state-machines...
Wake Up state-machine: get out of bed, go to work, etc.
Perform work state-machine: (if its a bartender for example) sell beer, clean tables, etc.
etc.

If the NPC is interupted, such as walking to work and being attacked. A secondary state-machine would be generated based on some AI Mind states: aggressivness, any weapons being carried, how powerfull the attacking NPC is, etc. This secondary state-machine such as attack until situation changes, run away until situation changes, etc. Obviously once finished, the NPC would go back to what it was originally doing.

ANIMATION CONTROL:
Even with the above state-machines, there are still a lot of low-level things going on such as walking, runing, attacking, dodging, jumping, that control movement and animation. Phil, your scenario above, doesnt talk about this and maybe an exampe of an action like NPC moving around a map (with obsticles) would be great (especially since a LOT of focus for torque is FPS games and arcade/puzzle games.

PATHING:
I dont know how involved your pathing routines are too become, so I will just write down some thoughts.
Depending on the complexity of the game, pathing could become a BIG deal. If the NPC gets stuck on a level, it could ruin the intended gameplay, not to mention the players belief in being in the game. Do you have anything to help NPC's get un-stuck?

Like an above poster, I think formations, while following paths can give a huge benefit to how smart the AI 'looks'. Formations usually assume an NPC with a leader role. Any thoughts about the inclusion of this? I suspect it will probably be something us developers will have to add, but any suggestions, or possibly some designing that possibly allows for the coding of this to happen easily would be great.

Thanks,
John
#8
12/28/2005 (12:41 pm)
I think some kind of squad AI that you control(like a party in an RPG or just a squad of FPS AI) would be very useful. Having them beable to follow you around and take simple orders like move here, stay put, defend this, attack that, ect.
#9
12/28/2005 (3:42 pm)
Flight sim AI would be a really good thing to see. More generally, how to implement steering behaviors for vehicles that have to obey physical constraints like inertia, gravity, etc.
#10
12/28/2005 (4:05 pm)
Hmm.. ok, well, the Squad based AI will maybe take another release as there is a LOT of stuff to making a good Squad based AI than just getting them to do thier thing seperately.

But some good stuff. Still, I would prefer more scenarios for useful demo's of what people want. Formations are relatively easy, but formations arent what a good squad AI does. Have to think about that one.
#11
12/28/2005 (7:33 pm)
I would like to see a scenario involving two teams of AI that recognize 'zones' or large triggers (something like control points in BF1942) and will fight eachother for control of them.
#12
12/28/2005 (7:34 pm)
I would like to see a Baldur's Gate/Icewind Dale implementation. One character, several NPCs going around with the character, fighting bad guys, classic RPG implementations :)
#13
12/29/2005 (1:12 am)
Glad to hear you're working on getting that sucker out the door : it seems it's been forever...
Cheers Phil, might be coming to the UK in June btw, we'll go have a pint or something :)
#14
12/29/2005 (5:30 am)
I think maybe we misunderstood your question Phil. I'm guessing now that you want scenarios that show what the AIPack can do. Ala CTF. Can you give us some feedback on what the AI can do (ie. Pathfinding etc) so we can fit scenarios accordingly?
#15
12/29/2005 (7:33 am)
We need a Sir Robbin mode where, when encountering the fiercest creature for yards around, bravely flees. Skuggers off. Turns and runs.
#16
12/29/2005 (8:45 am)
Quote:I would like to see a Baldur's Gate/Icewind Dale implementation. One character, several NPCs going around with the character, fighting bad guys, classic RPG implementations :)

This is what I was talking about; a RPG party AI, where the AI in your party can move around and follow you without getting stuck/looking totaly retarded.
#17
12/29/2005 (3:21 pm)
Well I would like to see AI goes into building, gets on the second floor, pickup an item, and return to starting position. This is something i tried to achive (tried really hard) but with very carefully path planning bot usualy gets stuck, also what i would like to see is that bot follow me everywhere. So when I enter the building bot follows me, when I exit the building bot follow me (this is difficult to achive but i suppose that you solved pathfinding around/inside interiors).
#18
12/31/2005 (11:06 am)
Michael: its really just a good method of demonstrating the capabilities of the pack:

So I guess I'll post another plan early in the new year which describes the basic functionality of the AI Pack for the first release.
#19
01/24/2006 (11:23 pm)
I second Tim Muenstermann's squad idea :-D
#20
01/29/2006 (10:37 am)
Little late perhaps, but I'd like to throw my idea up, would love to see something of it in the pack.

Scenario - Theif! Theif!

Player is seen stealing an item by an NPC, the NPC calls out "Theif Theif!" a nearby guard NPC, hears the call, and runs in to see the player, then shoots at/arrests said player.

Thinking about it, you would need a system something like Morrowind, I'm guessing here, but I assume guards check a players inventory to see if items are flagged as owned by someone else, if the player has been flagged a criminal?

As for Torque and the AI pack, not many smart, or at least resource friendly ideas on how to do this.
Page «Previous 1 2