I am creating artificial intelligience for a very basic game I am making for my School's Science Fair.
So far I have created a Hunt_ Function for my AI so that he will be rotated towards the Sprite current position and will automatically move there in order to chase the sprite.
I am trying to make, the AI more "human" by having actually run in front of the player so that it is like playing tag. I do not want AI to run the the current position of the player, but to slightly in front of the player based on his velocity.
My idea was that I would find the player's current rotation point and then multiply his velocity by X number of seconds to find a distance in front where I could rotate my AI to move to. It would be in a loop so that if the player suddenly turns around(which i'm sure he would) the AI will react and started heading the other direction, and not directly at the player, more towards the calculated distance in front of the player.
I compiled my project into a zip file and attached it. I havn't added much relative code to it(none really), but you can tinker with it as well as help me out. I am working on figuring it out, but I havn't learned trigonometry yet, so I'm having to self-teach myself this. (I don't even know if trig is involved)
Beginning Programmer
Professional Nerd