๐Diamond-square terrain generation
Algorithm:
Set random heights to corners
Square step: now pick center tile and set its height to the average of corners (diagonals from tile) + random offset
Diamond square: pick centers of each side, set their heights to average of neighbor tiles (horizontal and vertical) + random offset
decrease range of random offset, recurse into sub-squares starting from step 2