Blocky Planet is a tech demo created in the Unity game engine that maps Minecraft-style cubic voxels onto a spherical planet. The planet is procedurally generated, fully destructible, and supports over 20 different block types. This project addresses unique challenges introduced by the planet's spherical shape, differentiating it from common flat voxel worlds. The demo is freely available on Itch.io, with a native Windows build and a playable web version. Created over a month with about 15 hours per week, it uses Unity 6 with C# and leverages Unity’s Job system and Burst compiler but not DOTS. Textures for blocks were custom-made through pixel art and procedural scripts. Key technical challenges and solutions: 1. Spherical Block Arrangement: - Simply selecting blocks within a radius creates a blocky sphere whose surfaces don’t align with gravity, complicating building and movement. - Instead, blocks are arranged to align their vertical faces with gravity, meaning the top face points outward from the planet center. - The approach involves mapping 2D square grids onto a 3D sphere using a “quad sphere” technique, where the sphere is constructed from six cube faces subdivided into grids and normalized onto a unit sphere. - Distortion is inevitable due to Gauss’s Theorema Egregium, but pre-distortion of the grid reduces this effect, resulting in blocks that better preserve square shapes. 2. Layer and Depth Distortion: - On a sphere, stacks of blocks with constant height cause block sizes to vary, becoming thinner near the center and wider near the surface. - To mitigate this, blocks are grouped into shells, where the number of blocks per layer increases exponentially (quadruples) moving outward, maintaining approximate block size consistency with integer multiples for alignment. - This multi-shell approach allows for digging from the surface to the planet center and keeps block seams aligned, although blocks do vary in size between shells. 3. Planet Structure: - The spherical world is divided into six wedge-shaped sectors (one per cube face). - Each sector is subdivided vertically into shells, which contain multiple chunks of size 16x16x16 blocks, similar to conventional voxel worlds but adapted to spherical topology. - This subdivision optimizes rendering and physics batching. However, shells near the center may be too small to hold chunks, leaving a hollow core temporarily. 4. Block Addressing: - Blocks are addressed by a hierarchy: Sector → Shell → Chunk → Block, encoded in a struct containing sectorIndex, shellIndex, chunkIndex, and blockIndex. - Calculating a block’s address from a world position involves determining the sector (based on max coordinate axis and sign), shell (distance from center), chunk (mapping position onto cube face and normalizing coordinates), and block within chunk. 5. Neighbor Finding: - Finding neighbor blocks is simple within a chunk or shell but complex across shell and sector boundaries. - Vertical