I have been trying to figure out how to save my world data in my voxel engine game for a while now, but I have not found anything I can use. All the code I’ve seen to write a byte array only works with one that is one dimensional, which is not what I want. My data is stored in a 3D byte array. (byte[,]) Is there any way to save the array “as is” to a file and read it back later?
EDIT: Also, I’m not quite sure how this works, but each x,y and z combination in my array is given a value. Like this: exampleArray[1,2,3] = 2. Is there any way to save these values as well?