(The blue lines are my algorithm, the red ones are TheLogFather's original code) Demo of a possible curve algorithm for TheLogFather. It's a very simple algorithm - basically the same algorithm as a heat-seeking missile: it moves in the direction of the target (the next point in the list) and turns towards the target after having moved a short distance in a straight line. I've tweaked it a little to pull tighter turns when the target is behind where it is aiming. I learned this algorithm from the code that ProdigyZeta7 wrote for my Tailgunner project - in that case it was a 3-dimensional curve and had to handle the orientation of the spacecraft along the curve, which made it a great hack because the alternative was to model the aircraft using quaternions to handle the roll and 3D splines for the path - way too complicated! I've implemented this using trig, however an even easier implementation that is usable in some games is to literally follow a target sprite around (using 'point in direction of sprite' rather than calculating the angle between you and the target using atan2) The algorithm exhibits inertia when making turns. If that's unwanted you can just run the calculation using the array of points in reverse order, in which case it will turn before the point and exit it in a much more direct direction. Because this algorithm avoids really tight reversals it is suitable for motion-planning for games with vehicles of all descriptions.
I left the test harness in place from TheLogFather. I've tweaked the drawing procedure so that it closes the curve, which means that the curves match those of TheLogFather even less than they would have. There are several parameters that can be tweaked to adjust curve tightness. WARNING: there's a bug where the code might will chase its own tail if there are two consecutive points too close together... It's caused by overshooting the target and going into orbit around it! Fixable, I just haven't put in the effort yet. (This is still a demo, not a final release)