Save-game file format

Modified on Tue, 5 Nov at 12:14 PM

Latest file format is version 14.


Current format 14:


Game can be saved either by scripting or using the console command /save.

The file format is binary. Chunk data is RLE compressed to reduce redundant data. Custom data sections are compressed using Deflate algorithm.


Byte PosLengthTypeDescription
01ByteFile format number
11ByteChunk size (16 or 32 as of Voxel Play 6.0)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.

1
Byte
1 if the chunk is completely generated. 0 if the chunk was modified after calling GetChunkUnpopulated() method but the terrain generator has not yet filled the chunk with contents.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCES SECTION

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
...END OF ITEMS SECTION

2Int16Number of voxels in this chunk with custom data
FOR EACH VOXEL WITH CUSTOM DATA...

2Int16Index of voxel in the chunk

2Int16Number of custom properties

4IntProperty Id

4FloatFloat value

??StringString value
...END OF PER VOXEL CUSTOM DATA SECTION
END OF CHUNK

2Int16Number of saved gameobjects in the world
FOR EACH GAMEOBJECT...


StringPath for the prefab from a Resources folder (ie. "MyPrefabs/thisprefab" where MyPrefabs is a folder inside Resources folder)


StringName of the gameobject

4FloatPosition x

4FloatPosition y

4FloatPosition z

4FloatRotation angle x

4FloatRotation angle y

4FloatRotation angle z

4FloatScale x

4FloatScale y

4FloatScale z

2Int16Number of custom data values
PER EACH GAMEOBJECT DATA VALUE


StringKey


StringValue
END OF DATA VALUE
END OF GAMEOBJECT




2Int16Number of custom data sections
PER EACH CUSTOM DATA SECTION


StringKey


Int16Length of byte array


Byte[]Data contents
END OF CUSTOM DATA SECTION



Previous versions:


Version 13:


Byte PosLengthTypeDescription
01ByteFile format number
11ByteChunk size (16 or 32 as of Voxel Play 6.0)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCES SECTION

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
...END OF ITEMS SECTION

2Int16Number of voxels in this chunk with custom data
FOR EACH VOXEL WITH CUSTOM DATA...

2Int16Index of voxel in the chunk

2Int16Number of custom properties

4IntProperty Id

4FloatFloat value

??StringString value
...END OF PER VOXEL CUSTOM DATA SECTION
END OF CHUNK

2Int16Number of saved gameobjects in the world
FOR EACH GAMEOBJECT...


StringPath for the prefab from a Resources folder (ie. "MyPrefabs/thisprefab" where MyPrefabs is a folder inside Resources folder)


StringName of the gameobject

4FloatPosition x

4FloatPosition y

4FloatPosition z

4FloatRotation angle x

4FloatRotation angle y

4FloatRotation angle z

4FloatScale x

4FloatScale y

4FloatScale z

2Int16Number of custom data values
PER EACH GAMEOBJECT DATA VALUE


StringKey


StringValue
END OF DATA VALUE
END OF GAMEOBJECT




2Int16Number of custom data sections
PER EACH CUSTOM DATA SECTION


StringKey


Int16Length of byte array


Byte[]Data contents
END OF CUSTOM DATA SECTION




Version 12:


Byte PosLengthTypeDescription
01ByteFile format number
11ByteChunk size (16 or 32 as of Voxel Play 6.0)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF CHUNK

2Int16Number of saved gameobjects in the world
FOR EACH GAMEOBJECT...


StringPath for the prefab from a Resources folder (ie. "MyPrefabs/thisprefab" where MyPrefabs is a folder inside Resources folder)


StringName of the gameobject

4FloatPosition x

4FloatPosition y

4FloatPosition z

4FloatRotation angle x

4FloatRotation angle y

4FloatRotation angle z

4FloatScale x

4FloatScale y

4FloatScale z

2Int16Number of custom data values
PER EACH GAMEOBJECT DATA VALUE


StringKey


StringValue
END OF DATA VALUE
END OF GAMEOBJECT




2Int16Number of custom data sections
PER EACH CUSTOM DATA SECTION


StringKey


Int16Length of byte array


Byte[]Data contents
END OF CUSTOM DATA SECTION



Version 11:


Byte PosLengthTypeDescription
01ByteFile format number
11ByteChunk size (16 or 32 as of Voxel Play 6.0)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise

1ByteIf voxel is of custom type, a value of "1" informs that custom rotation angles follows. "0" otherwise

(4*3)FloatCustom voxel rotations for X, Y and Z axis. Only if previous byte field = 1.
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF CHUNK

2Int16Number of saved gameobjects in the world
FOR EACH GAMEOBJECT...


StringPath for the prefab from a Resources folder (ie. "MyPrefabs/thisprefab" where MyPrefabs is a folder inside Resources folder)


StringName of the gameobject

4FloatPosition x

4FloatPosition y

4FloatPosition z

4FloatRotation angle x

4FloatRotation angle y

4FloatRotation angle z

4FloatScale x

4FloatScale y

4FloatScale z

2Int16Number of custom data values
PER EACH GAMEOBJECT DATA VALUE


StringKey


StringValue
END OF DATA VALUE
END OF GAMEOBJECT




2Int16Number of custom data sections
PER EACH CUSTOM DATA SECTION


StringKey


Int16Length of byte array


Byte[]Data contents
END OF CUSTOM DATA SECTION



Version 10.0:


