So why does 0.17 turn it on by default? During migration to DirectX 11, I spent little bit of time looking into stuttering issues Factorio has and wanted to see if we can fix it in the new rendering backend. I found out two things
- Factorio is bad timing its frames. Frame times oscilate between ~14 ms to ~18 ms, which averages out to desired 16.67 ms (60 FPS/UPS).
- Desktop refresh rate often is not 60 Hz but 59.95 Hz. Which means Factorio is possibly generating frames slightly faster than screen is displaying them, which means update and render is slowly getting desynchronized with VBLANK.
If v-sync is turned on, the game will fill present queue and and Present() starts to block, this fixes the stutter and will cause the game just drop a frame occasionally, at least in theory (somewhat supported by my observations/measurements).
Obviously the best solution would be to entirely divorce update and rendering, but I don't see that happening in 2D Factorio. Render preparation step would have to capture states of entities to be rendered instead of capturing "sprite draw orders", which is way too much work to do when we are trying to finish 1.0.