Summary
I’m pretty sure AI is not what you imagined; you are not creating Skynet here, but we have accomplished a simple but interesting AI to challenge our players, which we can iterate and tweak to tailor to our game’s expected behavior. We saw how to gather our surrounding information through sensors to make decisions on what action to execute using FSMs and different Unity systems such as Pathfinding to make the AI execute those actions. We used those systems to diagram a state machine capable of detecting the player, running to them, and attacking them, and if the player is not there, just going to the base to accomplish its task to destroy it.
As we move on to the next chapter, we’ll shift our focus to another vital aspect of game development: enhancing the graphics and audio. Get ready to dive into creating materials and shaders that will bring your game world to life.