I've been working on a vertical shooter and right now I'm tackling enemy A.I. using self constructed paths. I've got things working so that each enemy sets its next WP, the speed it should use to get there and if it should pause when reaching it.
The thing is that all the movements are strictly linear and as you may know, this is hardly the case for enemy movement in vertical shooters. So i was playing around trying to implement B�zier curves which i had some real problems with. Eventually i got it to work using to points in space and one control handle, a Quadratic B�zier curve.
The problem i have though is that the formula i got working isn't taking into account the enemy speed, but only moves along the curve by setting X/Y positions each tick. Secondly, this isn't time based animation taking into account the delta-time which will make the animation slower on slow machines. How can i implement a constant time based animation across a B�zier curve?
This is the code I' am using:
<img src="http://i.imgur.com/wpOrzY7.png" border="0" />