2023

Leon Twemlow

<aside> 🔖 A short overview of a Voxel Engine I created back in 2023

</aside>

This custom voxel engine, crafted within Unity, allows you to sculpt and explore intricate landscapes with the ability to build and destroy.

My exploration of procedural generation in video games led me to voxels. These building blocks, though simple cubes, hold immense potential. Voxels enable the creation of endlessly varied environments and in-game content, all while offering the thrilling freedom of complete destruction.

These seemingly simple worlds came out to be a more complicated task to implement in a way which was affiant and had many of the features that you would want in world generation

Screenshot of the  voxel world in the unity editor view

Screenshot of the voxel world in the unity editor view

When looking into voxel engine optimization, it led me to the power of multithreading in Unity. By splitting up the tasks between the different cores on the CPU, I was able to significantly reduce the load on the main thread effectively removing the lag spikes and increased the word generation by ten fold. Complementing this with my 3D chunking system that I created which proved to be a game changer compared to the standard 2D chunking system I originally started with. It not only allowed for endless world generation in all directions, it also allowed for targeted optimization which meant that I only needed to load chunks that surrounded the player.

Screenshot of the voxel engine in engine

Screenshot of the voxel engine in engine

This whole side project took around 3 months to complete while I was attending college and doing my studies at the same time. This project allowed me to understand how to structure world generation systems for any future project, I was able to gain insight on how to set up data structures efficiently.

To bring the world to life, I built systems for structure generation, diverse biomes, and captivating cave networks. Imagine stumbling upon hidden ruins or exploring sprawling plains that transition into mountains. This variation in height and structure type creates a sense of discovery. The world doesn't stop at the surface, though, as intricate cave systems, generated with unique challenges and resources, offer a whole new dimension to explore.

Screenshot of the voxel engines underground generation

Screenshot of the voxel engines underground generation

In conclusion, the development of this voxel engine has been both a challenging and rewarding journey. It has not only enhanced my understanding of world generation systems and efficient data structures, but it also opened up a new realm of creativity and exploration within my game design knowledge. The fusion of procedural generation with the flexibility of voxels has created a universe of ideas brimming with possibilities.