This very simple piece of code is still very alpha, and to just share the idea, have a working PoC people can try out. Lots of stuff is still missing and lots of work to do, but I wanted to get the basic concept working first, share the idea and a bit of code ...
EDIT changed link: https://github.com/evrooije/multi_map
"Problem":
Standard mapgen generates stone all the way down and requires carving out subworld terrain instad of (re)using the same logic of terrain generation for all layers. To use the sky more effectively, again (different) mods or floatlands can be used but oceans are an issue and the complexity having to deal with multiple mods is increased. Many times, only a few layers (or a single one in case of the sky) are added and a lot of space on the Y axis is still not used effectively. There is not really a straightforward, simple way to increase the usable area of a world.
Proposal and goals:
Create a singlenode pure Lua map generator that allows generation of multiple layers of terrain and ocean stacked on the Y axis, or, multiple worlds if you will. To effectively use all the available space on the Y axis that would otherwise be occupied by stone and air, without having to go through a lot of effort. Each layer using the same logic to create the terrain, each layer having its own ocean and eventually biomes, ore generation, etc. To simulate a world area larger than the current "limitation" of 65536x65536 nodes.
E.g. using 8 layers will "increase the area" to 524288x524288 nodes, each layer being 8192 high. Using 16 layers offers an area of 1048576x1048576, each layer being 4096 high. Please note, this obviously will not (and cannot) offer a seamless transition from one layer to another and requires a travel mechanism from one layer to another.
Pics or it didn't happen, an extreme case of 1024 layers each 64 blocks high.
I want to make something that will run out of the box, but also offer a framework that modders can easily customize or extend. Some of the additional things I have in mind (feel free to add any in the comments):
- Every layer will have its own noise for the height map, giving each layer an unique terrain (next on my list)
- Optional "bedrock" and a way to plugin existing bedrock mods by e.g. setting bedrock node type in module's configuration, other (optional) mechanisms to avoid normal player travel between layers
- Optional invisible impenetrable layer to avoid seeing the bottom of the next layer up, as suggested by GreenDimond and hopefully to also avoid lighting problems as pointed out by duane
- Hooks for custom terrain generation logic, or use the one supplied by the mod
- Optional mechanism for travel between the worls (i.e. portals), but of course it can be switched off and subgame developers can implement their own travel mechanism or integrate existing portal mods
- Customizable number of layers and an optional zoning system allowing sane display of coordinates (e.g. coordinates displayed as "Zone: 6; Position: 10.5, 15.0, -18.4" where the Y is offset based on the zone to show "sane" coordinates). This will not change the debug coordinates of course, just something to show on the HUD
- Zone numbering (as per above) or zone naming (e.g. "Zone: Nether; Position: 10.5, 15.0, -18.4")
- Pushing zone information as parameter for terrain generators, e.g. allowing different map generator code per layer (besides the obvious changes one can do with the perlin noise parameters), different biomes and decorations (e.g. jungle zone, desert zone, etc.), etc.
- Pluggable decorators and ore generators, again with zone information supplied so it can be changed or tweaked per layer
Let me know what you think or if you have any comments!