Everything returns to Newton's equations:
F = m * a s = s_o + v * t + a * t^2 / 2 v = v_o + a * t
In this case, F is the force (thrust), a is the acceleration, and m is the mass of the ship. s is the current location, s_o is the original location, v is the speed, and t is the current time.
Of course, this is a straight line, so if you want to convert to two or three dimensions, you will need to do the math. F , s , v and a are all vectors, which means that their direction is equally important. Technically, t also a vector, but since time usually goes in one direction only, we need not worry about that.
2d: F^2 = F_x^2 + F_y^2 (use Pythagorean theorem to split force into components) F_x = m * a_x F_y = m * a_y s_x = s_o_x + v_x * t + a_x * t^2 / 2 s_y = s_o_y + v_y * t + a_y * t^2 / 2 v_x = v_o_x + a_x * t v_y = v_o_y + a_y * t 3d: F^2 = F_x^2 + F_y^2 + F_z^2 (surprisingly, this works) F_x = m * a_x F_y = m * a_y F_z = m * a_z s_x = s_o_x + v_x * t + a_x * t^2 / 2 s_y = s_o_y + v_y * t + a_y * t^2 / 2 s_z = s_o_z + v_z * t + a_z * t^2 / 2 v_x = v_o_x + a_x * t v_y = v_o_y + a_y * t v_z = v_o_z + a_z * t
Now, to adjust the speed in the direction of the player, you have a fixed total force ( F ) to change the current speed to the player. In physics, everything does not happen instantly, but your goal should be to minimize the time at which the change ('t') occurs.
This gives you an equation in terms of your current location ( (s_o_x,s_o_y) or (s_o_x,s_o_y,s_o_z) ) and the current location of your opponent or your target location ( (s_x,s_y) or (s_x,s_y,s_z) ) for your target speed (ignores acceleration).
v_x = (s_x - s_o_x) / t v_y = (s_y - s_o_y) / t v_x = (s_x - s_o_x) / t v_y = (s_y - s_o_y) / t v_z = (s_z - z_o_y) / t
We can substitute this for our other equation:
(s_x - s_o_x) / t = v_o_x + a_x * t (s_y - s_o_y) / t = v_o_y + a_y * t (s_x - s_o_x) / t = v_o_x + a_x * t (s_y - s_o_y) / t = v_o_y + a_y * t (s_z - z_o_y) / t = v_o_z + a_z * t
Then we decide the acceleration (this is due to the force that we are trying to calculate).
(s_x - s_o_x) / t^2 - v_o_x / t = a_x (s_y - s_o_y) / t^2 - v_o_y / t = a_y (s_x - s_o_x) / t^2 - v_o_x / t = a_x (s_y - s_o_y) / t^2 - v_o_y / t = a_y (s_z - z_o_y) / t^2 - v_o_z / t = a_z
Insert this into the equation of force:
F_x = m * (s_x - s_o_x) / t^2 - m * v_o_x / t F_y = m * (s_y - s_o_y) / t^2 - m * v_o_y / t F_x = m * (s_x - s_o_x) / t^2 - m * v_o_x / t F_y = m * (s_y - s_o_y) / t^2 - m * v_o_y / t F_z = m * (s_z - z_o_y) / t^2 - m * v_o_z / t
Now decide for t :
t = (-m * v_o_x +/- sqrt(m^2 * v_o_x^2 - 4 * F_x * m * (s_x - s_o_x))) / 2 / F_x t = (-m * v_o_y +/- sqrt(m^2 * v_o_y^2 - 4 * F_y * m * (s_y - s_o_y))) / 2 / F_y t = (-m * v_o_x +/- sqrt(m^2 * v_o_x^2 - 4 * F_x * m * (s_x - s_o_x))) / 2 / F_x t = (-m * v_o_y +/- sqrt(m^2 * v_o_y^2 - 4 * F_y * m * (s_y - s_o_y))) / 2 / F_y t = (-m * v_o_z +/- sqrt(m^2 * v_o_z^2 - 4 * F_z * m * (s_z - s_o_z))) / 2 / F_z
Time must converge, so time will be equal! This gives us a system of equations for each coordinate (plane and sphere). Please note that there are several possible values, but some of them include imaginary numbers, so you will have to eliminate these solutions:
(-m * v_o_x +/- sqrt(m^2 * v_o_x^2 - 4 * F_x * m * (s_x - s_o_x))) / 2 / F_x = (-m * v_o_y +/- sqrt(m^2 * v_o_y^2 - 4 * F_y * m * (s_y - s_o_y))) / 2 / F_y F^2 = F_x^2 + F_y^2 (-m * v_o_x +/- sqrt(m^2 * v_o_x^2 - 4 * F_x * m * (s_x - s_o_x))) / 2 / F_x = (-m * v_o_y +/- sqrt(m^2 * v_o_y^2 - 4 * F_y * m * (s_y - s_o_y))) / 2 / F_y = (-m * v_o_z +/- sqrt(m^2 * v_o_z^2 - 4 * F_z * m * (s_z - s_o_z))) / 2 / F_z F^2 = F_x^2 + F_y^2 + F_z^2
Decide for the coordinates (F_x,F_y) or (F_x,F_y,F_z) , and you have the strength you need.
Let me know if you have any questions or if you find errors in my math.