![]() ![]() ![]() Individual drop in a water column on a single point does not have own “elevation”, we presume it is always positioned on the top elevation = TERRAIN + WATERĮach drop initializes on random position and (as expected) increased water value in WATER 2D arrayĮach drop when evaporates (after expiration of lifetime) decreases the water level on water 2D array TERRAIN is defined as 2D array and WATER is separate 2D array with count of drops per each field (pixel) ![]() The lifetime of a drop is defined (parameter of scrip) as a number of iterations (epochs) and all drops live the same timeĮach iteration every drop “wake up” and looks if it can move downward The number of drops is defined (parameter of scrip is drops per pixel) We start with raw diamond square filling up the TERRAIN array With exception of few areas on the earth.Īnd diamond-square algorithm create local minimums and maximums as a feature. The reason is that every point needs an water outflow way and is eventually connected to a sea that is generally lowest point on earth. I mean a complete valley completely encircled by slopes. But if you look at real world terrain - local minimas are almost non-existent. But this is out of scope of this my blog.ĭiamond-square algorithm is great here, and very easy to implement. Part of my workflow is to import output of this map generation script (an txt file) into widelands editor. My goal was and is to generate as realistic maps as possible. To get an idea visit and filter map by author ‘Tibor’ and ‘TiborB’ - both are me. This small work is to describe my experiences with generating maps for open source game Widelands. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |