3 ms·
This reminds me of the time I generated (2d) terrain for a game by toggling a random bit every time I computed a new value in the height map. The bit controlled
by bitwize 7y ago
This reminds me of the time I generated (2d) terrain for a game by toggling a random bit every time I computed a new value in the height map. The bit controlled the second derivative of the height map; 1 for +1, 0 for -1. Also every time the terrain height fell outside the clamp bounds, it would "bounce" (its first derivative would switch sign). It produced decent "rocky" terrain for a cave which is what I was going for.