This is unfinished but there's been a bit of interest in my previous terrain generator so thought I'd put this out as is. Just added a rather suspect 3d renderer... Clunky as heck but does the job... ish, just click and drag to rotate. This is a massively improved codebase of the previous incarnation. The output is vastly improved and the rock and tree formations are much more realistic. The plan is to add a 3D render and all the necessary controls to make a wide variety of terrains with it. However, it's not finished, but hit the green flag and it'll create a new terrain for you. Hit it again and you'll get another one! Recommend turbowarping for maximum satisfaction. https://turbowarp.org/887965162
Everything by me apart from the Perlin Noise Generation by Java_Programmer Feel free to remix and improve upon it... Don't just remix it and pretend you did it! How does it work? It first lays down 3 scales of perlin noise, big, smaller and smaller still and added all of these up for each point. This gets normalised so it fits in a select range of values. Then a rock layer is created, this picks a random spot and kinda dabs the canvas around that point building up rock formations. It then checks for steep slopes in the perlin noise map and adds rocks to those steep inclines too. Trees are planted much in the same way as the rocks, pick a random point and dab randomly around to make a forest. Shrubs are the same as trees but only plants one before picking a new random spot. The height layers, rocks, trees and perlin noise are combined into one base height map. Shadows are calculated based on the new combined height map layer creating a light map layer. The colour layers are then combined to create a single colour map. Then the whole thing is rendered, adjusting the colour of the point based on the light map layer.