You have to press the green flag a few times for it to load properly. Version 2 Changes [ Press space for random, up arrow for pathfinding. Move the dots for him to follow in rainbow order. Make sure there is quite a bit of distance between them. ] Version 1 [ So basically this is a very basic AI for game enemies. What happens is that it moves randomly but still somewhat realistically. If you mouse cursor enters its field of view, the grey fields around it, it will start chasing it. Change all instances of mouse to the character, and you can use it for simple enemies. You do need to make relatively similar corresponding sprites for the FOVs, and they unfortunately cannot be fully transparent for it to work. ]
This is free for anyone to use, but please credit me. If I know people are using this, I can make more and better AIs. I made this for @Mytymaxbuyg 's The Scratchrooms game. Let me know how well it works in the comments.