Commit Graph

  • 77b05f044a Added caves (hardcoded for now) caves Gaël C 2024-02-12 22:22:24 +0100
  • b406bebb7b Use biomegen.skip_chunk and place it before timer. master Gaël C 2024-02-11 22:19:21 +0100
  • dcc71225ae Remove debug print Gaël C 2024-02-11 12:35:28 +0100
  • c8b96e2836 Find spawn position and effectively spawn player (yay!) Gaël C 2024-02-11 09:26:05 +0100
  • 6017510df0 Re-implement minetest.get_spawn_level Gaël C 2024-02-11 08:40:48 +0100
  • 70418f9526 Fix 2D index not being incremented Gaël C 2024-02-11 08:27:30 +0100
  • 0e3c83e1d2 Use biomegen.make_void_maps if present. (latest version of biomegen) Gaël C 2024-02-08 22:58:26 +0100
  • a91a13bbec Insert mapgen callback in first position, to ensure it is called first Improves compatibility with mods working on mapgen Gaël C 2024-02-07 10:54:31 +0100
  • 146f009684 Re-organize grid management code for less dependance between files Remove gridio.lua and move its function to appropriate files Gaël C 2024-02-01 19:30:07 +0100
  • 2cf3b19167 Generate grid directly in pregenerate.lua, not in a function Gaël C 2024-01-31 11:32:24 +0100
  • 4697f9c948 Remove "full" grid loading method I see no reason to let the choice between a greedy and a lighter loading method, so better remove it to simplify the code. Gaël C 2024-01-31 10:47:37 +0100
  • ed832a0806 Use only the 10 last digits of world seed at pregenerate Gaël C 2024-01-28 22:12:05 +0100
  • 72e2f3e670 Flow accumulation: minor fix and simplification dev Gaël C 2024-01-22 11:44:47 +0100
  • f350f8785c Flow routing: Initialize basin_graph + comment where complexity might be non-linear Gaël C 2024-01-22 11:06:03 +0100
  • 4bce5fab77 Completely unroll nested function in flow routing algorithm Gaël C 2024-01-22 00:55:51 +0100
  • b54f2c4546 terrainlib: More optimizations on flow routing Gaël C 2024-01-22 00:21:22 +0100
  • c723b28ec6 terrainlib/rivermapper.lua: Move checks out of the nested function Gaël C 2024-01-21 22:34:53 +0100
  • fe6e281130 terrainlib: loop only once for all singular nodes at step 2 of flow routing Gaël C 2024-01-21 22:00:23 +0100
  • 2acefb2660 terrainlib: compute current queue length instead of using '#' operator. Important speedup. Gaël C 2024-01-20 20:02:11 +0100
  • 0bc100030c terrainlib_lua: Hardcode flow_local for performance as it is unlikely that it will be changed one day. This results in a drastic performance improvement (x4 speed for step 1) Gaël C 2024-01-18 18:37:48 +0100
  • e9fa7f9a5c Adapt to multithreading, now it is working! mapgen_thread Gaël C 2024-01-05 00:02:30 +0100
  • f26fd1cccb Fixups Gaël C 2024-01-04 23:28:33 +0100
  • e5b8f2b3b8 Refactor to use only Settings objects for settings. Also remove globally stored path for modpath and data. Basically use less global variables for better adaptation to multithreading. Gaël C 2024-01-04 22:47:50 +0100
  • 6fa1852277 Replace table settings by the mod's Settings object (to be completed) Gaël C 2023-12-30 17:38:51 +0100
  • 11e6e72324 Started refactoring code structure to support a separate mapgen thread Probably not working for now (untested), still some things to do Also making the code cleaner Gaël C 2023-12-28 15:27:36 +0100
  • d00295600d Add a very brief description at the head of every file Gael-de-Sailly 2022-01-26 11:25:17 +0100
  • 0983c27cca Move geometry helpers back to heightmap.lua Gael-de-Sailly 2022-01-26 11:09:51 +0100
  • 6564d40b85 Refactor grid loading and reorganize code Move grid management functions out of polygons.lua, in a new file called gridmanager.lua Explicitly call other files and grid management functions from init.lua to make workflow more apparent Move mapgen loop out of init.lua, into mapgen.lua Gael-de-Sailly 2022-01-25 19:09:24 +0100
  • cd2a77803f Globalize some of the main functions This will allow to avoid nested 'dofile's Gael-de-Sailly 2022-01-21 14:22:22 +0100
  • b0930f4d40 Fix river shape in confluences (less sharp riverbeds when a small rivers joins a big one) Also cleaned and commented the code Gael-de-Sailly 2022-01-19 17:58:46 +0100
  • 975ad02739 Exclude exact riverbanks from rivers This avoids considering points that are exactly at the border of a polygon as rivers Gael-de-Sailly 2022-01-19 11:19:37 +0100
  • 6d8ee5af1f Added settings for margin, and documented in settingtypes.txt Gael-de-Sailly 2022-01-03 15:45:27 +0100
  • fabe107336 Added margin with a settable width near grid border Elevation gets closer to -50 when approaching the border Gael-de-Sailly 2022-01-02 15:13:12 +0100
  • 7e155b7076 Express map size in Minetest nodes, not in river grid nodes This introduces new parameters 'map_x_size' and 'map_z_size' that default to 15K Deprecates 'grid_x_size' and 'grid_z_size'; if they are present, corresponding values of 'map_x_size' and 'map_z_size' are automatically written in config files. Also rework compatibility system to better compare versions, and bump version to 1.0.2-dev1. Gael-de-Sailly 2022-01-18 17:58:51 +0100
  • 02f9805507 Fix river shape in confluences (less sharp riverbeds when a small rivers joins a big one) Also cleaned and commented the code fix_rivers Gael-de-Sailly 2022-01-19 17:58:46 +0100
  • fce6a33818 Exclude exact riverbanks from rivers This avoids considering points that are exactly at the border of a polygon as rivers Gael-de-Sailly 2022-01-19 11:19:37 +0100
  • 12c3394114 Express map size in Minetest nodes, not in river grid nodes This introduces new parameters 'map_x_size' and 'map_z_size' that default to 15K Deprecates 'grid_x_size' and 'grid_z_size'; if they are present, corresponding values of 'map_x_size' and 'map_z_size' are automatically written in config files. Also rework compatibility system to better compare versions, and bump version to 1.0.2-dev1. refactor_settings Gael-de-Sailly 2022-01-18 17:58:51 +0100
  • b374e8ee95 Create settings_default.json to store default values for settings Move noise parameters to settings.lua Gael-de-Sailly 2022-01-18 14:25:37 +0100
  • 1ad8c96b8c Remove 'default' hard dependency Gaël C 2022-01-17 23:19:17 +0100
  • 2f7098d752 Bump version (1.0.2) and add changelog v1.0.2 Gael-de-Sailly 2022-01-10 12:44:33 +0100
  • 942a869b9f Minor fix in README Gael-de-Sailly 2022-01-10 12:32:38 +0100
  • b3d79eaaf8 Added more comments in terrainlib_lua Gaël C 2022-01-07 14:48:36 +0100
  • 68c19c3b94 terrainlib_lua: replaced space indents by tabs Gaël C 2022-01-06 15:36:31 +0100
  • b1f4437a91 Added settings for margin, and documented in settingtypes.txt margin Gael-de-Sailly 2022-01-03 15:45:27 +0100
  • a00c1cbd39 Added margin with a settable width near grid border Elevation gets closer to -50 when approaching the border Gael-de-Sailly 2022-01-02 15:13:12 +0100
  • 417ce1bcbc Use builtin logging system and appropriate loglevels Gael-de-Sailly 2022-01-03 16:22:55 +0100
  • c3a798933f Localize all global functions in load.lua and geometry.lua Gael-de-Sailly 2022-01-03 16:20:51 +0100
  • 0c98fc0881 Skip chunks that are fully higher than ground level Gael-de-Sailly 2022-01-03 15:47:03 +0100
  • cb71f4400a Corrected mistake in settingtypes Gael-de-Sailly 2022-01-03 12:04:49 +0100
  • f8f467ac3f Use local variables for math.* functions and remove an unnecessary index calculation Gael-de-Sailly 2022-01-03 11:56:16 +0100
  • 2e29474686 Bump version (1.0.1) v1.0.1 Gael-de-Sailly 2021-09-14 15:07:11 +0200
  • b246cb775b view.py: use a different colormap for sea, to distinguish it from lakes distinguish_sea Gael-de-Sailly 2021-09-07 12:00:47 +0200
  • 27670addb3 Switch to singlenode mapgen if not done Gael-de-Sailly 2021-09-07 11:59:33 +0200
  • 54b94e6485 Updated screenshot v1.0 Gael-de-Sailly 2021-08-01 18:43:44 +0200
  • 09de0fd298 Added reference to scientific paper Gael-de-Sailly 2021-07-28 19:31:16 +0200
  • e3cadcdbc6 Collect garbage during pre-generation to free some space and reduce OOM problems terrainlib_lua Gaël C 2021-07-26 22:28:45 +0200
  • f7bc5ee0b4 Added logs during pre-generation Gaël C 2021-07-25 10:14:15 +0200
  • 2c5e0ee5af Code style consistency: use tabs for indentation in all Lua code Gaël C 2021-07-24 18:55:13 +0200
  • 95e87f8820 Updated README.md and added environment.yml Switching to full Lua incredibly simplified the amount of stuff needed in README! Gaël C 2021-07-24 18:49:17 +0200
  • db33e58f0a Make map size a setting Gaël C 2021-07-24 17:41:17 +0200
  • 31c5ea1025 Python map viewing: read conf file, and take world folder as input Gaël C 2021-07-24 14:44:54 +0200
  • c2c397c2a5 Added compatibility script to update parameter values coming from older versions Gaël C 2021-07-24 13:21:06 +0200
  • 9386ef51f1 Changed the way river width is determined in settings - min_catchment now in square nodes instead of cells - River widening power as input instead of calculating it from max_catchment Gaël C 2021-07-24 13:18:58 +0200
  • 8ce20816e1 Some changes in default settings - blocksize = 15 by default - base noise is eased - added tectonic compensation radius in settings Gaël C 2021-07-24 10:23:06 +0200
  • 32bc9561b6 Made interactive loading optional but enabled by default Gaël C 2021-06-26 13:13:41 +0200
  • 7e39189368 Load data on request instead of loading everything at first. Data is cached in memory in case it is reused. Offset values have a callback that converts them to the range ±0.5 Gaël C 2021-06-26 11:50:52 +0200
  • 636773487a Optimized load.lua by avoiding multi-argument packing Gaël C 2021-06-26 11:49:26 +0200
  • 9cda649c93 Fixed time statistics Gaël C 2021-06-26 11:26:45 +0200
  • ecd1f0e08f Added time statistics and removed debug prints Gaël C 2021-06-25 21:05:14 +0200
  • 5898354dbe Changed some default parameters Map centered by default Base noise higher and less wide horizontally Gaël C 2021-06-25 21:03:33 +0200
  • e14bc5216c Removed useless and deprecated files Gaël C 2021-06-23 19:56:37 +0200
  • a313244d07 Rename generate.lua -> pregenerate.lua Gaël C 2021-06-23 19:53:56 +0200
  • 0de2f746cf Update settingtypes.txt Gaël C 2021-06-06 17:17:28 +0200
  • de8d685471 New settings system, use a conf file instead of datastorage Added many missing settings, including pregeneration-related ones TODO: update settingtypes.txt Gaël C 2021-06-06 13:25:43 +0200
  • 51f3a2719d Generate and load map after mod loading This has needed to globalize map tables Gaël C 2021-06-05 11:24:28 +0200
  • b02387944d Pre-generation: reverse X and Y directions everywhere to make directions compatible with the mapgen code Gaël C 2021-06-04 18:24:06 +0200
  • 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. Gaël C 2021-06-03 23:30:04 +0200
  • cb297af047 Add all code for generating a grid on world creation. Not tested ; will likely need much testing and bugfix. Gaël C 2021-06-03 20:08:57 +0200
  • 19efeaaff6 Globalize modpath and worldpath Gaël C 2021-06-03 19:21:45 +0200
  • 0427b42d17 Removed Python terrainlib Gaël C 2021-06-02 18:56:46 +0200
  • 7495d8a690 Added grid twisting (twist.lua) Equivalent of Python terrainlib's 'bounds.py' Gaël C 2021-06-02 18:42:40 +0200
  • c99b8338e0 Lua Terrainlib: added first Lua files for erosion and flow routing Tested, but not linked with the mod, yet. Gaël C 2021-06-01 19:07:09 +0200
  • 462942cc22 Use iterative finite differences for diffusion, instead of gaussian blur Allows variable diffusion coefficients variable_erosion Gael-de-Sailly 2020-12-27 13:46:25 +0100
  • 1b96f52e47 Decrease variations of parameter m Gael-de-Sailly 2020-12-27 13:45:24 +0100
  • 3ccb6932ad Implement simple tectonics. Uplift and subsidence are determined with a noise, at every iteration. There is no distinctive pattern like tectonic plates, just vertical movements disturbing rivers from their equilibrium state, and thus creating more diversity. More lakes and waterfalls especially. Gael-de-Sailly 2020-12-24 11:52:08 +0100
  • 32f3cd9925 Fixed 3D noise map, and removed catchment_reference Now K and m are determined independently. Alsoo removed debug plotting. Gael-de-Sailly 2020-12-24 11:46:45 +0100
  • ae46ada648 Use a class for noise map generation, and add a function for 3D slice of a 2D noise. Gael-de-Sailly 2020-12-22 20:50:45 +0100
  • 4b1d11dd73 Implement variable K and m erosion parameters For now noise parameters are hardcoded. Gael-de-Sailly 2020-12-22 14:55:49 +0100
  • c175f2bbf7 Document conf files old_master Gael-de-Sailly 2020-12-24 14:47:53 +0100
  • ca68738ba7 Reworked parameters, and rename 'terrain.conf' to 'terrain_default.conf' Gael-de-Sailly 2020-12-24 14:39:38 +0100
  • 85e545d5ac Fixed sea level variations Gael-de-Sailly 2020-12-24 13:09:08 +0100
  • e0aecdc3f3 Added a second method for local flow calculation. It is possible to switch between them using the 'flow_method' parameter. Gael-de-Sailly 2020-12-24 12:42:18 +0100
  • 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. Gael-de-Sailly 2020-12-22 18:34:30 +0100
  • 9ffa150263 Added function 'noisemap' to generate a noise map with a quite unified parameter set, and an option for logarithmic noise. For future use. Gael-de-Sailly 2020-12-22 01:44:03 +0100
  • 2a9335332b Added optional sea level variations for the simulation. This results in more varied coastline morphologies. Gael-de-Sailly 2020-12-22 01:11:43 +0100
  • 9b4a9b2516 Rework default erosion parameters, Fix ignored values of K and m, and changed processes order. Gael-de-Sailly 2020-12-20 18:51:44 +0100
  • 7529291ab4 For bounds.py (calculation of offsets), use the same data type as rivers Gael-de-Sailly 2020-12-20 18:48:10 +0100
  • b4f97bec61 For noise map seed: don't go over ±4096, to prevent rounding errors on coordinates (because noise library uses 32-bit floats) Gael-de-Sailly 2020-12-20 18:11:11 +0100
  • 3dc874a494 Added description of the algorithm + acknowledge the authors of the paper. Gael-de-Sailly 2020-12-05 14:33:40 +0100
  • f0dddee33c Lakes map: keep initial height (reduces file size) Lake height is calculated for every basin, and there is a lake if lake height is higher than ground height. If it is lower, there is no lake. In that case, it was previously raised to ground level, but since this can be done in Lua, we can write initial lakes height in the files. This has the advantage of reducing file size, since there are bigger areas of equal values, that are more efficiently compressed. Gael-de-Sailly 2020-12-05 14:24:50 +0100