Eldemarkki / Marching-Cubes-Terrain

Marching Cubes terrain implementation in Unity using the Job System and the Burst compiler
MIT License
562 stars 80 forks source link

Save chunk states #10

Open Eldemarkki opened 4 years ago

Eldemarkki commented 4 years ago

Save the densities of all the chunks, so they can later be reloaded and thus save whole worlds

ghost commented 4 years ago

Might be useful for compressing stored chunk info: https://github.com/Genbox/CSharpFastPFOR

(only suitable if density values are ints)

Eldemarkki commented 4 years ago

The density values are bytes so unfortunately, that wouldn't work. Something that would work though, is run-length encoding. RLE may also be able to compress the chunks a lot because there usually are long runs of densities 1 and 0 (because big parts of the chunks are either completely solid or completely air).