Tech Blog - Week 4
- Ryan Vafiadis
- Jan 27, 2017
- 1 min read
Updated flee functionality to use a random point in a sphere instead of a circle. Tweaked distance to flee and created flee-timer. Organized timer functionality into a manager function. Bugs when switching between states, perhaps the queue of actions is bloated? Created queue functionality to remove duplicate states, uses recursion, need to test further.
Changed state machine so that the evaluate function exists in the update function. Will test the use of time for evaluate behavior. Made the chase behavior go in a random direction when strafing toward player. Implemented a chase countdown to accompany the flee countdown.
May implement a system to weigh action costs for smarter state changes.
Created a distance check on attack, and a behavior changes when distance is too high.
Created a target lock to manage multiple target change when there are various targets in view.
Altered AI to use co-procedures for all behaviors. This greatly reduced in-game lag.
Comments