cf66603d61Fix "attempt to index a nil value"Treer2019-02-09 12:30:27 +1100
adb42fa270Source code reorganization. Global noises are now in a separate file in order to make the core a bit more readableevrooije2018-08-07 01:01:05 +0200
160ce77c20Fixed 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.evrooije2018-08-05 23:26:00 +0200
423c153e47Fixed 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.evrooije2018-08-03 12:28:11 +0200
f24d4a3a80Full implementation of layer wrapping, noise mixing and noise mirroring on all edges. Teleportation implemented, also on all edges.evrooije2018-07-31 21:49:32 +0200
e29ad477eaFirst (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.evrooije2018-07-28 20:45:53 +0200
1f2bcc5f81Fixed some bugs, added HUD status to dump of mod state to log, changed the default set of generators, using levels only for nowevrooije2018-07-24 21:20:38 +0200
66508f1615Split 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 nameevrooije2018-07-24 19:26:28 +0200
e41af0dc81Added some documentation to the coreevrooije2018-07-23 22:04:13 +0200
939d3b3456Added 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.evrooije2018-07-23 20:46:26 +0200
aa9c3c4921Added 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.evrooije2018-07-23 01:04:07 +0200
44b8ee2807Enabled layer generation starting chunk, so layers can now start generating at a different y position above -30912evrooije2018-07-22 23:48:46 +0200
b6338b55ebForgot one reference to multi_map.c_airevrooije2018-07-22 18:37:38 +0200
9c5dc8eec4Updated mmgen_simple to use the new callback parameters and the content id cacheevrooije2018-07-22 18:34:44 +0200
3464b6ec5dRemoved 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_mapevrooije2018-07-22 18:28:23 +0200
ce83c0ae17Fixed offset y for the case where the center point is above 0 but the y is belowevrooije2018-07-22 17:03:13 +0200
b0093461a5Completely 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)evrooije2018-07-22 14:24:43 +0200
39bccf6befAdded pure Lua lighting code, first cut (with lots of issues)evrooije2018-07-22 03:33:51 +0200
e26e2a3994Fixed the relative/ offset y calculation. Copied engine's lighting calculation in a block comment and started translating the code to Luaevrooije2018-07-21 12:20:46 +0200
1be55e012aMoved licensing around a bit. Committing levels code.evrooije2018-07-19 11:48:34 +0200
9303f35d5eFixed license, attributed paramat and included paramat's copyright notice and MIT licenseevrooije2018-07-19 03:15:37 +0200
2c2cba19eeIntroduced the ability to register a fallback or layer generator with arguments, updated simple generator to allow switching between different content ids for the terrain generation, i.e. it can now switch between stone and sandstone (the one registered is sandstone, the fallback does not specify arguments during registration so it uses a default, stone).evrooije2018-07-19 00:11:59 +0200
35d768d79fCreated 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.evrooije2018-07-18 23:22:18 +0200
d6d827849dFixed issue in simple mapgen depends.txtevrooije2018-07-17 23:35:05 +0200
18f6b8f3ccLighting seems to work properly, alignment is proper. Separated the simple mapgen code into multi_mapgen_simple mod and registered with multi_map_core which now properly calls the registered mapgenevrooije2018-07-17 22:59:58 +0200
d5d4520b2eTurned into a modpack, supplying simple mapgen. Changed to work on chunk boundaries. Current version does not call the registered mapgen yet, and simple mapgen is part of core (to be moved)evrooije2018-07-17 21:16:37 +0200
f643ce0700Further tweaking of the skyrock and bedrock layers, fixes in lighting and another refactoring with a first cut of a multi_map class and APIevrooije2018-07-15 23:42:46 +0200
a626ec05a1Made proper mod as the mapgen.lua was a file in default. So separated into correct mod named folder with init.lua, renamed bedrock and skyrock nodes to the correct namespace. Added textures folder.evrooije2018-07-14 12:38:27 +0200