This project gave me the opportunity to experiment with creating an enemy AI with C++, blackboard keys, and a behavior tree. The purpose of this project was to create and enemy AI that would patrol the area until it detected the player, it would then chase the player. If the player lost the AI, it would then return to patrolling the area until it found the player again.
With this practice, I was able to learn about the relationship between blackboard keys and a behavior tree. I was also able to practice my programming abilities, by creating the AI controller, each blackboard key that the NPC uses, and their effects that they give the NPC. For my first attempt at creating an AI with only C++ this project came out extremely well, despite the time it took to create and learn.
As I mentioned, this project was time consuming to make due to the intricacies of creating an AI with C++ rather than blueprints. However, it served as a great learning experience that also gave me some extra C++ practice. While creating this project, I learned some ways to optimize my workflow while programming. I find it best to make progress in bursts, go back over my code to check for errors, then test the code to make sure it functions properly. In the past, I've made the mistake of making too much progress without bug checking or testing, leaving me with a mess of errors that end up being tougher to find. Previous feedback that I had received was to smooth out the AI's movements as they caught up to the player. By adding some cooldown time when the NPC reaches its target I was able to achieve this creating a smoother more natural looking chase from the NPC. Next steps for this project would be to enable the NPC to attack when in range of the player. Combining this trait with the smoother movement will create a more natural looking experience for the player.