Byte PosLengthTypeDescription
01ByteFile format number
11ByteChunk size (16 or 32 as of Voxel Play 6.0)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise

1ByteIf voxel is of custom type, a value of "1" informs that custom rotation angles follows. "0" otherwise

(4*3)FloatCustom voxel rotations for X, Y and Z axis. Only if previous byte field = 1.
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF CHUNK

2Int16Number of saved gameobjects in the world
FOR EACH GAMEOBJECT...


StringPath for the prefab from a Resources folder (ie. "MyPrefabs/thisprefab" where MyPrefabs is a folder inside Resources folder)


StringName of the gameobject

4FloatPosition x

4FloatPosition y

4FloatPosition z

4FloatRotation angle x

4FloatRotation angle y

4FloatRotation angle z

4FloatScale x

4FloatScale y

4FloatScale z

2Int16Number of custom data values
PER EACH GAMEOBJECT DATA VALUE


StringKey


StringValue
END OF DATA VALUE
END OF GAMEOBJECT



Version 9.0:



Byte PosLengthTypeDescription
01ByteFile format number
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise

1ByteIf voxel is of custom type, a value of "1" informs that custom rotation angles follows. "0" otherwise

(4*3)FloatCustom voxel rotations for X, Y and Z axis. Only if previous byte field = 1.
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF CHUNK

2Int16Number of saved gameobjects in the world
FOR EACH GAMEOBJECT...


StringPath for the prefab from a Resources folder (ie. "MyPrefabs/thisprefab" where MyPrefabs is a folder inside Resources folder)


StringName of the gameobject

4FloatPosition x

4FloatPosition y

4FloatPosition z

4FloatRotation angle x

4FloatRotation angle y

4FloatRotation angle z

4FloatScale x

4FloatScale y

4FloatScale z

2Int16Number of custom data values
PER EACH GAMEOBJECT DATA VALUE


StringKey


StringValue
END OF DATA VALUE
END OF GAMEOBJECT




Version 8.0.



Byte PosLengthTypeDescription
01ByteFile format number
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list) - this includes the item definitions for torches
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise

1ByteIf voxel is of custom type, a value of "1" informs that custom rotation angles follows. "0" otherwise

(4*3)FloatCustom voxel rotations for X, Y and Z axis. Only if previous byte field = 1.
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z

2Int16Index of the item definition for the torch in the header list
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF ITEM
END OF CHUNK



Format 7.0.


Byte PosLengthTypeDescription
01ByteFile format number
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list)
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info. "0" otherwise

1ByteIf voxel is of custom type, a value of "1" informs that custom rotation angles follows. "0" otherwise

(4*3)FloatCustom voxel rotations for X, Y and Z axis. Only if previous byte field = 1.
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF ITEM
END OF CHUNK




Previous versions:


Format 6.0.



Byte PosLengthTypeDescription
01ByteCurrent file format (3)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39VariableStringsNames of each voxel definition (list)

2Int16Number of item definitions

VariableStringsNames of each item definition (list)
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1/0ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info.
If voxel is of custom type, a value of "1" informs that custom rotation angles follows

4*3FloatCustom voxel rotations for X, Y and Z axis
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z
...END OF LIGHT SOURCE

2Int16Number of items in the chunk
FOR EACH ITEM

2Int16Index of the item definition in the header list

4FloatPosition x of the item

4FloatPosition y of the item

4FloatPosition z of the item

2Int16Quantity
END OF ITEM
END OF CHUNK




Format 5.0.



Byte PosLengthTypeDescription
01ByteCurrent file format (3)
14FloatPosition x of the character controller
54FloatPosition y of the character controller
94FloatPosition z of the character controller
134FloatCharacter controller’s transform.eulerAngles.x
174FloatCharacter controller’s transform.eulerAngles.y
214FloatCharacter controller’s transform.eulerAngles.z
254FloatCamera’s transform.eulerAngles.x
294FloatCamera’s transform.eulerAngles.y
334FloatCamera’s transform.eulerAngles.z
372Int16Number of voxel definitions
39???StringsNames of each voxel definition (list)
??4IntNumber of chunks
START OF CHUNK
 4FloatPosition x of the chunk
 4FloatPosition y of the chunk
 4FloatPosition z of the chunk

1ByteIf this chunk has some voxels above terrain surface (1) or not (0). Used for computing lightmap when neighbour chunks do not exist (yet). Above surface chunks assume Sun light from above. Chunks below surface won't receive Sun light from above if there's no chunk on top.
 2Int16Number of words
FOR EACH VOXEL REPETITION ("WORD")...

2Int16Index of the voxel definition list
 1ByteVoxel color (R) (0-255)
 1ByteVoxel color (G) (0-255)
 1ByteVoxel color (B) (0-255)
 2Int16Start index of the voxel repetition
 2Int16Repetitions
 1/0ByteIf voxel is of transparent type or 6-textures opaque type, a flags byte with info with water level and/or voxel texture rotation info.
If voxel is of custom type, a value of "1" informs that custom rotation angles follows

4*3FloatCustom voxel rotations for X, Y and Z axis
...END VOXEL REPETITION

2Int16Number of torches or light sources
FOR EACH LIGHT SOURCE...
 2Int16Index of the voxel within the chunk where the light source is
 4FloatNormal.x (used to determine the face of the voxel where the light source is attached)
 4FloatNormal.y
 4FloatNormal.z
...END OF LIGHT SOURCE
END OF CHUNK






Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article