Presentation is loading. Please wait.

Presentation is loading. Please wait.

Xavier Otero Keil.  Animation  Control characters body  makes sure that animation fits situation  handles requests to perform actions  Combat  Possibly.

Similar presentations


Presentation on theme: "Xavier Otero Keil.  Animation  Control characters body  makes sure that animation fits situation  handles requests to perform actions  Combat  Possibly."— Presentation transcript:

1 Xavier Otero Keil

2  Animation  Control characters body  makes sure that animation fits situation  handles requests to perform actions  Combat  Possibly most important subsystem  Determine tactics  Behavior  Highest level, has precedence over other systems  Sets broad goals like a CEO  Movement  Determine how to move (path finding)  Not where to move

3  Plays pregenerated animation mostly  Some animations take control of entire character such as dying  Others require only a specific part  Arm waving  Head turning  These are more complex because more than one can be applied at one time  Needs to be aware of which animations are playing (if currently arm waving stop before attacking)  Gathers information from other Layers

4  Generation of context related animations on the fly.  Generalizing the position of objects.  Causes problems with believability.  Modern games do not take this shortcut  Solution similar to robotic arm movement

5  Basically a path finding system  Given a starting point uses a database of how the level is laid out and the A* search  Dynamic obstacles create a problem  http://www.youtube.com/watch?v=UZf89ejZ avc (example of bad dynamic obstacle handling) Quake 2. http://www.youtube.com/watch?v=UZf89ejZ avc

6  You can use Local path finding to solve this problem  Integration of physics system and movement system  Uses global path finding as a guideline then polls the physics system for dynamic obstacles and adjusts accordingly  Crysis with local path finding turned off http://www.youtube.com/watch?v=FA6SYhFH S6M

7  Spatial Reasoning  Humans are very good at this almost second nature  Most games embed hints for the AI into the levels like the anchors in Far Cry  This creates a tactical database that allows the computer to simulate an understanding of Spatial Reasoning  Again problems with Dynamic Obstacles

8  Solved with geometrical analysis.  Uses a lot of processor power  Dynamic object tagging  Changing Battle Environments  http://www.youtube.com/watch?v=pWyoQoEgPBA &NR=1 (Crysis Nuke Gun) http://www.youtube.com/watch?v=pWyoQoEgPBA &NR=1

9  Very basic selection of combat tactics  Camp  Joust  Circle of death  Ambush  Flee and ambush  Generally a FPS will have far more tactics in its arsenal. However these basic ones give insight into how the tactical selection is done

10  To-hit roll random number  If in the hit threshold attempt to hit  Otherwise attempt to miss  With high damage weapons always miss first shot  Takes into account environmental variables  Prevents perfect accuracy which can be frustrating

11  When attempting to hit  Angle of animation does not have to match angle of shot  Most games use bounding boxes for collisions with bullets and other objects  Choose random point near the center  When attempting to miss  Shoot too close to the target could possibly hit  Too far away AI looks stupid  Want shot to be visible and audible. Alert player to enemy presence and create feel of tension  Some games place invisible markers in player character models of good places to shoot at in order to miss  Always test shots (ray-testing)

12  Makes the AI look really bad if it happens too often  Use ray-testing to avoid this  Sometimes it can be used as a player reward  Player dodges out of the way so a rocket launch hits an enemy behind him  In this situation auditory acknowledgment by the offending NPC is a good idea “Ohh **** sorry Hank”  Some games solve this problem by simply not accepting damage from friendly fire. This is a poor solution, if it becomes obvious players feel cheated

13  If a hit is necessary use dead reckoning  Can produce over accurate fire  Radius testing is a another way  Projectiles should report back to the AI

14  Should be range of searching behaviors  Not sure player is even in the search area (Idle searching)  Maybe the player is there (normal searching)  Sure the player is there (intense searching)  Multiple Paths  Low efficiency searches

15  Wander about aimlessly or follow a set patrol schedule  Should not use the players location in calculations at all as this is usually detectable by the player  If the player is seen do not immediately drop into combat unless the player is very obvious or firing at you  http://www.youtube.com/watch?v=3nzMdP wO2Qw http://www.youtube.com/watch?v=3nzMdP wO2Qw

16  NPC has caught a glimpse of the player  Should scan the area where it “saw” the player and then give up after a short time  Should immediately drop into combat mode if the player is seen in this stage  At this point upholstering of weapons or unsheathing of swords is appropriate

17  This should be activated if the NPC sees the player go somewhere where there is no escape or has attacked or been attacked by the player  At this stage for believability the NPC should not give up until it finds the player or a very large period of time has elapsed.  Games where the give up time is too low seem unrealistic.  Should use actual player location in calculations but add a randomness factor so the NPC does not make a bee line to the players location.

18  Sensory Perception  Darkness levels and sound levels  Alertness levels  Auditory cues  Thief 3 http://www.youtube.com/watch?v=9sSICYp8ssIhttp://www.youtube.com/watch?v=9sSICYp8ssI  Perceptual Modeling  Visual  Auditory  Tactile  Increasingly all first person shooters are employing stealth elements for believability

19  High Level command issuer  Chooses between states such as Idle, Patrolling, Combat, Searching etc… then notifies the other layers of what they need to do.  Generally a Finite State Machine  Very important for believability especially in idle and combat modes  Often times uses triggers in order to choose a state.

20  Has become very popular in recent years  When done well highly increases the immersion of the player  What the AI needs  Follow commands  Not get in the way  Follow logical rules  Interact with the player  Survive until the end of the game

21  Generally stay out of field of view  Prevents friendly fire and view obstruction  During points of non combat teammates should occasionally appear in the field of view to reassert that they are there  Use auditory cues during combat for this same purpose

22  When there are multiple targets there are two options for staying out of the players field of view.  smallest angle  viewing angle

23  Should be maximum distance set that the NPC’s can wander away from the player.  Let the player be the hero  take no risk unless ordered to  Don’t be first through doors, choke points, over hills etc…  Generally good practice to match the player’s actions.  Many games “cheat”  Rainbow Six Vegas  Match player speed to avoid annoyance

24  NPC’s should be secondary to the player  Should never perform better than the player  Select weapons that are similar or less powerful than the players weapons  Always allow the player first chance to collect items  Should report all sightings of enemies before attacking unless currently under attack http://www.youtube.com/watch?v=yxQ- 09OcIP0

25  All these rules can apply to enemy teams as well  One NPC should be team leader and treated as the player  Mimics normal team dynamic

26


Download ppt "Xavier Otero Keil.  Animation  Control characters body  makes sure that animation fits situation  handles requests to perform actions  Combat  Possibly."

Similar presentations


Ads by Google