ShackRPG: Basic Enemy AI
And when I say basic… i mean VERY basic! I was planning on doing a complete enemy AI with patrols, running away when health got low, etc… but then I realized this is only my first project and AI can get VERY complex, VERY quickly. I instead started working on a few mindsets for my NPCs, including:
Guarding – Enemy is guarding a specific location and if hostile, will aggro player. Will chase you until NPC becomes non-aggresive.
Standing – Enemy stands in a specific location, and will not aggro unless attacked.
Patrolling – Enemy will patrol between two or more points, and aggro the player if hostile.
Aggressive – Enemy will activly persue player and attack when in range.
I was looking into a lot of different things for making this work, including some pathfinding (like that used in some RTS games, search google for A* if interested) but a lot of that is a little more advanced than I would like to get into right now. While not the most interesting AI, this works for the very basic demo I’m putting together.
Up next? Finish the AI, and start on quests! Video of me playing around with enemy aggro is below. Enjoy!