Hey guys just a quick question, in my code im telling my RenderWindow to have this set
screen.setFramerateLimit(60);
now when i run the program, i have a int going up by 1 every frame, it goes to 255 and then goes back, now if i run the program the window goes from black to white in 8 seconds...this is wrong, 255 / 60 = 4, so it should take the window 4 seconds to update, not 8, if i set it to 120 it works fine, but im alittle bit nervous running a game at 120 FPS, does anyone have any small piece of code i can use that uses the clock to update the window instead of the setFramerateLimit
Cheers
Canvas
I now have this
framtRate 60.0f/1000.0f
if(fps.getElapsedTime().asMilliseconds() > frameRate)
{
fps.restart();
screen.clear(sf::Color(currentState,currentState,currentState));
}
screen.display();
but the screen update is way to fast
its ok i had screen.setVerticalSyncEnabled(false); i now have screen.setVerticalSyncEnabled(true);
post can be deleted (sorry about my mass of topics to be deleted)