Difficult to get the timing correct

I had a lot of trouble with the exercise for this lecture. The difficulty was in sorting out the timing of the movement of the enemy ship in relation to the player ship. If you begin the movement at zero as shown in the video if the enemy ship is any distance from the start the movement is complete before the player ship gets there, whereas if you choose an enemy close to the start the player zooms past before the enemy ship has completed any significant movement. I suppose there are solutions such as making the first key point later than at the zero point or adjusting the speed of the movement to fit in with the player ship speed but thew whole thing feels fiddly and somewhat like juggling lots of variables at once i.e. when you adjust one thing it spoils the ones that you sorted out previously. I must admit that in the end I got something that just about worked and left it at that, based on the implied messagein the lecture that better ways of getting the thing right would be shown in later lectures.

Privacy & Terms