Making progress
🕑 Added 2023-10-02 09:52:28 +0000 UTCAn insecurity I had about moving forward with scripting/making the state machine video was that I didn't have enough experience/evidence gathered to support the core thesis. Luckily, gathering evidence involves making progress on my game, so this is win-win as far as I'm concerned. Here's a little peek of some ideas I've been playing with.
Enemies can emote the state of their awareness system more visually through eye color.

Enemies awareness systems can communicate with each other in appropriate situations to track the player, currently visualized as little lines drawn between their antennas.

The enemy behavior state machine has been updated with a new state to search for the player when the player is lost.

The terrain system has been augmented with support for tall grass that can be hidden in or cut, which the enemy awareness system takes into account.

There were a few deliberate design decisions in the enemy search behavior that might be interesting to highlight here:
- The search state is itself associated with a simple move-look-pause cycle.
- Every cycle, the target position is selected as a random navigable point on the screen (rather than a random point in the world). This keeps the movement interesting because paths across the screen are more likely to run into the player.
- The head orientation during movement is biased to look away from nearby walls (by raycasting), which is a simple rule but produces convincing-enough results.
- The movement acceleration profile and top speed during searching is a lot more gentle, giving the player time to anticipate and avoid the enemy, as well as projecting a more exploratory personality.
I think so far these developments have been a positive sign that the approach I'm taking is effective. The robot characters are starting to show pretty convincing individual and group behaviors in all sorts of different situations, without needing any situation-specific code.