VoxelConfig
Compile-time constants shared by the whole Worlds data model.
Overview
Header: include/GalaxyEggbert/Worlds/VoxelConfig.hpp, namespace GalaxyEggbert::Worlds::VoxelConfig.
Constants
| Constant | Value | Meaning |
|---|---|---|
FormatVersion | 1 | .vwr/chunk format version |
ChunkSize | 10 | Blocks per chunk axis |
ChunkVolume | 1000 | 10³ |
WorldChunksPerAxis | 10 | Chunks per world axis |
WorldBlocksPerAxis | 100 | 10 × 10 |
MaxBlockType | 4095 | 12-bit type ID ceiling |
MaxBlockMetadata | 15 | 4-bit metadata ceiling |
MaxPaletteEntries | 256 | Max 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.