My primary goals with this project was to learn more about creating Autonomous Agents using state machines in Unity. The solution I landed on involved using an enum Property that would switch out Coroutine behaviors.
Animation
Using Pyxel Edit I made some simple animations for the all the characters in the game.
I especially focused on making the dog as friendly and expressive as possible to give it personality and keep the player attached.
State Machines and Coroutines
All of the characters types in the game use state machines and coroutines to drive multiple behaviors.
Below is a sample form the Person class that runs away from Grim but not when the friendly dog is nearby
Getting the chickens to flock together while keeping them autonomous was one of the biggest challenges I had to tackle.
What I ended up on is this Coroutine that Seek chickens that are far away and transitions to FLEE when the player or dog gets close.
This keeps each of the chicken independent so that some can flock and regroup while others flee