Enemy Behaviors
Up until now enemies ran on a simple state machine. Wander around, find a target, attack. I wanted to give them more to work with.
The tools I was using were a pain to work with so I built a custom behavior tree system called Agent Brains. This gives me control over how the system works and how I put behaviors together. I've used it to build an enemy that can follow and track the player, predict where they're going and try to intercept them.
Getting attacks to connect with a fast moving player was one of the interesting bits. If the enemy waits until you're in reach to start swinging you'll already be gone before it hits. Now it checks your velocity against the time its attack takes and starts the strike before you arrive. So flying past an enemy doesn't mean you're safe!
They also remember where they last saw you. Breaking line of sight sends them to that spot to keep looking. You'll need to get out of sight and stay hidden if you want to lose them.
I've also started populating worlds with enemy bases. Those are beginning to take shape too.
