Commit Graph

16 Commits

Author SHA1 Message Date
Gaël C
74733549df Various bugfixes and workarounds
Now working in pure Lua!
Some parts of the code are very hacky (e.g. noise) and the way new and old codes have been glued together is sometimes to be rewritten.
But at least it works.
2021-06-03 23:30:04 +02:00
Gaël C
cb297af047 Add all code for generating a grid on world creation.
Not tested ; will likely need much testing and bugfix.
2021-06-03 20:08:57 +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
Gael-de-Sailly
d5cf4a6267 Optionally center the map around x=0 z=0 2020-12-20 22:28:54 +01:00
Gael-de-Sailly
803114aaab Generate data in river_data instead of data 2020-11-14 19:12:12 +01:00
Gael-de-Sailly
6b9c091dd5 Fix file opening mode on the Lua side, to avoid crashes on Windows 2020-11-14 17:31:36 +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
6f43430574 Added glaciers, and re-organized noise definitions 2020-05-24 12:09:21 +02:00
Gael-de-Sailly
a73a0dd80b Avoid some redundant calculation on corners
(not very significant, but why not)
2020-04-27 21:08:15 +02:00
Gael-de-Sailly
a9ab0e53d3 Change folder structure: data files are now in a directory.
Also added a demo 400x400 map, that is overriden on pre-processing.
2020-04-26 23:29:36 +02:00
Gaël de Sailly
b429b302e1 Rewritten part of code to calculate river depth
Fixes bathymetry problems on turns or confluences, as well as abrupt riverbanks.
2020-04-26 22:19:05 +02:00
Gael-de-Sailly
206c68813e Switch again to using river direction and flux instead of table of bounds 2020-04-26 18:10:23 +02:00
Gael-de-Sailly
6af6795d90 Comment and clarify 2020-04-26 17:13:38 +02:00
Gael-de-Sailly
55725ad94b Re-organized the code. All polygon-related calculations go to polygons.lua. 2020-04-14 21:11:54 +02:00