Schem up
Is it⦠somehow reading the world data? Or legit raycasting 1 million blocks forward and loading chunks to see the block or something :o
if the chunk is not marked, it basically loads it into that datastructure, so the next access will be blazingly fast
π
very cool! so it caches representations of chunks?
How does it know what chunks to load in?
ye, ofc not the full representation, only if there exists something or not
i canβt watch it because discord is goofin and wont load videos
π
Does this work properly if thereβs unloaded terrain in between the raycast points?
And how about on non-superflat worlds where thereβs an ungenerated mountain range between the raycasts?
if the chunk was not processed previously, it will load/generate chunk and process it into SVO (though i will also add an option to just terminate raycast later)
It should work normally on non-superflat worlds. I choose superflat because my laptop only has 8 gb or ram and is a bit potato
π
So this demo just loaded and processed 1000000/16=62.5 thousand chunks? Or you pregenerated them?
but as it only really stores whenever there is a block or not, and with the superflat world being mostly empty space, it took a very smal amount of ram
Yea but this is not going to work for a normal world that a player keeps for any amount of time longer than a week
youβre probably going to have to do quite a bit of rethinking to get this working on disk
I did some research about on-disk spatial data structures like this for VS but kinda got a headache and gave up
it will though? Raycast only really need to know if there is something or not, so you can pack it into a bitset. So even if you put whole chunk as an array of booleans, it will only consume like several tens of kilobytes per chunk
This conversation is on Discord Β· Reply there