Currently I'm defaulting to 60 FPS, so a simplification of what I'm doing looks like this:
float refreshRate = 1.0f / 60.0f;
while (!quit)
{
timeAccumulator += timer.tick();
if (timeAccumulator > refreshRate)
{
render();
timeAccumulator -= refreshRate;
}
}
Which does what you would expect: render the game roughly every 0.0167 seconds, which I confirmed by logging the time between render calls to the console to ensure there were no large outliers. However, when I remove the FPS cap, and let it render on every iteration of the main loop, it scrolls noticeably smoother, which I did not expect, because my monitor is set to a 60 Hz refresh rate. My understanding is that even though the game might try to render faster than 60 FPS, it should not visually be any different because it is limited by the speed of the monitor, correct? So what am I misunderstanding here to account for this?