itch.io is community of indie game creators and players

Devlogs

Cave Systems - 3D Perlin Noise

Cavecraft - A Minecraft Clone
A browser game made in HTML5

I was able to get 3D perlin noise working which allows for cave systems to be added into the game. Game world optimization is the next step.. Wish me luck.

Script Not mine - C#

public static float Perlin3D(float x, float y, float z) {
        float ab = Mathf.PerlinNoise(x, y);
        float ba = Mathf.PerlinNoise(y, x);

        float bc = Mathf.PerlinNoise(y, z);
        float cb = Mathf.PerlinNoise(z, y);

        float ac = Mathf.PerlinNoise(x, z);
        float ca = Mathf.PerlinNoise(z, x);

        float abc = ab + bc + ac + ba + cb + ca;
        return abc / 6f;
    }

Download Cavecraft - A Minecraft Clone