I’m trying to save a world to a file by getting each chunk and saving their atlas maps and height maps to a file, I can save atlas maps fine as a .png but i am unable to figure out have to save and load an array of floats how can achieve this, Thanks.
Also a note to consider that is that these chunks height maps array size are going to be quite big so i would prefer to load all the heights from a saved file instantly into a array if that’s possible.
I would suggest you to use JSON to save your files with. You could of course use a simpler way and just save your floats seperated with a char (e.g. as plain text into a file and on loading it simply split it with that char again. But it might be a cleaner solution to work with json here.
It’s far, far more efficient just to save the bytes. Generally stay away from trying to parse floats as text for various reasons (regional differences etc.).