HAHA welcome to the club. Im really puzzled that nobody had problems with it before
.
Check this:
http://sfml-dev.org/forum/viewtopic.php?t=6237With vertical sync you get a framerate pegged to 60/75/100 Hz. This is because each frame the window.display() pauses the whole application until the graphics card decides it is safe to fill the video buffer without the risk of tearing.
So, in 60 FPS 1 frame lasts 1 / 60 = 0,01667 seconds
Now, imagine you press a key just after the display method was called. It waits and waits, and your input stays unregistered. The worst case is getting 0,0166 delay because of Vertical Sync.
Laurent, maybe it would be possible for you to put the window.display in a thread, so it would not freeze the whole application? I really don't see why limiting DISPLAY framerate should limit the CALCULATION framerate.
A partial solution to your problem could be sth like this. It's in python but you may use the sf::Clock instaead of time:
if time.clock() - last_display > 0.016:
window.clear(sf.Color(200, 0, 0))
window.display()
last_display = time.clock()
It calls the window.display right before the Vertical Sync