Posts

Showing posts from February, 2019

Conversations

Image
To make the guards more believable, as they are patrolling around the scene, should they cross paths with another guard, they will stop to have a conversation with them.  This helps break up the predictability of the guard's patrol, as once they have finished with their conversation they may end up travelling in a different direction to what they had originally started upon finding a new patrol destination.  It will also start to lock off paths that the player can travel down as there will be at least two guards standing in their way. The converse path in the tree is part of the IDLE  SelectorNode and takes priority over the patrol nodes.  shouldConverse is a SequenceNode that has three children; Attempt Conversation This node is used as a conditional check that ensures that the agent hasn't recently had a conversation.  This stops the guards from being in constant conversations either with another guard that walks past or reenters conversation with the previous guard. 

Creating a realistic NPC search

The way NPCs search in games helps create believably and makes the NPCs seem more human, as they go about searching for stimuli that they are reacting to.  There are different types of searching an NPC can, and should perform depending on the situation and the stimuli, (Welsh, 2015) breaks these types of searches down. When an NPC is performing a cautious search, this should be because "the NPC has been alerted, but does not know whether their target is hostile." (Welsh, 2015).  This can be caused by sounds using techniques different games employ, such as in Metal Gear Solid, the player can knock on a wall, or in other games the player can make a verbal noise such as the whistle in Assassin's Creed. Another type of search that (Welsh, 2015) talks about is an aggressive search, this is where the NPC knows that what they are searching for is hostile, some stimuli to this could be spotting the player or hearing a hostile sound such as a gunshot. It is important to tele

Changing Patrol Logic

Image
Originally guards would have an array of way points individual to each guard.  Whenever a guard reached their destination, that guard would select another way point at random and begin moving to that position. However this method makes the guards move in a very predictable way, as once they player figures out the way points, they'll know where the guards are going to move to.  I wanted to make this more believable, so I changed their behaviour from a straight " seek " to a " wander " behaviour.  This was an attempt to make the guards move around in a more sporadic way and be harder for the player to predict their movement. To achieve this I created a wanderRadius around each of the guards and used a method to return a random point from within that radius This method would create a random point in the scene and test that it is accessible on the NavMesh to allow the agent to move there, if the point was unsuccessful it would call the function again un