Need AI Ideas
I am currently working in the design of a FPS, and I was wondering how feasible it would be to make a function that would have an attacking NPC ''chase'' a fleeing player in somewhat the same fashion as a person. say for instance there are 2 room,s joined by a hallway, and the second room has another hallway and an object large enough to hide the player:
___________________________________
| ______________ |
| | ______| |
| room | ______ room |
_| #1 | | #2 |
_ | | O |
|---------| |__________|
The idea is the player would run in through the door on the left side of room 1, shoot an NPC in there, and run to room 2 and down the other hall.
I want the NPC to chase the player down the hallway, but when he gets to room 2, I want him to stop and try to evaluate where the player could have ran to and then systematically check those places. Although naturally as long as he is in range to ''hear'' the player, he would always know where the player is so long as the player is not behind thick walls.
~Vendayan
I think you should structure the NPC''s knowledge around such concepts as pursuit, hiding, dodging, and taking cover. Try to encapsulate the concept of a ''hiding place''; in other words, give the NPC the various features which define a hiding place, such as the fact that it should be big enough to hide whomever is hiding, it should be opaque, and it should be habitable.
This way, the NPC won''t look in acid vats, glass containers, and shoeboxes. If you wish, simply hardcode every conceivable place in your game which is a potential hiding place as a ''hiding place''.
Give the NPC knowledge of flushing out tactics. Examples might be tear gas, playing wounded, silence, lying in wait, etc.
In essence, tackle the problem from a knowledge standpoint.
This way, the NPC won''t look in acid vats, glass containers, and shoeboxes. If you wish, simply hardcode every conceivable place in your game which is a potential hiding place as a ''hiding place''.
Give the NPC knowledge of flushing out tactics. Examples might be tear gas, playing wounded, silence, lying in wait, etc.
In essence, tackle the problem from a knowledge standpoint.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement