Warning: Rewrite of Mapgen V7 floatlands

Post Reply
User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Warning: Rewrite of Mapgen V7 floatlands

by paramat » Post

The optional floatlands in mapgen V7 (which for 3 years have been disabled by default and documented as "highly unstable") will soon be completely rewritten and improved. I hope to have the replacement ready in time for MT 5.2.0 stable release.

To reduce disruption, i advise that anyone thinking of starting a new mapgen V7 world with floatlands enabled, does not do so, and waits for the new implementation in MT 5.2.0 stable.
Of course, you can if you want =) but the structure of the floatlands will radically change in MT 5.2.0 stable, perhaps causing some leaks from half-generated lakes (see below).

If anyone has a mapgen V7 world with floatlands enabled, the mapgen flag will be preserved for that world, so when the new implementation arrives these worlds will continue to have floatland generation. At changeover to the new generation, there may be some leaks from half-generated lakes (see below).

If anyone uses the development version of MT and has a mapgen V7 world with floatlands enabled:
Floatland generation will soon stop happening, when i remove the current code, then some weeks later will start again when i add the new code.
Note that when generation stops, any half-generated floatland lakes will then leak water onto the terrain below, so you might want to fly around to check for these and build walls across them.

I will update this thread with news.
Last edited by paramat on Wed Jun 24, 2020 19:47, edited 1 time in total.

User avatar
Wuzzy
Member
Posts: 3981
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Warning: Rewrite of mapgen V7 floatlands

by Wuzzy » Post

That's interesting. What are your plans with the floatlands, apart from fixing leaking lakes?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of mapgen V7 floatlands

by paramat » Post

Important update:

Mapgen V7 floatlands are now removed from MT development version.
If you have any V7 worlds with floatlands enabled, here is some advice about how to manage the changeover to either a MT dev version without floatlands, or to MT 5.2.0 stable which will have a new (but still unstable) implementation.

You can take action either before you changeover or after, but before is recommended and safer.

///////////

Before changeover:

Use a MT mapping program to map out the full extent of your floatlands. Make sure to set the mapping y-limits to include the mapchunk layer containing the floatland lakes (with default floatland level and default chunksize this mapchunk layer will be from y = 1248 to y = 1327).

Looking at your maps, if you see any half-generated floatland lakes, travel to them and fly around to generate them completely.
On changeover you will then not have any half-generated leaking lakes to worry about or fix.

///////////

After changeover:

Map out the floatlands as above.

Looking at your maps, if you see any half-generated floatland lakes, travel to them and build sand walls across the edge to stop the leaks.
Any water that has already started to fall to the world surface below will eventually disappear if you follow it down to the surface.

///////////

Wuzzy, well for a start, the new floatlands will not have lakes. Putting lakes in the sky was one of the big mistakes i made =D

User avatar
Linuxdirk
Member
Posts: 2554
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Warning: Rewrite of mapgen V7 floatlands

by Linuxdirk » Post

paramat wrote:Putting lakes in the sky was one of the big mistakes i made =D
Nah, putting lakes in the sky is cool. Only not properly making sure that thy don’t leak was a mistake :)

User avatar
ShallowDweller
Member
Posts: 77
Joined: Thu Nov 02, 2017 22:23

Re: Warning: Rewrite of mapgen V7 floatlands

by ShallowDweller » Post

Linuxdirk wrote:
paramat wrote:Putting lakes in the sky was one of the big mistakes i made =D
Nah, putting lakes in the sky is cool. Only not properly making sure that thy don’t leak was a mistake :)
Agreed! People use mods that add lakes above sea level for a reason :3

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of mapgen V7 floatlands

by paramat » Post

Unfortunately the new floatland implementation will not be in MT 5.2.0 as i had intended, but will probably be in MT 5.3.0.
The PR was ready for merge to be in MT 5.2.0 but some other core devs preferred to move merging to after the release of MT 5.2.0 in order to start the 'feature freeze' on 07/03/20.

So MT 5.2.0 will not have floatlands in Mapgen V7, however if you simply leave the 'floatlands' mapgen flag set for a world they will re-appear in MT 5.3.0.
MT 5.3.0 is intended to follow fairly soon after MT 5.2.0.

User avatar
Wuzzy
Member
Posts: 3981
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Warning: Rewrite of mapgen V7 floatlands

by Wuzzy » Post

'feature freeze' on 07/03/20
Quoted for emphasis. Weird that this didn't make the News …
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

Re: Warning: Rewrite of mapgen V7 floatlands

by acidzebra » Post

I'm excited for the return of floatlands, any insight on where you're at with the code?

User avatar
v-rob
Member
Posts: 752
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
Location: Right behind you.

Re: Warning: Rewrite of mapgen V7 floatlands

by v-rob » Post

