First, you need to find a way of making game logic independent of the frame rate. A simple way is to use

`sf::RenderWindow::setFramerateLimit()` and approximate the frame duration, more sophisticated ways include decoupling from rendering and logics, such as

here.

Concerning movement, you can basically use Euler integration. That means the position is updated by the velocity multiplied with the elapsed time in every frame.

// Convert mouse position to world coordinates

sf::Vector2i mousePos = ...; // get from sf::Event

sf::Vector2f target = window.mapPixelToCoords(mousePos);

// Compute player's movement

const float speed = ...;

sf::Vector2f position = ...; // current

sf::Vector2f direction = target - position;

// p += v * t

sf::Time dt = ...; // elapsed frame time, measure with sf::Clock

position += speed * thor::unitVector(direction) * dt.asSeconds();

`thor::unitVector()` computes a vector of unit length, see

here. In Thor, I've written a bunch of functions that simplify vector algebra, you can use them without building the library (i.e. header-only).