SFML community forums

Help => General => Topic started by: catalinnic on February 19, 2019, 01:49:40 pm

Title: Learn
Post by: catalinnic on February 19, 2019, 01:49:40 pm
Hello, I have 2 questions to ask:
1. I have a variable set for PlayerSpeed=0.2 and if i move the project to a newer hardware the player moves twice as fast why?
2. How i can clear the window without a static image wich stands for map?
Title: Re: Learn
Post by: Hapax on February 24, 2019, 11:52:40 pm
1) Multiply the speed by the amount of time passed for that frame (probably in seconds but any measurement is fine really as long as its consistent; also remember that you might need to multiply the overall values with a large constant (possibly 1000+, depending on your system's speed) to get it back to the speed you expect). You could also try setting a framerate limit to get a simple approximation of stable frame times.