I am currently working on releasing an Early Access build of Stone Shire to Steam for PC. It has been a while since I’ve tackled this project since the Nintendo Wii U, but I made a lot of adjustments over the last two weeks as I returned to it. A lot of code clean up and optimizations that I missed the last time. For one, in the video above, I am making a “sweeping” method for when the sun rises or sets. In real life, this is how the lighting usually looks. And I know in Minecraft, they simply blend the colors into the landscape. But I wanted to go with a more cool approach that simulates what happens in real life. It works smoothly in game and looks pretty cool as the environment changes lighting and color over time.
Making a voxel game in Unity is not an easy feat considering you don’t have a lot of low level access to the hardware as say a language like C++. Stuff like thread management is a big one when it comes to Unity, since everything runs on the main thread, something that still annoys me about the engine. I wish that they tackle this as a feature in a future edition. Being able to have closer control to the main thread functionality with Unity methods would greatly increase performance of voxel rendering. For now, I just throw all the math, voxel, and lighting calculations on a System.Thread from the C# size and then pass them all to the Main Thread when it’s time to do the assignments to meshes.
Still, I’ve made do with what I have. Chunks are no longer created and destroyed naively, but rather, a pool of chunks are drawn from now that the system recycles through. No more choppy updates while moving across the land. Water flow has been turned back on, including optimizing its flowing, which killed Wii U performance. Currently implementing day and night cycles, along with weather next. After that, returning large maps with multiple biomes. I had this in an earlier build, but I had to restrict the size of the map for Wii U, thus turned the feature off. So this should be as simple as flicking it back on. I think.
– Cor