Smoother chunk generation
vlad0-0 opened this issue · 7 comments
Request Description
Description:
This proposal aims to improve frame rates (FPS) during world exploration in Minecraft by addressing the performance bottleneck caused by chunk generation on the main thread. Currently, generating new chunks and updating mobs/players share the same thread, causing significant FPS drops.
Proposed Solutions:
Chunk Generation: Explore the feasibility of offloading chunk generation to a separate thread while maintaining data consistency with the main thread.
Prioritization on Main Thread: Analyze if critical tasks can be prioritized on the main thread while chunk generation happens in the background.
Inspiration:
Sodium mod demonstrates the potential of multithreading in Minecraft.
Benefits:
Smoother exploration experience with reduced FPS drops during chunk generation.
I'm not very knowledgeable about this and would like to hear your opinion as a more advanced person on the subject. It's probably quite a complex task. Maybe you already have ideas how to make chunk generation smoother (perhaps by slowing down their generation) without having to do something with the main thread.
Currently, generating new chunks ... share the same thread, causing significant FPS drops.
This is not correct for the render thread directly, the chunks that generate while flying around are already generated off the render thread entirely (integrated server on multiplayer of which it has further threading executors)
Feels like you're basically asking for C²ME. World generation appears off-topic for sodium. To reduce stutters consider connecting to a local server instead of running singleplayer.
Improving chunk generation performance is out of scope for Sodium, consider installing Lithium, C2ME, Noisium, and Faster Random.
Rendering, as in assembling terrain geometry, is already done in separate threads by sodium. Getting this right is one of the important optimizations sodium does.
Sorry, I seem to be a bit off-topic with this feature. Thanks for the tips, I will definitely use the suggested mods and methods. If I replace the words "generation" with "rendering" in the feature description, would that make sense here then?
Thanks for helping me to understand the situation. It turns out that the bottleneck is generation, not rendering. I would be glad if you could advise me where I should write about this proposed feature