I'm working on a text-based game involving a spaceship travelling between planets. Space is represented as a 2D plane. The ship has a current position, a destination and a speed.
Every minute, the game engine updates the current position of the ship, according to its current position, current destination and speed.
Knowing the ship speed (in unit per minute), I know the distance traveled by the ship in one minute. But I'm struggling to calculate the new position of the ship after it traveled that distance.
Let's say the starting position of the ship is (1,1), its destination position is (3,4) and the ship moving towards it at the speed of 1 unit per minute. What would be the new position at the ship after 1 minute, having traveled 1 unit?
Furthermore, what is a formula to calculate the new position (xP, yP) of the ship knowing its starting position (xA, yA), its current destination (xB, yB), and the distance traveled in 1 minute (D)?
PS: I should say that I've never learned mathematics so this might be very basic but I can't wrap my head around it and the problem might not be phrased well. But I'd be happy to provide more information if necessary.

