The Child Arms beta is almost ready and the last few of my tasks was to create the enemy AI. While I was working on it, a thought came to my head. Years ago, I had no idea how to implement AI for a fighting game. This was a feature of games that seemed so difficult to grasp and there was little content on the subject, including YouTube. I had no choice but to figure it out by myself. Nowadays, there are plenty of videos talking about the subject, which I am thrilled as it is a subject I am very interested in. I figured it may help others if I gave the process of how I implement the AI for the beta, so I present to you a video collecting the process each step of the way. Though let me clarify that this is just a beta and the AI was meant to be kept simple. The full version of the game will clearly have a more robust AI but for testing purposes, this will do just fine.
While browsing to topic on YouTube recently, I learned about how some AI doesn't strive to be realistic, just challenging. I always thought that the idea behind making an AI was to get human like accuracy out of it, as if the opponent was being controlled by an actual human, but I soon realized that, while other non-gaming applications strive for this, video games do and should not. These AI only aim to provide just enough of a challenge that the player feels satisfied with the difficulty. So instead of trying to make the AI as close to humanly possible, I decided to scale back and just make it challenging enough that the player feels liked they accomplished something when they finally defeat it.
I recalled a a player who played a previous game of mine. He beat the easy and medium mode but hard was giving him a bit of trouble. He made it to the final boss but it kept getting the upper hand. Then suddenly, just randomly, the computer AI decided to make the final boss run away. The player eventually took advantage of this and manage to defeat it. I consider that a flaw as the boss should've been able to defeat the player. In fact, if I see this happening again, I will fix it. Yet it also showed me something: After many failed attempts, the player felt very satisfied that he finally beat the boss in hard. It was then that I realized that, while being a flaw, the computer AI should not be perfect. It shouldn't strive to block every attack and attack you with 100% accuracy. It should be difficult but show flaws to give the player a chance, even in the highest difficulty levels. So in the end, Child Arms will strive for challenging gameplay but will consider difficulty levels and show flaws as a way to balance out it's computer perfect nature.
Of course, these are my opinions. I'm sure others have their own methods, and I happen to still have an interest in computer controlled opponents, so feel free to share your thoughts about AI.
With all that said, the beta is almost finished. Just a few more things to check off in the to do list and hopefully it'll be here by next week. So if you want to check out the beta when it comes out, please follow Toolkitz on Facebook, Twitter, and right here on IndieDB.