ai for enemy ships in asteroids
I'm working on an asteroids clone and I've been trying to put in some AI ships to chase you around some of the higher levels. The best approach to this that I've come up with so far is to use the enemy's coords (x,y,th) to generate two points, one pi/4 (and 100 out) to the left of the direction the enemy is facing in, and one to the right. I then calculate the distance from these points to the coords of the player's ship and turn the enemy towards the shorter distance. The problem with this is that it produces very twitchy, unnatural motion. Does anyone have another approach to this that looks smoother / is more challenging?