Realms (multiple layers with different landscape generators)

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: Realms (multiple layers with different landscape generat

by duane » Post

Ok, I've got (some of) floaters converted to realms. Feel free to use it. If nothing else, it might serve as another simple example.
Spoiler
Image
However, I had to make this change in order to get it working:

Code: Select all

diff --git a/realms_map_generators/bf_generic.lua b/realms_map_generators/bf_generic.lua
index add2ba9..b91b522 100644
--- a/realms_map_generators/bf_generic.lua
+++ b/realms_map_generators/bf_generic.lua
@@ -129,10 +129,14 @@ function bf_generic.map_biome_to_surface(parms,biomemap)
 				--sorted by distance from the center of that vbox.  We need to find the first
 				--one that is in our y range
 				local i=1
-				while compy<voronoi[i].y_min or compy>voronoi[i].y_max and i<#voronoi do i=i+1 end
+				while voronoi[i]
+				and (compy<voronoi[i].y_min or compy>voronoi[i].y_max)
+				and i<#voronoi do
+					i=i+1
+				end
 				--if it doesnt match anything, you did something very wrong with your biomes
 				--but we will just pick up the last item in the list
-				biome=voronoi[i]
+				biome=voronoi[#voronoi]
 				--minetest.log("map_biome_to_surface-> "..luautils.pos_to_str_xyz(x,y,z).." compy="..compy.." vx="..vx.." vz="..vz.." biome="..biome.name.." i="..i)
 			end --if biomemap.typ
I also suspect I'm not handling the biomes right, as they're behaving very oddly. I get transitions from hot desert to jungle to ice. Part of that may be the fact that the floaters are higher than some terrain, but I don't think that's the whole problem.

And, the decorations are not in the right places (I suspect in the X-Z plane, since it tends to show on slopes).
Attachments
screenshot_20190802_113746.jpg
screenshot_20190802_113746.jpg (254.8 KiB) Viewed 365 times
Believe in people and you don't need to believe anything else.

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: Realms (multiple layers with different landscape generat

by duane » Post

I have a question for you, Kilarin. I've run across a peculiar bug that Realms seems to be immune to, and I haven't been able to figure out why.

I built a simple tg_ file that does nothing but fill every chunk with stone, and I ended up with irritating gaps like this.
Spoiler
Image
That's a one meter high gap in a peculiar pattern (seen from above). After a lot of experimenting, I discovered that it's caused by a bug in mapgen v7, which is overgenerating air into previously generated chunks. Turning off ridges gets rid of the problem.

However, Realms isn't affected by this (on the same system, with the same tg_ file). Can you tell me what you did to avoid it? Are you overgenerating chunks or prefilling somehow?

Edit: Well, never mind. I managed to duplicate the problem in Realms. I guess the only fix is to turn off ridges.
Attachments
screenshot_20190804_195620.jpg
screenshot_20190804_195620.jpg (211.14 KiB) Viewed 365 times
Believe in people and you don't need to believe anything else.

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: Realms (multiple layers with different landscape generat

by duane » Post

I've added tg_dflat to the github site above with pond generation that mostly works. Again, there are some issues with biomes and the way you've changed default:water_source.
Believe in people and you don't need to believe anything else.

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: Realms (multiple layers with different landscape generat

by duane » Post

I've added flat caves to the floaters github site. It produces some nice caves that are open in the X-Z plane, with columns, rugged terrain, and varying amounts of water.
Spoiler
Image
Note that multiple levels will be produced, if you specify more than a hundred meters or so of Y range in your realms.conf, each with a random height.
Attachments
screenshot_20190807_093626.jpg
screenshot_20190807_093626.jpg (196.89 KiB) Viewed 365 times
Believe in people and you don't need to believe anything else.

User avatar
Kilarin
Member
Posts: 896
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: Realms (multiple layers with different landscape generat

by Kilarin » Post

Wow! Lots of cool stuff here Duane!
I apologize most profusely for my lack of response here folks. I am still buried under and simply have not had time to get back to this. Things should quiet down by next week, I hope. In the meantime, I thank you for your patience.

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

Re: Realms (multiple layers with different landscape generat

by paramat » Post

> That's a one meter high gap in a peculiar pattern (seen from above). After a lot of experimenting, I discovered that it's caused by a bug in mapgen v7, which is overgenerating air into previously generated chunks. Turning off ridges gets rid of the problem.

https://github.com/minetest/minetest/issues/7878
I need to move the carving of rivers into the main generation loop, will try to do so for 5.1.0.

User avatar
Kilarin
Member
Posts: 896
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: Realms (multiple layers with different landscape generat

by Kilarin » Post

hey folks.
Yet another quick update and apology. Work, family, and other obligations are still keeping me very busy. My apologies. I haven't abandoned the project, and I'll get back to my open source obligations just as soon as the other more important obligations get under control

User avatar
Kilarin
Member
Posts: 896
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: Realms (multiple layers with different landscape generat

by Kilarin » Post

hello folks.
Life and work are still keeping me running ragged. Sorry for the long gap in development. I DO hope to get back to this project sometime. Hopefully sometimes soon.

Post Reply

Who is online

Users browsing this forum: Astrobe and 27 guests