I have just pushed some new changes mostly related to the problems I've described earlier. I've also changed the way the daylight value is calculated. From now on it is based on the angle of the sun provided by Anton's skysphere. This allows very smooth transitions at dawn/sunset and a much more fitting daylight value at each point in time.
But now the important part... The performance of Blockmania.
I've added a more general optimization yesterday (reduced the amount of leaf blocks/faces that are actually drawn). Today I finally found out why the game stuttered from time to time on my machine. Currently each chunk update is executed in a separate thread (making this possible was a lot of work actually) and the amount of executed threads is limited by the amount of cores of the user's CPU. If this limit is reached, no more updates can be queued for updating. This led to problems when the player modifies blocks right in front of him, since this introduced a noticeable delay. So I implemented an observer-pattern kind of mechanism that allows forced chunk updates (utilizing one more thread than actually allowed). That is the system that has been active for the last couple of weeks.
Now I pushed a update that actually limits the amount of threads started in one single iteration of the render loop to 20 possible updates per second. This works really well on my machine, but I've got a very strong processor (hexa-core I7) so this is not the most reliable source for benchmarks that actually matter. I constantly achieve FPS far beyond 200 with a viewing distance of 32 chunks (mostly related to the new trees and the leaf optimization).
Here's the final question: how is the current version of the game performing (develop branch) on your side and what are your specs? :ugeek:
But now the important part... The performance of Blockmania.
Now I pushed a update that actually limits the amount of threads started in one single iteration of the render loop to 20 possible updates per second. This works really well on my machine, but I've got a very strong processor (hexa-core I7) so this is not the most reliable source for benchmarks that actually matter. I constantly achieve FPS far beyond 200 with a viewing distance of 32 chunks (mostly related to the new trees and the leaf optimization).
Here's the final question: how is the current version of the game performing (develop branch) on your side and what are your specs? :ugeek: