VoxelConfig

Compile-time constants shared by the whole Worlds data model.

Overview

Header: include/GalaxyEggbert/Worlds/VoxelConfig.hpp, namespace GalaxyEggbert::Worlds::VoxelConfig.

Constants

ConstantValueMeaning
FormatVersion1.vwr/chunk format version
ChunkSize10Blocks per chunk axis
ChunkVolume100010³
WorldChunksPerAxis10Chunks per world axis
WorldBlocksPerAxis10010 × 10
MaxBlockType409512-bit type ID ceiling
MaxBlockMetadata154-bit metadata ceiling
MaxPaletteEntries256Max unique blocks per chunk (8-bit index)

Related Helpers

BitPacking.hpp/.cpp provides bitsNeededForPalette(count) (1 bit for 1–2 entries, up to 8 bits for 129–256), packPaletteIndices, unpackPaletteIndices, getPackedIndex, setPackedIndex, and packedWordCount — all consumed by Chunk.

BinaryIO.hpp/.cpp provides little-endian writeU8/16/32/64LE, readU8/16/32/64LE, and writeMagic/readMagic for 4-byte file signatures — used by World and Chunk serialization.