A downloadable voxel project

A voxel world built "chunk by chunk" where new chunks will load in as the player moves closer, and further chunks will be deleted. The terrain, caves, and ore/stone/dirt generation is all done using the idea of 3D perlin noise functions for randomized yet realistic terrain which can be adjusted/modified in the code.

Based on Penny de Bal @Holistic3d.com and her well taught Udemy course on "How to Program Voxel Worlds" where I made my own modifications and developed my own version from a fresh unity screen --- https://www.udemy.com/course/unityminecraft/

Rather than using a Unity cube and using all faces of a cube, I made my blocks quad by quad, so we don't have to display the cube faces that wouldn't be seen by the player (like if another block is on top of a cube, there is no point in showing that top cube face)

This can be optimized more if I tried including some multi-threading and recursive techniques, but this was already complex as it is, so I didn't risk breaking everything anymore.

Download

Download
Minecraft_Terrain_Generation_Unity.zip 29 MB

Install instructions

Unzip the folder. Click on and run the scene in Assets>Scenes>MinecraftScene.unity.

Was running this on a 2019 Macbook Pro in Unity v2019.3.0f3.

Unfortunately, you have to modify the code directly to get different terrain results. The parameters at the top in World.cs (chunkHeight, chunkSize, and radius) and PerlinFunctions.cs. Change just the offset number from between 0-50000 to get a random terrain with the same parameters. Also, in Chunk.cs, there's a section of code that uses a lot of if/if else statements and FBM function calls. This is where you can change the variation in cave, ore, air, etc. generation among the terrain (although it can be kinda finicky so be careful)

Leave a comment

Log in with itch.io to leave a comment.