VloxyEngine icon indicating copy to clipboard operation
VloxyEngine copied to clipboard

Allow user to edit chunk draw distance at runtime

Open AldeRoberge opened this issue 2 years ago • 3 comments

image

Seems like the scheduler never reclaims (unloads) faraway chunks, resulting in a loss of performance.

AldeRoberge avatar May 04 '23 15:05 AldeRoberge

This happens when changing the Chunk Draw Distance at runtime (i.e. going from 4 then to 1)

AldeRoberge avatar May 04 '23 15:05 AldeRoberge

_ChunkPoolSize = (settings.Chunk.DrawDistance + 2).CubedSize();

I changed the pool size to draw_distance + 2, So there will be more chunks active even a few far ones. This initialization happens in the constructor of the ChunkPool, even for other settings right now they can't be changed at runtime.

We can have a single source of settings and achieve runtime changes

BLaZeKiLL avatar May 04 '23 23:05 BLaZeKiLL

We can have a single source of settings and achieve runtime changes

That's interesting. I think we should allow players to change their chunk render distance at runtime!

AldeRoberge avatar May 22 '23 04:05 AldeRoberge