Commit Graph

13 Commits

Author SHA1 Message Date
Gael-de-Sailly
d00295600d Add a very brief description at the head of every file 2022-01-26 11:25:17 +01:00
Gael-de-Sailly
0983c27cca Move geometry helpers back to heightmap.lua 2022-01-26 11:09:51 +01:00
Gael-de-Sailly
cd2a77803f Globalize some of the main functions
This will allow to avoid nested 'dofile's
2022-01-21 14:22:22 +01:00
Gael-de-Sailly
b0930f4d40 Fix river shape in confluences (less sharp riverbeds when a small rivers joins a big one)
Also cleaned and commented the code
2022-01-20 15:28:14 +01:00
Gael-de-Sailly
975ad02739 Exclude exact riverbanks from rivers
This avoids considering points that are exactly at the border of a polygon as rivers
2022-01-20 15:28:14 +01:00
Gael-de-Sailly
6d8ee5af1f Added settings for margin, and documented in settingtypes.txt 2022-01-20 15:28:14 +01:00
Gael-de-Sailly
f8f467ac3f Use local variables for math.* functions
and remove an unnecessary index calculation
2022-01-03 11:56:16 +01:00
Gaël C
de8d685471 New settings system, use a conf file instead of datastorage
Added many missing settings, including pregeneration-related ones
TODO: update settingtypes.txt
2021-06-06 13:25:43 +02:00
Gaël C
19efeaaff6 Globalize modpath and worldpath 2021-06-03 20:04:08 +02:00
Gael-de-Sailly
83728cc932 Fixed lakes elevation
There were sometimes missing water patches near a lake's edge, when the neighbour catchment area was lower.
This commit allows to divide a cell into several mini-catchment basins, to fill only a part of it with water.
2020-12-24 14:48:17 +01:00
Gael-de-Sailly
faef1658a9 Fixed map centering, and converted polygon coordinates to map nodes instead of grid nodes. 2020-12-22 16:38:30 +01:00
Gaël de Sailly
25c5cb2e1f Reverse axes order for heightmaps (iterate in Z direction first instead of X) 2020-07-21 12:46:23 +02:00
Gael-de-Sailly
4edd1a946e Horizontal shifting according to 3D noises:
makes slopes more irregular and natural-looking, allows overhanging.
This is done by generating an intermediate 2D elevation map and, for each node in 3D, add a 2D offset vector to the position, and seek this position on the heightmap.
2020-05-23 15:52:16 +02:00