Oops....
I've added the gui mod, as well as, sethome, sneak_glitch, and spawnpoint, all from MTG.
The version of gui and sfinv come from a github repository from burli, IIRK, where he had refactored a big part of MTG.
The generation times that you listed are consistent with what I get here, when all the mods are included. When running this before the addition of the gui mod, on_gen averaged 17 seconds. After adding the gui mod, on_gen times fell down to around 7 seconds. Yes, I am aware that this is rather slow, but I do not think the slowness comes so much from the mapgen, as it does from lib_materials and lib_ecology, both of which still need some TLC.
As for writing this in C for an engine based mapgen, that has been the goal. I just don't know if my C skills actually exist. Har har...
One think to point out, is the config lua file. While the options aren't yet documented, some are easily modified. There is a default "points" file, that the mod can load from the mod folder. The option is voronoi_mod_defaults, currently set to false. Set this to true to load the included points file.
I've found that the first time a new set of voronoi points are generated, the mapgen always just runs slower. If I restart the server, on_gen times drop.
There is also an option to add noise to the map using my modifications to Termos' Islands mod logic. This enables nice looking cliffs. Set map_type to "all" to generate the Islands noise on top of Voronoi cells. Set to "noise" to use only Islands noise, and set to "flat" to generate flat terrain. The flat is supposed to still generate the voronoi cells painted into the grass, but I think I botched that part. It's less useful for players anyway, more a dev setting.
Map scale should be left at 0.1, for now. This generates the voronoi within -3000 0 -3000 to 3000 0 3000. This has the effect of making all terrain seem closer. When set to 1, the entire world size is used, and terrain features are spread out, and hard to see the variations. I point all this out because when generating the voronoi points, I simply generate random values, with no weight or other processing on the values. As such, some voronoi cells may include more child cells than others. Meaning that oceans get big and deep, and you may have to move a good distance before finding land. A quick way to find land is to use one of the tier 1 point sets. These points mark the center of continents. These points are either the highest or near the highest terrain elevations, ie. mountains. The included point set is the "earth like" map from previous post. Land, at 0.1 scale, is close enough to see when spawning at map origin (0,0).
I am using MT 5.2.0 stable, on an Intel J2900 quad core processor with 8gb ram, builtin graphics with unknown memory, (256MB I think), and a standard 7200rpm HD. Nothing special by any means.
To make it run as lag free and smooth as possible, I set view distance to 20m, and alternate between full view and 20m. I find terrain generates and draws faster, even in full view, with distance set so low. Higher view distances cause the engine, and the client, to process and load far greater amounts of data before attempting to draw any of it. At 20m view distance, It loads and draws larger tracts of land quicker that trying to draw the same area volume with higher view distances.
That should give you a rough baseline for some comparisons.
Here is also my debug.txt, from the test I ran to make sure this all worked correctly. It shows the mapgen timing data.
Code: Select all
-------------
Separator
-------------
2020-07-03 19:37:12: [Main]: Using world specified by --worldname on the command line
2020-07-03 19:37:12: [Main]: [MOD] lib_player: Loading...
2020-07-03 19:37:12: [Main]: [MOD] lib_player: Version:0.1.0
2020-07-03 19:37:12: [Main]: [MOD] lib_player: Legal Info: Copyright 2019 shadmordre, Brandon_Reese
2020-07-03 19:37:12: [Main]: [MOD] lib_player: License: LGLv2.1
2020-07-03 19:37:12: [Main]: [MOD] lib_player: Successfully loaded.
2020-07-03 19:37:12: [Main]: [MOD] lib_materials: Loading...
2020-07-03 19:37:12: [Main]: [MOD] lib_materials: Version:0.1.0
2020-07-03 19:37:12: [Main]: [MOD] lib_materials: Legal Info: Copyright 2019 ShadMOrdre. Additional credits to Tenplus1, Gail de Sailly, VannessaE, runs, and numerous others.
2020-07-03 19:37:12: [Main]: [MOD] lib_materials: License: LGLv2.1
2020-07-03 19:37:12: [Main]: [MOD] lib_materials: Loading...
2020-07-03 19:37:12: WARNING[Main]: Not registering alias, item with same name is already defined: xocean:ocean -> lib_materials:stone_sea_cobble
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: dirt_with_grass_jungle_02 -> lib_materials:dirt_with_grass_jungle_02
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: dirt_with_grass_leafy -> lib_materials:dirt_with_grass_leafy
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: dirt_with_grass_swamp -> lib_materials:dirt_with_grass_swamp
2020-07-03 19:37:13: [Main]: [MOD] lib_materials: Successfully loaded.
2020-07-03 19:37:13: [Main]: [MOD] lib_ecology: Loading...
2020-07-03 19:37:13: [Main]: [MOD] lib_ecology: Version:5.0.2
2020-07-03 19:37:13: [Main]: [MOD] lib_ecology: Legal Info: Copyright 2019 ShadMOrdre. Additional credits to Tenplus1, Gail de Sailly, VannessaE, runs, and numerous others.
2020-07-03 19:37:13: [Main]: [MOD] lib_ecology: License: LGLv2.1
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: grass_green -> lib_ecology:grass_green
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: fruit_apple -> lib_ecology:fruit_apple
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: tree_banana_leaves -> lib_ecology:tree_banana_leaves
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: tree_banana_sapling -> lib_ecology:tree_banana_sapling
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: tree_banana_trunk -> lib_ecology:tree_banana_trunk
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: tree_karo_leaves -> lib_ecology:tree_karo_leaves
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: tree_karo_sapling -> lib_ecology:tree_karo_sapling
2020-07-03 19:37:13: WARNING[Main]: Not registering alias, item with same name is already defined: tree_karo_trunk -> lib_ecology:tree_karo_trunk
2020-07-03 19:37:21: [Main]: [MOD]: lib_ecology: Successfully loaded.
2020-07-03 19:37:21: [Main]: [MOD] lib_mg_continental: Loading...
2020-07-03 19:37:21: [Main]: [MOD] lib_mg_continental: Version:0.1.0
2020-07-03 19:37:21: [Main]: [MOD] lib_mg_continental: Legal Info: Copyright 2019 ShadMOrdre. Additional credits to Termos' Islands mod; Gael-de-Sailleys' Valleys; duane-r Valleys_c, burli mapgen, and paramats' mapgens
2020-07-03 19:37:21: [Main]: [MOD] lib_mg_continental: License: LGLv2.1
2020-07-03 19:37:21: [Main]: [lib_mg_continental ] Voronoi Data Processing ...
2020-07-03 19:37:21: [Main]: [lib_mg_continental] Voronoi Cell Points loaded from file.
2020-07-03 19:37:21: [Main]: [lib_mg_continental] Voronoi Data Processing Completed.
2020-07-03 19:37:21: [Main]: [lib_mg_continental] Base Max:11.8125; Base Min:-11.8125; Base Range:23.625; Ease Factor:0.0017916631673245;
2020-07-03 19:37:21: [Main]: [lib_mg_continental] Base Height:24
2020-07-03 19:37:21: [Main]: [MOD] lib_mg_continental: Successfully loaded.
2020-07-03 19:37:22: ERROR[Main]: NodeResolver: failed to resolve node name 'natural_slopes:slope_outer_dirt_coarse'.
2020-07-03 19:37:22: ERROR[Main]: NodeResolver: failed to resolve node name 'natural_slopes:slope_inner_dirt_coarse'.
2020-07-03 19:37:22: ERROR[Main]: NodeResolver: failed to resolve node name 'natural_slopes:slope_dirt_coarse'.
2020-07-03 19:37:22: ACTION[Main]: World at [/home/mgs/GAMES/502_server/bin/../worlds/00_010_ct_d_01]
2020-07-03 19:37:22: ACTION[Main]: Server for gameid="civtest_dev" listening on 0.0.0.0:30000.
2020-07-03 19:37:22: ERROR[Server]: You haven't set up an account.
2020-07-03 19:37:22: ERROR[Server]: Please log in using the client as 'MGS' with a secure password.
2020-07-03 19:37:22: ERROR[Server]: Until then, you can't execute admin tasks via the console,
2020-07-03 19:37:22: ERROR[Server]: and everybody can claim the user account instead of you,
2020-07-03 19:37:22: ERROR[Server]: giving them full control over this server.
2020-07-03 19:39:01: ACTION[Server]: MGS [192.168.1.102] joins game. List of players: MGS
2020-07-03 19:41:45: ACTION[Server]: MGS respawns at (-1,2,-1)
2020-07-03 19:41:56: ACTION[Server]: MGS granted (fast, teleport, bring, noclip, give, settime, fly) privileges to MGS
2020-07-03 19:43:14: ACTION[Server]: MGS leaves game. List of players:
2020-07-03 19:43:14: ERROR[Server]: Better HUD[error]: Not enough parameters given to change HUD item
2020-07-03 19:43:19: ACTION[Server]: MGS shuts down server
2020-07-03 19:43:19: ACTION[Main]: Server: Shutting down
2020-07-03 19:43:19: [Main]: lib_mg_continental_mg_continental lua Mapgen Times:
2020-07-03 19:43:19: [Main]: liquid_lighting: - - - - - - - - - - - - 0.9733365882353
2020-07-03 19:43:19: [Main]: loops: - - - - - - - - - - - - - - - - - 4.2062402941176
2020-07-03 19:43:19: [Main]: loops: - - - - - - - - - - - - - - - - - 2.0292274117647
2020-07-03 19:43:19: [Main]: makeChunk: - - - - - - - - - - - - - - - 7.4050064705882
2020-07-03 19:43:19: [Main]: noisemaps: - - - - - - - - - - - - - - - 0
2020-07-03 19:43:19: [Main]: preparation: - - - - - - - - - - - - - - 0.088138882352941
2020-07-03 19:43:19: [Main]: writing: - - - - - - - - - - - - - - - - 0.094565999999999
2020-07-03 19:43:19: [Main]: writing: - - - - - - - - - - - - - - - - 0.013497294117648
Shad
OSS:
Tropical coast.