Commit Graph

62 Commits

Author SHA1 Message Date
cora f71182efea Merge pull request 'Register mcl2 overworld ores for multi_map layers' (#3) from biomegen into master
Reviewed-on: MineClone2/mcl_multi_map#3
2022-05-21 23:38:33 +00:00
cora 3366cfa8f9 re-register mcl2 overworld ores for each mm layer 2022-05-22 01:37:59 +02:00
cora 6cea031065 Merge pull request 'biomegen fixes' (#2) from biomegen into master
Reviewed-on: MineClone2/mcl_multi_map#2
2022-05-21 15:02:46 +00:00
cora 2091c6ac72 fix crash through wrong variable use 2022-05-21 15:02:22 +00:00
cora b74cfc0142 add setting to switch off biomegen 2022-05-21 15:02:22 +00:00
cora bc7e9b58df Merge pull request 'Add Biomegen' (#1) from biomegen into master
Reviewed-on: MineClone2/mcl_multi_map#1
2022-05-20 11:18:36 +00:00
cora c451a0fc75 Fix biomegen offset_y 2022-03-26 01:47:12 +01:00
cora 4bd2f3aa93 add biomegen for lua mapgens 2022-03-25 23:59:40 +01:00
cora bc34d97699 generators: move terrain and spike noise to init 2022-03-25 16:22:48 +01:00
cora 8a82953e5d Add biomegen to test mg 2022-03-25 16:22:28 +01:00
cora e6324c229a pass blockseed to individual mapgens
this is needed for biomegen to work.
2022-03-25 16:21:01 +01:00
cora 441c90b14e update readme 2022-03-24 22:03:16 +01:00
cora 63002f643f initial fixes to make multi map work with mcl 2022-03-24 22:01:05 +01:00
Emiel van Rooijen 792b695902
Merge pull request #2 from Treer/memory_optimize2
Optimize memory usage to reduce LuaJIT OOM errors
2019-02-11 12:50:07 +01:00
Emiel van Rooijen 82578e1f86
Merge pull request #1 from Treer/master
Fix "attempt to index a nil value" in layer 25 or higher
2019-02-11 12:09:43 +01:00
Treer 0220184ebc Optimize memory usage to reduce LuaJIT OOM errors
Improve speed and reduce LuaJIT out of memory crashes by not allocating a new voxel buffer every on_generated()
This fix requires Minetest v4.15 or later.
Reference: paramat's explanation of #3 https://forum.minetest.net/viewtopic.php?t=16043
2019-02-09 18:42:59 +11:00
Treer 17a5d87b48 CRLF -> LF 2019-02-09 18:18:13 +11:00
Treer 95e06fcc81 Add Minetest v5 .conf files 2019-02-09 18:13:56 +11:00
Treer f7430666f9 fix typo 2019-02-09 13:21:37 +11:00
Treer cf66603d61 Fix "attempt to index a nil value"
multi_map settings like number_of_layers must be finalized before invoking mmgen_*.lua files, as they invoke multi_map.register_global_2dmap() which create an array of global_2d_params - one for each layer.
2019-02-09 12:30:27 +11:00
evrooije adb42fa270 Source code reorganization. Global noises are now in a separate
file in order to make the core a bit more readable
2018-08-07 01:01:05 +02:00
evrooije 160ce77c20 Fixed offset Y bug causing repetition of terrain below the Y
centerpoint. Fixed lighting bug, seems that the nolight flag is
absolutely essential in order for everything to work correctly.
2018-08-05 23:26:00 +02:00
evrooije 423c153e47 Fixed missing test on the simple generators params (nil check),
parameterized the levels generator settings so they can now be
passed on generator registration, changed levels local noises to
global noises. Fixed HUD offset issue, where it would show the
wrong zone and relative coordinates off by 1. Added support for
per layer specific settings such as enabling/ disabling bedrock
or skyrock per layer, overriding certain other settings or
behavior, etc.
2018-08-03 12:30:42 +02:00
evrooije f24d4a3a80 Full implementation of layer wrapping, noise mixing and noise
mirroring on all edges. Teleportation implemented, also on all
edges.
2018-07-31 21:49:32 +02:00
evrooije e29ad477ea First (non-functional) cut at the layer wrapping code. Added some
additional hooks to control the core, overriding bedrock and
skyrock generation. Shadow caster can now be enabled/ disabled.
2018-07-28 20:45:53 +02:00
evrooije e369d9ceab Changed logo a bit 2018-07-25 00:25:40 +02:00
evrooije 9c8473740e Added text logo 2018-07-25 00:22:46 +02:00
evrooije 949a0194e8 Merge branch 'master' of https://github.com/evrooije/multi_map 2018-07-24 23:56:21 +02:00
evrooije cc1c7706d9 Adding smaller multi_map logo 2018-07-24 23:55:32 +02:00
Emiel van Rooijen 152483c65d
Update LICENSE
Minor formatting change
2018-07-24 23:45:49 +02:00
Emiel van Rooijen f76d29926f
Update LICENSE
Attributed authors of default:stone, added CC BY-SA 3.0 as the license of the bedrock texture to share alike
2018-07-24 23:32:22 +02:00
evrooije ae6c46f696 Added levels layer for demo purposes 2018-07-24 23:24:30 +02:00
evrooije 7045f4ad4a Added default as dependency 2018-07-24 22:24:09 +02:00
evrooije 1f2bcc5f81 Fixed some bugs, added HUD status to dump of mod state to log,
changed the default set of generators, using levels only for now
2018-07-24 21:20:38 +02:00
evrooije 66508f1615 Split code into different source files for better maintainability.
Added layer names and HUD system to display offset coordinates and
the layer number and/ or layer name
2018-07-24 19:26:28 +02:00
evrooije e41af0dc81 Added some documentation to the core 2018-07-23 22:04:13 +02:00
evrooije 939d3b3456 Added mod name to logging and logging mod settings/ stats on first
run of on_generated. Added caching of the perlin maps, i.e. when
the on_generated is called, the noise map array is stored when
it is retrieved by a generator plugin and kept until the on_generated
is finished. This allows chained generators to retrieve the same
global map without having to reinitialize it.
2018-07-23 20:47:33 +02:00
evrooije aa9c3c4921 Added global noise/ map functionality, allowing generators to
register their 2D noises with multi_map globally and retrieve
them during map generation. multi_map takes care of reusing last
cached map in case the same layer is used for performance/ memory
reasons. In addition, it prepares an array of parameters so that
the noises can be used in any layer (truly availble globally) with
seeds different for each layer (but based on the seed passed
during registration via random seeding). Placeholder for global
3D maps added, but not implemented yet.
2018-07-23 01:04:07 +02:00
evrooije 44b8ee2807 Enabled layer generation starting chunk, so layers can now start
generating at a different y position above -30912
2018-07-22 23:48:46 +02:00
evrooije 23fd0b8eb3 Formatting 2018-07-22 18:49:49 +02:00
evrooije b6338b55eb Forgot one reference to multi_map.c_air 2018-07-22 18:37:38 +02:00
evrooije 9c5dc8eec4 Updated mmgen_simple to use the new callback parameters and the
content id cache
2018-07-22 18:34:44 +02:00
evrooije 3464b6ec5d Removed lost debug print statement in core. Introduced content id
sort of cached table as per duane's underworlds mod. Introduced
shorthand alias mm for multi_map in case not other mods named mm
exist, so that it can be more easily used to reference the API, e.g.
to do vm_data[vi] = mm.node["default:cobble"] instead of having to
fully spell out multi_map
2018-07-22 18:28:23 +02:00
evrooije c62c518946 Adding multi_map logo 2018-07-22 17:55:56 +02:00
evrooije ce83c0ae17 Fixed offset y for the case where the center point is above 0 but
the y is below
2018-07-22 17:03:13 +02:00
evrooije b0093461a5 Completely different approach to the underground lighting problem
as per paramat's recommendation a temporary "shadow caster" layer
is written above the chunk when underground relative to the current
layer. This works perfectly and lighting works properly while at
the same time it is calculated by the engine. A major change in the
API was however necessary to limit memory usage. The VM, are and
VM data are now initialized in the multi_map core, and passed on
to the generators as otherwise multiple data arrays were created
(one for the shadow caster, one of the generator, one to remove
the shadow caster again) and multiple calls to set_data and
write_to_map... This is also much better in case generators
are chained (i.e. multiple generators being called within a
single mapgen on_generated call)
2018-07-22 14:24:43 +02:00
evrooije 39bccf6bef Added pure Lua lighting code, first cut (with lots of issues) 2018-07-22 03:33:51 +02:00
evrooije e26e2a3994 Fixed the relative/ offset y calculation. Copied engine's lighting
calculation in a block comment and started translating the code to
Lua
2018-07-21 12:20:46 +02:00
evrooije 33b611feec License fixes 2018-07-19 12:01:13 +02:00
evrooije 1be55e012a Moved licensing around a bit. Committing levels code. 2018-07-19 11:48:34 +02:00