P
Puhloo
Guest
GM Version: GM:Studio (Works on Legacy GM)
Target Platform: All
Download: .gmz file , .exe demo
Summary:
This is basically an example which shows how a world is generated using the diamond square algorithm/method. You can also easily apply this to your own game by simply taking the script!
Tutorial:
So what is diamond square algorithm? Also known as random midpoint displacement fractal, it is a method for randomly generating heightmaps for computer graphics. The diamond-square algorithm starts with a 2D grid then randomly generates terrain height from four seed values arranged in a grid of points so that the entire plane is covered in squares. (Taken from Wikipedia)
The example itself shows how a world is generated using 3 differently generated maps to create a biome somehow is based on this graph that I found in stackexchange:
As for the mountains and water, it is all based in elevation. Basically there are 3 grids that are combined to generate a biome map like below. (Humidity, Temperature, & Elevation)
A 640 x 640 map. Each pixel is a biome.
If you play the .gmz file or open the demo, you can press SPACE to restart the room and press Z to zoom in at the pointed area.
Target Platform: All
Download: .gmz file , .exe demo
Summary:
This is basically an example which shows how a world is generated using the diamond square algorithm/method. You can also easily apply this to your own game by simply taking the script!
Tutorial:
So what is diamond square algorithm? Also known as random midpoint displacement fractal, it is a method for randomly generating heightmaps for computer graphics. The diamond-square algorithm starts with a 2D grid then randomly generates terrain height from four seed values arranged in a grid of points so that the entire plane is covered in squares. (Taken from Wikipedia)
The example itself shows how a world is generated using 3 differently generated maps to create a biome somehow is based on this graph that I found in stackexchange:
As for the mountains and water, it is all based in elevation. Basically there are 3 grids that are combined to generate a biome map like below. (Humidity, Temperature, & Elevation)
A 640 x 640 map. Each pixel is a biome.
If you play the .gmz file or open the demo, you can press SPACE to restart the room and press Z to zoom in at the pointed area.