So I’m learning that none of my previous video game AI work is relevant anymore. Project Fly (my team’s current project) is in real time, so I need to approach AI in a new way. I pulled out a lot of hair, and finally had a thought.
Yes, one thought.
“What does an enemy want?” Before this game, I always worked with turn-based AI. It was all very “computer-y” in the sense that the enemies were interesting to compete against (sort of, but they achieved this state in a way that is very non-human. For example, in The End Begins, my previous game, the enemies categorize player actions and react based on their running list of player tendencies. This fails in real time and isn’t how most humans play. On top of that, the AI in The End Begins doesn’t really change much between enemies. There’s hardly room for variety.
So back to my epiphany-question. Why is it important? Well, I think that humans play this way. See, I had the issue of enemies in Project Fly either being useless or too perfect. They either had hardly any AI or followed the player perfectly, so I thought “what makes it so that I can shake a human player off of me?” It has to do with conditioning. No, not the hair kind. If I let my opponent pursue me and get close (assuming they want to be close), he will become complacent and his reaction time will become dull. Then, I pull a sharp turn. My opponent is taken by surprise and I escape pursuit.
By this logic, an enemy has its own unique set of things that it likes and dislikes. For example, the Kitsune is an enemy in the game. This enemy loves lower speeds and keeping its energy low (constant attacks). Kitsune are easily agitated but also prideful. This means that the way to beat one, you must play with it a bit. Engage in a slower chase and let the Kitsune feel good, then pull an advanced maneuver and surprise it. Its reaction time will suck and it will start to flee. Now, this means it will go fast, which it hates. This will cause it to become sharper and eventually go on the offensive again. And so, the cycle continues. 😀
Reaction time will also scale slightly with health, so some enemies just naturally become duller (or sharper) as health declines.
I’m hoping that this system will be both effective and easy to implement. Thoughts???