Add indestructible node bottom layer to core mapgens

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

Add indestructible node bottom layer to core mapgens

by Wuzzy » Thu Jun 11, 2015 23:33

I suggest to introduce basic bedrock support for the map generators v5, v6, v7 and maybe future generations as well.

(If you don't like the name “bedrock” feel free to think of a better name.)

The point of this is simply to close the bottom layer of the world, because the bottom of the world behaves pretty weirdly and it looks pretty ugly, glitchy and unprofessional anyways, and it just “feels” not right together with these mapgens. One way to circumvent this is by adding an indestructible solid node layer at the bottom of the world.
The idea of bedrock is basically just of technical nature, it is to mark the bottom of the world. Bedrock is supposed to be a block which is completely indestructible and unchangable by normal gameplay means.
Since the mapgens v5, v6 and v7 are supposed to create “Earth-like” worlds, it would make a lot of sense to put this directly into all these mapgens.

The most basic bedrock support should set bedrock (suggested mapgen alias: “mapgen_bedrock”) everywhere at the lowest possible layer (currently at Y=-30912). This is very simple but does the job.
Maybe later more fancy bedrock generation methods could be invented, but I think we should start simple and first implement the bare minimum and get it to work before going on.
The cave generator and dungeon generator MUST NOT destroy bedrock, regardless of the node definition; at least at the bottom-most position. This is again to avoid exposing the true bottom at all costs.

I know that all of this could be done in a mod, but I think this bedrock support is something which is EXTREMELY basic, I see no reason why ANY subgame using one of these mapgens would not want this, and even in the unlikely case it wants to, it can always overwrite it using LuaVoxelManipulator.
Modders and especially subgame authors should not be required to reinvent the wheel.

Mods could still overwrite anything afterwards and extend upon this.

If the mapgen alias “mapgen_bedrock” is not defined, I suggest to use “mapgen_stone” as a fallback.

This is also something of which Minetest Game could directly benefit from it. All Minetest Game has to do is to define a new bedrock node, ensure it is indestructible and set the mapgen alias. See [bedrock2] for an example node definition which has been tested. The two cases where this bedrock is still breakable is a) because of the (desert) dungeon generator probably being too aggressive and b) because of ignorant TNT mods (they don't use on_blast), both for which this mod is not responsible. b) has already been fixed in Minetest Game.
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43

Re: Add indestructible node bottom layer to core mapgens

by Dopium » Fri Jun 12, 2015 04:10

I was thinking the same thing a while back, after messing around near -31000. If you disturb gravel and it falls through the map errors occur. The problem is the fallen gravel will be randomly placed back in the map and kind of messes up the world (potential griefing).

This is one picture of an error:
Image
Attachments
11.png
11.png (136.6 KiB) Viewed 1062 times
 

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

Re: Add indestructible node bottom layer to core mapgens

by Wuzzy » Fri Jun 12, 2015 12:25

About the bug (which is slightly off-topic): Here is a GitHub discussion: https://github.com/minetest/minetest/issues/2702
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Sun Jun 28, 2015 05:49

I prefer how the world base is currently, it matches the world sides and top in having a mysterious impassable void.
The Minetest world is a cubic planet floating in space, i feel it is right for all 6 limits to come into direct contact with the void. Bedrock leaves a player wondering what is below, and suggests there may be something below, coming into contact with the void makes the limit known and experienceable.

After i first read this thread i realised we already have support for replacing stone with nodes of choice at any depth: the biome API, then i remembered i had limited the biome API the the world surface and above. Because the biome API can replace stone it really should be enabled throughout the world, and hmmmm strongly agreed, so i have now removed the limit. This only works in mgv5/mgv7 and any future mapgen that uses the biome API, in mgv6 you will have to use a voxelmanip mod, support is not needed enough to add c++ code to mgv6, especially since the voxelmanip can do this so quickly.

From Github:
"The biome api of mgv5/mgv7 has now been extended down to world base. Because it can replace stone with any node of choice you can use it to place bedrock at any depth by defining a bedrock biome between chosen ymin/ymax. Note that underground biomes are only calculated once per mapchunk column, at column top, so underground biomes have a vertical resolution of the thickness of a mapchunk, so you will only be able to create bedrock in 80 node thick layers."

So make sure your bedrock biome ymax is at or above the mapchunk border above the world base, get it right and a thick layer of bedrock will appear. Overgenerated large caves and dungeons may still occasionally appear within the bedrock, this is unavoidable.
 

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

Re: Add indestructible node bottom layer to core mapgens

by Wuzzy » Sun Jun 28, 2015 09:41

Overgenerated large caves and dungeons may still occasionally appear within the bedrock, this is unavoidable.

Wait, what? Why is this unavoidable?

This is precisely the reason why I am asking to add this feature into the core mapgen, because it would probably be easier to code an exception into the cavegen than to change this in Lua afterwards (at least that's my guess. XD).
Also, the weird thing is, the cavegen should have not destroyed my bedrock (from the “bedrock2” mod) at all, because I have explicitly set is_ground_content = false. IMO the cavegen should never destroy nodes with is_ground_content = false, no matter if normal or “overgenerated”. I see no reason for that.
So might it be that the cavegen has a bug here, because it destroys is_ground_content = false nodes?

If so, then I am not really happy to increase the size of the bedrock layer (in bedrock2) only because the cavegen is broken. How many nodes would I need for that, anyways?


Also, the main reason why I am suggesting this bedrock thing is because that “void” is very glitchy at the moment, especially at the bottom.
Even if those world bottom glitches are fixed, the bottom will probably always be kinda weird, because you can walk, but can't build on it.

The only purpose for bedrock is to hide this glitchyness and weirdness, at least for the bottom for now.
I am also suggesting only the lowest layer for now. Lua mapgens might still add to it.

As for the 4 (horizontal) sides of the world: I am not sure if those would deserve special treatment as well. Strictly spoken, it might be a bit inconsistent if not so. At least they are not as glitchy as the bottom, so this has a lower priority IMO.
I think the top MAY be actually left open (at least in v5/v6/v7). But I am not 100% sure about that.

And, frankly, I think your “floating cube in space” explanation is a far-fetched excuse to prevent a change in the core mapgens. It is not even really true, because you don't even really drop at the bottom of the world, you just walk “on” the “void”. For your explanation to be more believable, the world would have at least some “buffer zone” of true emptyness (not just ignore) near the borders. I don't know of a single subgame which does this.

About the “players might not know its the end” argument: They probably would know, eventually. When they notice that everything to destroy it fails and there is simply no “coming through”, it is actually not really far-fetched to conclude that this is the actual end of the world. And even if, there's always the wiki if they want to be sure (I hope Minetest gets some real in-game help system someday, but this is off-topic).
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Sun Jun 28, 2015 10:56

> Why is this unavoidable?
> the cavegen should have not destroyed my bedrock (from the “bedrock2” mod) at all, because I have explicitly set is_ground_content = false

'is ground content' will protect nodes in generated mapchunks from a cave overgenerating from a neighbour mapchunk, but if a large cave overgenerates into an ungenerated mapchunk, it's air nodes replace ignore nodes, then when that mapchunk is finally generated only ignore nodes are replaced, any pre-existing structure (the air nodes of an overgenerated cave) is untouched. This is just how mapgen works and probably can't be changed, large caves would have flat walls. There's no way to know that bedrock will want to be placed in future and replace the cave air.

> increase the size of the bedrock layer (in bedrock2) only because the cavegen is broken. How many nodes would I need for that, anyways?

Overgeneration never exceeds 16 nodes so your bedrock should be thicker than that. If bedrock is impassable then it seems to me the thickness isn't an issue.

> that “void” is very glitchy at the moment, especially at the bottom.
Even if those world bottom glitches are fixed, the bottom will probably always be kinda weird, because you can walk, but can't build on it.

The base void isn't glitchy or buggy, it's just not to your taste and impassable, so inevitably you can walk on it. The pulsating darkness is just a result of how skybox-darkening works underground, also not a bug but an inevitable result of how it works.

> As for the 4 (horizontal) sides of the world: I am not sure if those would deserve special treatment as well.

Top and sides should obviously be open to some kind of 'space', but possibly a buffer zone of air that allows players to pass outwards a certain distance, and properly rendering the nodes on the world side.

> your “floating cube in space” explanation is a far-fetched excuse to prevent a change in the core mapgens

=/ ? Another ridiculous accusation, you did this in the floating dungeon issue too. I mean what i write. The sides and top of the world are open because we can see out into some sort of 'space' and see stars, a moon. So we know it is transparent, it needs to be impassable to stop players exceeding co-ordinate limitations, so inevitably we can walk on it at world base.
Last edited by paramat on Sun Jun 28, 2015 11:29, edited 1 time in total.
 

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

Re: Add indestructible node bottom layer to core mapgens

by Wuzzy » Sun Jun 28, 2015 11:29

'is ground content' will protect nodes in generated mapchunks from a cave overgenerating from a neighbour mapchunk, but if a large cave overgenerates into an ungenerated mapchunk, it's air nodes replace ignore nodes, then when that mapchunk is finally generated only ignore nodes are replaced, any pre-existing structure (the air nodes of an overgenerated cave) is untouched. This is just how mapgen works and probably can't be changed, large caves would have flat walls. There's no way to know that bedrock will want to be placed in future and replace the cave air.

Oh, so it sounds like mods are screwed. :-(
But if bedrock support would go into core, I could think of a solution: Check if Y=-30912 (or whatever the lowest possible position is at moment). The cavegen does not even need to load the area.

If you really are opposed to having bedrock, would a mapgen flag be OK for you?

Overgeneration never exceeds 16 nodes so your bedrock should be thicker than that. If bedrock is impassable then it seems to me the thickness isn't an issue.

It sounds I have no other choice than to increase my bedrock thickness to 17 then. Whatever.

Note that caves appear to never destroy my bedrock2 bedrock, also after a recent test in b160f8dfe7e3bf8176e3f9f64dc2d9a9868d7fce I also failed to find a desert dungeon or a normal one which destroys bedrock. Was I just lucky?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Add indestructible node bottom layer to core mapgens

by rubenwardy » Sun Jun 28, 2015 11:33

paramat wrote:> that “void” is very glitchy at the moment, especially at the bottom.
Even if those world bottom glitches are fixed, the bottom will probably always be kinda weird, because you can walk, but can't build on it.

The base void isn't glitchy or buggy, it's just not to your taste and impassable, so inevitably you can walk on it. The pulsating darkness is just a result of how skybox-darkening works underground, also not a bug but an inevitable result of how it works.


Crashing the server due to dropped items, gravel randomly appearing on the surface, and large CPU spikes - that isn't glitchy?
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Sun Jun 28, 2015 11:40

We already have bedrock support using the biome API, since the bedrock layer will be thick, probably 80 nodes, no cave overgeneration will be large enough to pass completely through, if it does the bedrock can be made 2 mapchunks thick.
I'm not opposed to the option of bedrock, but am opposed to new core code being added for it. The option is there already using the biome API. mgv6 will have to use a voxelmanip mod.
Possibly just luck, there will probably always be bits of dungeon and large cave embedded in the bedrock, but therefore hidden from players. You can avoid dungeons by setting 'enable_floating_dungeons = false', which may be why you had no dungeon problems.
Actually it's possible (but extremely rare) that an overgenerated large cave could cut right through bedrock to a distance of 112 nodes, so if you want to be safe exceed that.
Last edited by paramat on Mon Jun 29, 2015 01:39, edited 1 time in total.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Sun Jun 28, 2015 11:41

Ah i forgot about the dropped items, yes that should be fixed, but that doesn't require bedrock as the solution.
 

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

Re: Add indestructible node bottom layer to core mapgens

by Wuzzy » Sun Jun 28, 2015 12:20

Woah, 120 nodes? I wansn't aware the cave generator can be so aggressive. I wonder how creators of “real” Lua mapgens manage to keep their sanity. The cavegen destroying their stuff must be extemely frustrating. Wouldn't this mean that, ultimately, nothing is really safe from being eaten by the cavegen? Is there really no other way to defend against the cavegen than to make an extremely thick layer?
And I also don't understand why a thick layer would protect against the cavegen. What use is this if the cavegen can destroy the bedrock anyways? What if two large caves are connected to each other? And if that cave is connected to another one, etc.? Then, in theory, no bedrock height would be perfectly safe.

Also, I am now really confused. How is it possible that the cavegen can destroy structures created by the Lua mapgen if the cavegen is run before the Lua mapgen? Wouldn't it be more like the Lua mapgen “destroying”/changing the caves created by the cavegen?

Also: Are you sure that I just had luck? I can report that I have not found a single cave (!) which was destroying bedrock, not even in 0.4.12. And this counts all tests I have done so far, and I sure found loads of caves, of course. I have found a few desert dungeons which destroyed bedrock, but only in 0.4.12. None so far in the development versions. Do you have tips to find unexceptionally large caves or dungeons more easily. It really gets boring to fly and search around all the time. Or may it be that bedrock2 actually can't be at all destroyed by the cavegen?
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Mon Jun 29, 2015 01:33

Yes you are correct on all those points.

> 'is ground content' will protect nodes in generated mapchunks from a cave overgenerating from a neighbour mapchunk, but if a large cave overgenerates into an ungenerated mapchunk, it's air nodes replace ignore nodes, then when that mapchunk is finally generated only ignore nodes are replaced, any pre-existing structure (the air nodes of an overgenerated cave) is untouched. This is just how mapgen works and probably can't be changed, large caves would have flat walls. There's no way to know that bedrock will want to be placed in future and replace the cave air.

I was wrong about this, the initial engine-generated terrain is never safe from overgenerated caves but any structure placed by a mod will indeed replace cave air or dungeon. You can therefore make your bedrock layer as thin as you want.

Thanks for this thread, this got me thinking about how i had limited the biome API and how it could provide a way to create bedrock at any chosen depth, something that has been requested a few times. You're right that i personally don't like the idea of bedrock, also i think it is a more specialised mod thing and out of character for Minetest (MC has bedrock to hide it's pathetically-thin world height and give the impression of much more world-mass below, we don't need to do this). However because the biome API needed extending for various reasons it now provides the option of bedrock as a bonus, without dedicated extra bedrock code being added to the engine.
Because i feel bedrock is specialised, a 'mod thing' and out of character i will not be adding core bedrock code to mgv6, it will have to be done with voxelmanip.
 

User avatar
Dopium
Member
 
Posts: 233
Joined: Sat Jun 09, 2012 15:43

Re: Add indestructible node bottom layer to core mapgens

by Dopium » Mon Jun 29, 2015 04:36

Maybe slightly off topic but in regards to disturbed gravel (falling nodes) falling through the map and randomly placed back into the map. Couldn't gavels lowest generation point be changed to -30,000 preventing it from falling through the map? As in the only generation below -30,000 will be stone alone, thus eliminating the need for bedrock in that regard creating a safety barrier of stone.
 

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

Re: Add indestructible node bottom layer to core mapgens

by Wuzzy » Mon Jun 29, 2015 12:17

No, this would not help at all, because the player can still manually place the gravel. And there are still 1000 other ways to get falling nodes near the bottom.
Dropped items can also fall through. And probably other entities as well (not tested).
The fact that items and falling nodes and other stuff can fall through the world's bottom is a bug which needs to be addressed seperately, no matter if bedrock or not.

See here: https://github.com/minetest/minetest/issues/2702
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Add indestructible node bottom layer to core mapgens

by TenPlus1 » Mon Jun 29, 2015 14:12

Wuzzy: falling nodes and dropped objects no longer fall into the abyss below -30912 as changes have been added to check and stop them dropping into unloaded areas of the map...

Try the latest daily version of Minetest...
 

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

Re: Add indestructible node bottom layer to core mapgens

by Wuzzy » Mon Jun 29, 2015 19:13

What version did you use? Nothing changed for me in 29dda9f356042c403b3b7da1d717d32b45c9b6de. Items and falling nodes go through the bottom effortlessly.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Add indestructible node bottom layer to core mapgens

by TenPlus1 » Mon Jun 29, 2015 21:11

I've been using the daily builds for ubuntu/mint and for over 2 weeks falling items/blocks stop at unloaded map chunks inc. bottom of the world...
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Tue Jun 30, 2015 00:19

TenPlus1 i saw your commit to item-entity.lua to stop items, but it seems falling.lua has not been fixed. Currently i'm thinking the best option is to make ignore walkable, although there may be some problem i haven't thought of, i will test this and prepare a PR.

EDIT: Walkable ignore didn't help =/
Last edited by paramat on Tue Jun 30, 2015 07:40, edited 2 times in total.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Add indestructible node bottom layer to core mapgens

by TenPlus1 » Tue Jun 30, 2015 06:50

paramat: on latest daily, dropping sand or gravel at bottom of world has them settle as node just above void... Seems to work ok for me...

Note: apologies, turns out my version of builtin_item mod is stopping falling nodes from dropping into the void... It's instinct to enable it by default now... lol
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Add indestructible node bottom layer to core mapgens

by paramat » Tue Jun 30, 2015 07:43

Aha, perhaps you can help us solve this then? Let's discuss in the issue thread.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Add indestructible node bottom layer to core mapgens

by TenPlus1 » Tue Jun 30, 2015 09:25

Hrm, ok this is strange... creating a fresh v6 world and dropping gravel or sand into the void has them drop all the way down, but... creating a new v7 world and doing the same has them stop above the void and return to being nodes... ?!?!?!?!

Turns out my builtin_item mod (https://github.com/tenplus1/builtin_item) only stopped dropped items from doing this, not falling objects... Why would this be mapgen specific ???
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 13 guests

cron