NPC Interactions
Yeah. It''s all of those little details that make a game worth playing.
Another thing I haven''t explained yet here is that all higher-level goals will be made up of lower-level actions that are reusable.
For instance, stealing just uses the GET action but of course causes other things to happen like maybe lowering the NPC''s repuation with the law if he''s caught, etc.
>----------My Reply
After I posted that message earlier today in AI, I got down to fleshing out the implementation of such a system. It''s sort of tough truthfully. You are going to need with certain factors when establishing a goal-based planning system for your characters. They need to be interruptible (if the ai is doing something, it can respond to something more urgent), the ai needs to remember things or it could end up in endless loops (gets hungry, goes to get food, doesnt have money, goes to make some, gets hungry and leaves before finished...), the ai needs to understand what specific achievements will advance its goals. Basically, the last means you will probably have to create specific plans of action on your own, under each category. It seems that you are interested in developing a non-deterministic system where the npc''s can do a lot of the work for you in terms of story and interaction, but the best you can hope for is a sort of Sims type world. Granted, that will be pretty cool, but if you have any of the degree of functionality that the Sims have you should expect to be doing a huge number of animations in your 3d implementation.
For instance, stealing just uses the GET action but of course causes other things to happen like maybe lowering the NPC''s repuation with the law if he''s caught, etc.
>----------My Reply
After I posted that message earlier today in AI, I got down to fleshing out the implementation of such a system. It''s sort of tough truthfully. You are going to need with certain factors when establishing a goal-based planning system for your characters. They need to be interruptible (if the ai is doing something, it can respond to something more urgent), the ai needs to remember things or it could end up in endless loops (gets hungry, goes to get food, doesnt have money, goes to make some, gets hungry and leaves before finished...), the ai needs to understand what specific achievements will advance its goals. Basically, the last means you will probably have to create specific plans of action on your own, under each category. It seems that you are interested in developing a non-deterministic system where the npc''s can do a lot of the work for you in terms of story and interaction, but the best you can hope for is a sort of Sims type world. Granted, that will be pretty cool, but if you have any of the degree of functionality that the Sims have you should expect to be doing a huge number of animations in your 3d implementation.
quote: Original post by BrianSchulman
You are going to need with certain factors when establishing a goal-based planning system for your characters. They need to be interruptible (if the ai is doing something, it can respond to something more urgent), the ai needs to remember things or it could end up in endless loops
Yes I believe I have what you are talking about basically implemented. Goals are in a linked list.
Each node has a
int priority; // priority of goalbool active; // is the goal active?bool finished; // is the goal finishedchar *state; // state of goal - used for subgoals
amongst other values of course
So, a goal becomes interuptable because another goal may have a higher priority. Once that goal with a higher priority is taken care of, its active variable is set to false and finished variable is set to true for that goal.
Technically it should be deleted from the linked list but I'm not too concerned about that stuff yet. Then this goal would not be processed again unless one like it was added to the list again. So, now if the previous goal that was next in line has the next highest priority, it will now take up where it left off. So the priorities would take care of the initialization of a plan or goal.
Each goal would have a char *state variable which tells the goal what state it is in. Some higher-level goals will have more than one seperate goal to go through in order to achieve the final goal.
For instance Kidnapping goal may require:
- MOVE to NPC that you want to kidnap
- TAKE NPC
- Message is sent to kidnapped NPC to follow kidnapper NPC
- Kidnapper NPC goes to a hideout of some sort
- Kidnapper must lock NPC up
There may be some details missing but basically the point is that as each stage in the plan is finished (if it is not interrupted) the char *state variable will change to let the goal know what stage it is in.
I think this is where I am getting into the pre-computing the plans which is okay with me.
quote:
It seems that you are interested in developing a non-deterministic system where the npc's can do a lot of the work for you in terms of story and interaction, but the best you can hope for is a sort of Sims type world. Granted, that will be pretty cool, but if you have any of the degree of functionality that the Sims have you should expect to be doing a huge number of animations in your 3d implementation.
Yes that is exactly the idea (not just mine. Wavinator has a lot of thoughts on this too and he originated it). I am not too concerned with animations right now. I am more concerned with how well this will work in terms of gameplay and game design. I wanted to see if this would suffice for an interesting story where NPCs are scheming, backstabbing, working together and against each other and against the player.
A CRPG in development...
Need help? Well, go FAQ yourself.
Edited by - Nazrix on December 26, 2001 7:23:08 AM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
I think we are all on the same page, but if you're curious this link kind of explains the origin of this basic concept:
http://www.gamedeveloper.net/ubullboard/Forum12/HTML/000010.html
Also these guys have many similar ideas and I've been trying to digest what they have to say as well.
A CRPG in development...
Need help? Well, go FAQ yourself.
Edited by - Nazrix on December 25, 2001 9:24:33 PM
http://www.gamedeveloper.net/ubullboard/Forum12/HTML/000010.html
Also these guys have many similar ideas and I've been trying to digest what they have to say as well.
A CRPG in development...
Need help? Well, go FAQ yourself.
Edited by - Nazrix on December 25, 2001 9:24:33 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
How do you distribute your messages in the world... are your npc''s event driven? Or, did you implement an AI Manager object which distributes the messages?
Secondly, if you wanted to incorporate "area messages" such that all npcs in an area can read a message, what do/would you do? Give a position (x,y,z) of the message and a radius (r) of how far out that message can be percieved? I guess this is what I would probably do. It would be handy for sound messages, such as explosions, cry''s of help, etc.
Secondly, if you wanted to incorporate "area messages" such that all npcs in an area can read a message, what do/would you do? Give a position (x,y,z) of the message and a radius (r) of how far out that message can be percieved? I guess this is what I would probably do. It would be handy for sound messages, such as explosions, cry''s of help, etc.
quote: Original post by GalaxyQuest
How do you distribute your messages in the world... are your npc''s event driven? Or, did you implement an AI Manager object which distributes the messages?
Yes the messages are event-driven. Although the goals of each NPC is processed each iteration. So every iteration it will look for the goal with the highest priority will be processed but messages are event-driven.
quote:
Secondly, if you wanted to incorporate "area messages" such that all npcs in an area can read a message, what do/would you do? Give a position (x,y,z) of the message and a radius (r) of how far out that message can be percieved? I guess this is what I would probably do. It would be handy for sound messages, such as explosions, cry''s of help, etc.
yes that''s exactly what I''m doing.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
I like your idea! Its similar to one I had a while ago when I was thinking of ''it it possible to make a completely rpg generator?''.
Your implementation of npc interation is much better than mine =)
A few things to think about: What does the entity do when all of its objectives are finished?
My suggestion: wander (which can''t be finished). At least he looks like hes doing something. That way, hes busy until it comes time to eat or sleep.
Another thing, about the common knowledge part. You should have a variable which tells how much common knowledge a person has. Many split the common knowledge into X levels.
The bartender would know it all. The drunk may be restricted to just 1 level.
Most people would know varying amounts.
That way you dont have this happening:
Player walks to Entity1 and says "where is the sword?"
entity1 replies (in great depth) over the hill and in the forest.
P1 walks to E2 (wanting more practical knowledge) and asks were is the sword?
He gets the same reply
Entity 3 gives the same response.
Entity 4 gives the same response.
If you split it up, you could have higher knowledge levels selected to give information
so entity 1 would tell you over the hill and through the woods.
Entity 2 would say in "Insert Name" forest
Entity 3 would say to the south
Entity 4 would say buried under a stone tablet, which you need to ask a wizard the magic phrase.
Just tossing ideas, not sure the best way to implement that sort of system
Your implementation of npc interation is much better than mine =)
A few things to think about: What does the entity do when all of its objectives are finished?
My suggestion: wander (which can''t be finished). At least he looks like hes doing something. That way, hes busy until it comes time to eat or sleep.
Another thing, about the common knowledge part. You should have a variable which tells how much common knowledge a person has. Many split the common knowledge into X levels.
The bartender would know it all. The drunk may be restricted to just 1 level.
Most people would know varying amounts.
That way you dont have this happening:
Player walks to Entity1 and says "where is the sword?"
entity1 replies (in great depth) over the hill and in the forest.
P1 walks to E2 (wanting more practical knowledge) and asks were is the sword?
He gets the same reply
Entity 3 gives the same response.
Entity 4 gives the same response.
If you split it up, you could have higher knowledge levels selected to give information
so entity 1 would tell you over the hill and through the woods.
Entity 2 would say in "Insert Name" forest
Entity 3 would say to the south
Entity 4 would say buried under a stone tablet, which you need to ask a wizard the magic phrase.
Just tossing ideas, not sure the best way to implement that sort of system
January 26, 2002 05:58 PM
quote: Original post by Nazrix
Yes, I am thinking of implementing it in 3D. I wouldn''t have to, but that''s my plan. I am doing this now using a 2D environment as a testbed though.
Why don''t you try and just write it like a text adventure first? It will have quicker results in terms of showing off the AI and will show if your ideas work. If they do, then do a full blown 3D game.
People are too interested in graphics nowadays.
quote: Original post by Anonymous Poster
Why don't you try and just write it like a text adventure first? It will have quicker results in terms of showing off the AI and will show if your ideas work. If they do, then do a full blown 3D game.
People are too interested in graphics nowadays.
yeah I started w/ text, but then wanted to put it into a 2d or 3d environment to show graphically what is happening...eventually text was not enough to show how the NPCs were moving and interacting
A CRPG in development...
Need help? Well, go FAQ yourself.
"You shouldn't drink to forget your problems. You should only drink to improve your social skills." - Barnie
Edited by - Nazrix on January 27, 2002 3:49:13 AM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement