Hi! I'm new btw. Anyway, I have a pong clone copied virtually line-for-line from the "sfml game from scratch" tutorial (he calls it "Pang!"). The paddles and ball move very smoothly on my computer, but are very fast and too sensitive on my friend's computer. Position is updated as follows:
get time and call update():
float timeDelta = Game::GetWindow().GetFrameTime();
Update(timeDelta);
inside of update:
Update (float elapsedTime){
if (Game::GetInput().IsKeyDown(sf::Key::Right))
_velocity += 3.0f;
GetSprite().Move(_velocity * elapsedTime, 0);
}
My understanding was that this process effectively scales the speed by the framerate so that it doesn't matter how fast or slow a computer is-- the objects should always move around at the intended speed. This doesn't seem to be working though.
Thoughts?