While StarDiver is a story-first RPG, ship combat is a core game mechanic. So a good AI is a big deal to us! It is truly a make or break for the game. We have now completed the AIs for two or the 25 unique ships in the game. We have many more to go, but it is crazy fun to both fight the AI and even to watch the AI fight another AI.
For those not familiar with StarDiver gameplay, ships offer direct, arcade-like controls -- no boring RTS movement here! It also features a finely tuned physics and damage system. Ships parts can be blown off. Lose a right engine and your remaining left engine will offer asymetric thrust. Lose a right turning thruster and you better get good at only turning left. We have spent countless hours getting our control system tweaked so that game controllers, mouse-keyboard, or keyboard-only all feel excellent and responsive. So, what does this mean to making a good AI? It means it is quite a bit more difficult!
The AI system needed to simulate player inputs. If a player can't do it with the controller, neither can the AI. With our physics and damage systems, the only way to keep it all feeling 'right' was to create the AI code to simulate controller inputs based on what is currently going on in the battle. No small feat, but we did it.
Setting a test scene up with two AI ships and watching them duke it out was pretty rewarding. After tuning the Krex and Benev AIs a bit, the Benev won 6 out of 10 battles. Pretty even AIs!
The gifs inline are great and all, but for the full splendor of it, watch our 1080p/60fps full battle videos below.
Krex AI vs Benev AI
Krex AI vs Krex AI
Benev AI vs Benev AI