Commit Graph

9 Commits

Author SHA1 Message Date
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 63002f643f initial fixes to make multi map work with mcl 2022-03-24 22:01:05 +01: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 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 1be55e012a Moved licensing around a bit. Committing levels code. 2018-07-19 11:48:34 +02:00
evrooije 35d768d79f Created framework for supporting multiple map generators per layer, with
a fallback (or default if need be) generator in case no layer specified
generator is found. Added sample/ basis mod to demonstrate registration
of map generators. Rewrote Proxima Testauri map generator to conform to
multi_map, simple map generator is fallback in demo. Testauri now uses
a single noise which increases generation time but reduces memory usage.
To try and reduce generation time, it keeps track of the last layer used
and based on that will not reinitialize unless the layer changes.
2018-07-18 23:22:18 +02:00