No, not that type of AI. I’ve implemented the first steps into what will become the controller for all mobs in the game world, whether it is enemies patrolling or attacking you, NPCs going about their day, or critters in nature. Currently I have some rabbits that hop around naturally, stop to feed every once in a while, and run away when the player gets too close.
Ironically, AI did help me in debugging an issue I was having where the bunnies were deciding to ignore the ground when running away blindly, or turning in unnatural ways when moving between feeding pauses.
For the bunnies, I want to add burrows which they will try to run towards when approached by a predator or human, and to which they will naturally anchor, not straying too far, and perhaps returning to their burrows at night instead of staying out 24/7. I might even expand this so that the bunnies have a reproduction cycle and new burrows appear with higher populations if not kept in check by predators.
The code for the bunnies work on state machines, so it can be applied to all the initial examples, which I am excited about to give the world a bit more of a dynamic, lived-in feeling instead of NPCs just always being on one spot, sort of like Skyrim, where every NPC has a life and routine.
Leave a Reply