The PR for floatlands is here: https://github.com/minetest/minetest/pull/9296

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of mapgen V7 floatlands

by paramat » Post

The new Mapgen V7 floatland implementation has been added to MT development version.

The new floatlands exist in a volume from y = 1024 to y = 4096, instead of a single layer at y = 1280.
Therefore, MT users who have an old V7 world with the 'floatlands' mapgen flag enabled might want to customise the new floatlands in some way (for example making them as as similar as possible to the old implementation).
Here is how to do that when you update to a version of MT that has the new floatlands:

1. After updating your version of MT, use a new V7 test world to experiment with the floatland parameters, to find a set of parameters that satisfies you.
Make sure to carefully read the floatland parameter notes shown in the 'All Settings' menu, or read them here https://github.com/paramat/minetest/blo ... .txt#L1618
One of the parameters is dangerous to worlds if misused.

2. Enter your old V7 world but do not move or move the view direction (to not generate any new world), then immediately exit the world and shut down MT.
This will update the mapgen parameters in the world's 'map_meta.txt' file (found in the world folder) to the new floatland parameters.

3. Open this world's 'map_meta.txt' file in a text editor and edit the new floatland parameters to what you require.

4. Enter your old V7 world and explore to generate the new floatlands.

I will soon post in this thread a set of new floatland parameters that result in the closest possible match with the old floatland implementation.

User avatar
Linuxdirk
Member
Posts: 2554
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Warning: Rewrite of mapgen V7 floatlands

by Linuxdirk » Post

Too bad this super low height prevents adequate high mountains in future because those mountains would interfere with the default floatlands settings.

User avatar
Wuzzy
Member
Posts: 3981
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Warning: Rewrite of mapgen V7 floatlands

by Wuzzy » Post

I agree, it was a mistake to reduce the minimum height even further. Should have at least sticked with the minimum of 1280.

And I don't want to hear the excuse “but it can be changed in the settings!”. I don't care. A good software needs reasonable defaults.

Please change it back to at least Y=1280.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of mapgen V7 floatlands

by paramat » Post

Those are misunderstandings, it actually works out the same.

Previously:
The widest part of floatlands was at 1280, with tapering (inverted mountains) extending as much as 256 nodes below.
The 'shadow limit' setting was 1024, which marked the lowest possible extent of floatlands.

Now:
The 'floatland ymin' setting of 1024 is the lowest possible extent of floatlands.
'floatland taper' is set to 256, so tapering starts 256 nodes above, at 1024 + 256 = 1280.

By default, mountains in Mapgen V7 have an approximate maximum height of 500 nodes.
You would actually need to reconfigure mountains for them to get near or reach the floatlands, in which case reconfiguring floatlands to be higher (if desired) is no issue.
Or you could let very high mountains intersect floatlands, creating a way up there.

User avatar
Wuzzy
Member
Posts: 3981
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Warning: Rewrite of mapgen V7 floatlands

by Wuzzy » Post

Ah.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of mapgen V7 floatlands

by paramat » Post

Here are the 'new floatlands' parameters that emulate the old floatlands as closely as is possible.
That is, a single layer of floatlands on a common level with a 2-node thick rim at y = 1279/1280:

Code: Select all

mgv7_floatland_ymin = 1023
mgv7_floatland_ymax = 1536
mgv7_floatland_taper = 256
mgv7_float_taper_exp = 0.75
mgv7_floatland_density = 0.0
mgv7_np_floatland = {
    offset      = 0.0,
    scale       = 1.5,
    spread      = (250, 350, 250),
    seed        = 5333,
    octaves     = 5,
    persistence = 0.63,
    lacunarity  = 2.0,
    flags       = 
}

Chrysolite Azalea
Member
Posts: 29
Joined: Sun May 03, 2020 05:38
GitHub: ChrysoliteAzalea

Re: Warning: Rewrite of mapgen V7 floatlands

by Chrysolite Azalea » Post

Just wonder, are there lakes of any type (water lakes, lava lakes, underground lakes) generated on floatlands?

User avatar
uwu
Member
Posts: 42
Joined: Sun Jan 21, 2018 15:01

Re: Warning: Rewrite of mapgen V7 floatlands

by uwu » Post

I haven't found any in 15 minutes of flying over the floatlands from the latest code, but I wish there were.

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of Mapgen V7 floatlands

by paramat » Post

Announcement of new floatlands special ability
--------------------------------------------------------------

The new floatlands will be usable in Minetest 5.3.0 which will be released very soon.

The new floatlands do not have lakes by default, this is for several technical reasons, the old floatlands were problematic in several ways. For the technical details see the issue and pull request at GitHub.
One advantage of the new implementation is that the new floatlands are now compatible with all games, because a special set of biomes is not required.

In this and another forum topic i have already hinted about customising the new floatlands, but now i want to clearly describe the special ability.

