
Procedural Generation Project
Procedurally Generated Voxel Worlds
Explore large, procedurally generated worlds.
A procedural generation project inspired by Minecraft.
Platform
Windows
Language
C#
Software
Unity
Visual Studio 2022
Adobe Photoshop
Contributions
Solo project
About the Project
This project was created as part of my procedural generation assignment at University, and is my first attempt at procedural generation, chunk loading, and multi-threading.
I am proud of my progress with this project so far, and I wish to further develop it by improving on the procedural generation features; such as applying different fractal layers to create more complex terrain, and to utilise Perlin Worms to generate more realistic cave systems and rivers.
I also aim to improve on the game-play features themselves by creating entities with their own AI, and adding behaviour to certain block types (water, for example).

What I learned
- How to create a voxel using Unity's Mesh. As the goal of the project was to generate voxel-based, I first had to learn how to create a voxel.
- Procedurally generating 3D terrain. After I had figured out how to create voxels, I then had to use noise values (generated using Perlin Noise) to determine what voxels to generate. I did this by performing multiple passes.
The first pass checks if the position is above or below sea level, and if the position is above the maximum terrain height for the world.
The second pass uses the noise value to determine what biome the voxel is within, and then uses the biome data to determine it's block type.
The third pass checks whether the voxel is underground or not, and then uses 3D Perlin Noise to determine if the voxel should be "dug out" to create a cave, or if the voxel should be an ore (biome dependent).
The final pass then checks if vegetation, such as a tree, should grow at that point in the world.
Each pass utilises different noise values to develop further detail in the world.
- Chunking terrain. As I didn't want an entire world to exist at one time, I had to figure out how to split the world into chunks. Each chunk contains a noisemap that represents the noise value of each voxel within it, and the chunks can be loaded, updated, and unloaded individually, depending on the player's location.
- Multi-threading in C# / Unity. As the amount of calculations for more detailed noise maps increased, the FPS began to drop during gameplay. To deal with this, I had to first refactor my code so that any UnityEngine functionality was not used within my code for world generation. This is because a lot of the UnityEngine library is not thread-safe. I then separated my chunking system into three parts. Loading, Updating and Drawing. Loading and updating would be threaded, as they did not use any incompatible (with threading) Unity functions. Whereas Drawing was managed on the main thread, as I was using Unity's Mesh to draw the terrain.
- How to create ShaderGraphs in Unity
- How to create and utilise a texture atlas
Current Goal
My current goal with the project is to refactor my chunk loading code, and to also redo the physics system I have in place as it is very bloated in its current state.




