Open therealnv6 opened 1 year ago
Okay, so there are a few things I just thought about.
I optimized a bunch in the most recent commit, https://github.com/polykami/voxel-impl/commit/e9a63fd0b9825ff8980552375e4edeae62dfec38.
Here are the changes I made:
Newest commit adds multi-threading to the chunk generation, https://github.com/polykami/voxel-impl/commit/36947dc40c1a5556dbfc41c26562a98773b88a42.
Performance still seems to be rather lacking, will have to do more investigation and optimization.
Optimized a lot more in commit https://github.com/polykami/voxel-impl/commit/ddf68ab882f48dd0262678e6fbe36364bc00c3b3. Here are some of the changes:
chunks
resource within the thread anymore, instead we're now saving the updates as '(i32, [u8; ChunkShape::SIZE as usize])' (ref: https://github.com/polykami/voxel-impl/blob/ddf68ab882f48dd0262678e6fbe36364bc00c3b3/src/chunk/container/queue.rs#L7)I did realize some unexpected behavior regarding to chunk loading, as it seems like tons of chunks are being loaded for no apparent reason. I think there is some miscalculation, or a domain/linearity issue somewhere. View video for reference: https://www.youtube.com/watch?v=2IunTrzmROs
fps literally drops to 0 for a whole second when it's loading new chunks