* The new floatlands can be customised to become a solid 'upper world layer' of any position and thickness.
* Parameters have been added to then customise the structure of the upper surface of this world layer so that it can become a simple but satisfactory world surface. The floatland 3D noise parameter also has a large effect on the world surface structure.
* Another parameter allows a sea level to be defined for this world surface, to add seas and lakes.

*** Warning ***

The new floatlands must be customised to become a solid world layer before liquid is added.

If the floatland layer is not solid, this will cause massive volumes of liquid to flow downwards through the gaps, harming server performance. These massive volumes of liquid will eventually leak through the floatland layer and fall to the normal world below, causing a massive mess that will be very difficult to clean up.

Always test your custom parameters in a test world first.

When i state 'must be a solid world layer', i do not mean caves must be avoided.
Caves are relatively small, so liquid flowing into them does not have much volume. The tunnel systems tend to form bends and loops that do not allow liquid to flow downwards long distance.
Caves are harmless as long as your upper world layer has at least, very approximately, a 100 node thickness of solid structure.

***************

This special ability could be used for a moon, an alien planet, an upper world layer, or a separate 'dimension'.

If you customise the parameters to create an upper world layer with seas and lakes, you will need to use a game with a suitable set of biomes that includes a second cycle of underground, seabed, beach/shoreline and land biomes at the required levels. Minetest Game will not be compatible, but it can be modded to alter the set of biomes.
For experimentation, you can use unmodded Minetest Game, or any game, and disable the 'decorations' in mapgen parameters.

Sokomine
Member
Posts: 4070
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: Warning: Rewrite of Mapgen V7 floatlands

by Sokomine » Post

Do those lakes occour at all heights? Or is it just a diffrent "water level" for the floatlands? As my lakes mod places the lakes manually, it might be relatively easy to add checks so that a ground will always be added. Spills from sidewise caves may still happen. It may even look good to have the occasional waterfall, even on normal, non-floatland worlds. I havn't managed to create an algorithm for good looking waterfalls yet.
A list of my mods can be found here.

User avatar
Wuzzy
Member
Posts: 3981
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Warning: Rewrite of Mapgen V7 floatlands

by Wuzzy » Post

If the floatlands can cover a complete Y level, wouldn't they cast a shadow to the Overworld? And if not, why not?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
firefox
Member
Posts: 1573
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: Warning: Rewrite of Mapgen V7 floatlands

by firefox » Post

Wuzzy wrote:
Wed Jul 01, 2020 18:11
If the floatlands can cover a complete Y level, wouldn't they cast a shadow to the Overworld? And if not, why not?
i remember reading somewhere that shadows have a height limit, so there won't be a shadow below a certain distance?
=(^.^)= nyan~

User avatar
PolySaken
Member
Posts: 619
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: djelibabi
Contact:

Re: Warning: Rewrite of Mapgen V7 floatlands

by PolySaken » Post

firefox wrote:
Fri Jul 03, 2020 05:22
Wuzzy wrote:
Wed Jul 01, 2020 18:11
If the floatlands can cover a complete Y level, wouldn't they cast a shadow to the Overworld? And if not, why not?
i remember reading somewhere that shadows have a height limit, so there won't be a shadow below a certain distance?
In my experience shadows do not have a height limit. It depends mostly on whether the shadow can actually make it to the ground; If the area between the ground and the floating object is not fully loaded there will be no shadow.

User avatar
paramat
Developer
Posts: 3662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Warning: Rewrite of Mapgen V7 floatlands

by paramat » Post

Sokomine,
The 'floatland water level' is a single level of liquid everywhere, just like the normal world surface below.

Wuzzy, firefox, PolySaken,
Mapgen V7 floatlands have never been able to cast a shadow on the normal world below in any situation, because i made a commit years ago that allows disabling (in engine mapgen or Lua mapgen) the downwards propagation of shadow for a generating mapchunk.
Shadow propagation is disabled in a layer of mapchunks a little way below the lowest extent of floatlands.

Shadows do not have a height limit.
Normally, shadow will only propagate into the mapchunk below if you generate the upper mapchunk first and then generate the lower mapchunk.
So for unlimited propagation of shadow, a vertical stack of mapchunks has to be generated in consecutive order from top to bottom.

User avatar
DrFrankenstone
Member
Posts: 169
Joined: Tue May 24, 2016 05:36
GitHub: treer
Location: Melbourne, Australia
Contact:

Re: Warning: Rewrite of Mapgen V7 floatlands

by DrFrankenstone » Post

Would you be interested in creating a find_surface() lua function for the new floatlands?

It might be handy for someone as a get_spawn_level() alternative (or override, if that's possible), but my interest in it is to include the function into portal_examples.lua in the nether mod, enabling a floatlands portal to open at ground level (usually).

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests