Debugging and Refining

Due to the fact that there are only a couple of weeks left for this project, we have shifted our priorities a bit. Instead of focusing on coming up with ideas on how to further extend the view distance, we are putting all effort on how to make what we have now as solid and stable as possible. This mostly involves getting the chunk loading stable and fast instead of having distant chunks pop up slowly over time. The issue is especially visible when only small fractions of non-loaded chunks are visible so that the rays have an extra hard time hitting them.

The work this week has been about polishing the ray casting and free it from bugs that was introduced along with negative coordinates for chunks which altered their behaviour. Much time was also put into finishing the threading and the application now handles everything related to loading/unloading the chunk data (including shooting rays) in a separate thread. This removed lag spikes when geometry is loaded, albeit making them load slower overall. So now the frame rate easily stays at 60 FPS unless really massive amounts of voxels are visible at the same time.

The noise generation was improved as well by porting the noise algorithm to assembler. This was done as a side experiment by a friend to examine the difference in speed. It was shown that the speed gain was huge. From 18ms to generate one chunk down to 3. We then decided to keep that as the cpu side noise generation.

Some time was also spent thinking about how to make the loading more consistent. Unfortunately the only idea which seemed promising (to load everything at once while having LOD representations of the chunks further away) quickly showed completely impossible when we did calculations on how much generation that would need to be done in real time at once. We also have a couple of other ideas on how to improve the smoothness of the data loading which we will try next week.

Ray debugging screenshot:

Be Sociable, Share!