Thursday, May 19, 2011

Version 1.5_01_F

First some bugfixes. 

The briefly flashing blue rectangle visible after destroying a block was caused by too much optimization for the sunset lag. It is fixed now and the sunset lag is also no more.

The new features. 

1. Smooth FPS

One of the long standing problems with the Minecraft performance is the unstable framerate. Random lag spikes can appear out of nowhere and then disappear. They are visible as random freezing or stuttering. Even worse is the magnitude of the lag spikes, some of them corresponding to 2 or 3 times lower framerate than the average one. The effective visual framerate is the lowest framerate for a given period, so the spikes are ruining the game appearance.

The reason for the spikes turned out to be the graphic card driver. The OpenGL specification allows the driver to buffer up to 3 frames, before rendering them to the screen. 

To fix this OptiFog adds "Smooth FPS" which explicitely flushes all OpenGL bufferes before rendering the next frame. This removes almost all of the random lag spikes and affects minimally the average FPS.

This is how the lag spikes look on a laptop with ATI HD 4200:


The average framerate is 29 FPS, but the worse spikes correspond to framerate 10 FPS, which reflects the allowed buffering of 3 frames.

With "Smooth FPS" turned on the framerate is much more stable. Average is 26 FPS with biggest spikes about 20 FPS.:
 

On a desktop PC with nVidia FX 5600 the lag spikes are appearing at every third frame. The visible effect is stuttering, especially at lower framerates.


With Smooth FPS the spikes are gone, and the average FPS is not affected:


The option Advanced OpenGL seems to reduce the random lag spikes on some systems, but have no effect on other. This is dependant on the graphic card driver.

2. Brightness

Minecraft uses non-linear light levels. The difference between level 0 and 1 is much smaller than the difference between level 14 and 15.

On a good calibrated monitor which can show near-black colors the Minecraft night scenes are almost fully black (light level 4). On the other hand, not so good monitors which have problems with near black colors show the night scenes very good.

The Brightness setting fixes the Minecraft light levels for properly calibrated monitors.  
Brightness 0% corresponds to default Minecraft light levels. Brightness 100% uses linear light levels, so the steps between all light levels are equal. 

3. Framerate Limit: VSync

A new value for the Framerate Limit, turns on vertical synchronization (VSync) between the graphic card and the monitor so that the monitor always show fully rendered frames. 

The visual effect is limiting the framerate to the monitor framerate, usually 60 or 70 FPS. However if Minecraft is not able to reach the full monitor framerate, the FPS will be limited to half the monitor framerate (30).

You can find more info about VSync here: http://www.tweakguides.com/Graphics_9.html