Post your mapgen questions here (modding or engine)

Post Reply
User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Post your mapgen questions here (modding or engine)

by Sergey » Post

I generated many worlds to choose what I like most (among suggested and what is not so realistic).

And оbserving nature I found BRICKWORK at the bottom of the sea! It is artificial thing!
World is freshly generated. Is that possible?

Screenshot: http://imageup.ru/s2653187

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

That's part of a dungeon, you'll find lots of those underground.

User avatar
Sergey
Member
Posts: 784
Joined: Wed Jan 11, 2017 13:28
Location: Russia

Re: Post your mapgen questions here (modding or engine)

by Sergey » Post

By the way, there are different terrain generators like v5, v6, v7, valleys, so on. And what about dungeon/catacomb/cave generators? If there are caves then there must be algorithms for that. Do you develop them?

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

I designed and coded mgfractal and mgflat.
I coded mgv5 as a new version of the original mgv5 from 5 years ago that was designed by celeron55.
I have worked on mgv6 but that was designed by celeron55.
I worked on and improved mgv7 but 'hmmmm / kwolekr' originally designed that.
Mgvalleys was designed by Gael de Sailly and coded into C++ by Duane.
I did not design the cave and dungeon generation but have worked on that code.
I added the (non-mgv6) tunnels using algorithms from the original mgv5.

Griiimon
Member
Posts: 11
Joined: Sun Jan 08, 2017 13:20
IRC: TelepathicVampire
In-game: Griiimon

Re: Post your mapgen questions here (modding or engine)

by Griiimon » Post

I'd like to include temperature/warmth in my mod. Is there a way to get the temperature at the player position or at least the biome id at his position?

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

Griiimon wrote:I'd like to include temperature/warmth in my mod. Is there a way to get the temperature at the player position or at least the biome id at his position?
No

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

Yes but you need to calculate it from the heat and humidity noise parameters found here https://github.com/minetest/minetest/bl ... ome.h#L138

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

paramat wrote:Yes but you need to calculate it from the heat and humidity noise parameters found here https://github.com/minetest/minetest/bl ... ome.h#L138
Can I get the current values from map_meta.txt? If no it is pretty useless because I have to hard code the parameters and if somebody changed them it doesn't work

And it means more noise calculatios

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

You could 'get' currently in-effect noiseparams in Lua using https://github.com/minetest/minetest/bl ... .txt#L2236

Code: Select all

minetest.get_mapgen_setting_noiseparams(name)

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

But how can I get the biome? I need the heat and humidity and than I have to calculate the voronoi diagram, right? A little bit to much for globalstep I think

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Post your mapgen questions here (modding or engine)

by Byakuren » Post

burli wrote:But how can I get the biome? I need the heat and humidity and than I have to calculate the voronoi diagram, right? A little bit to much for globalstep I think
Calculate the voronoi diagram outside of a globalstep. Since mods might register their own biomes, you will want to do this in a minetest.after(0, ・).
Every time a mod API is left undocumented, a koala dies.

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

The code that gets the biome from the biome points is actually quite simple and fast, it just finds the closest biome point to the heat / humidity point, for all biomes active at that particular y.
A voronoi diagram is just a set of 'cells' that each contain points closer to the point than other points.
The engine code is https://github.com/minetest/minetest/bl ... e.cpp#L207
However i intend to add a 'biome at point' API.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

Biome at point would be awesome. Also please add heat and humidity at point. They can also be interesting for survival, farming ...

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

Good idea.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

How can I make biomes more even? Sometimes biomes are huge, sometimes I can see a snow biome from a jungle

I reduced octaves and persistence, but now I have huge biomes

Robsoie
Member
Posts: 104
Joined: Fri Apr 29, 2016 16:22

Re: Post your mapgen questions here (modding or engine)

by Robsoie » Post

A question about the mapgen world size.

As i don't have that much ram (as i guess that's the problem), Minetest can crash on me when i explore for a long time, so i thought about limiting the world size in a way we (as i play with my nephew) still have a lot to explore before settling somewhere

I then found
https://github.com/minetest/minetest/bl ... nf.example
# Where the map generator stops.
# Please note:
# - Limited to 31000 (setting above has no effect)
# - The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).
# - Those groups have an offset of -32, -32 nodes from the origin.
# - Only groups which are within the map_generation_limit are generated
# type: int min: 0 max: 31000
# map_generation_limit = 31000
After testing a much lower setting in my minetest.conf (map_generation_limit = 800) i noticed it was still plenty gigantic.
And reaching a world edge didn't allowed me to fall in the void, so it was all good

I found out that having smaller biomes (thanks to orwel helps) provide for visual interest in smaller worlds so i don't have a boring world sized single biome problem.

But then i remembered , there are mods that try to add other worlds/dimensions to a minetest world by generating them in specific altitude or depth as engine apparently currently does not support multiple worlds in parralel if i understood well.

Now with by example a map_generation_limit = 800 it means that the Z level up and down would is limited to +400 or -400 each, meaning then that for those kind of mods with alternate dimensions it should be a problem.

So is there a way to limit a world mapgen only on X / Y and not the Z level ? Or at least customised the world Z level differently than the X/Y one ?

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

> How can I make biomes more even? Sometimes biomes are huge, sometimes I can see a snow biome from a jungle

I'm sure i answered this elsewhere in the forum.
Reducing persistence helps, but since it's all noise biome size will always be fairly uneven.
Remember the overall general size of biomes is controlled by the 'spread' of biome heat / humidity noises https://github.com/minetest/minetest/bl ... mple#L1136
Last edited by paramat on Mon Jan 23, 2017 03:34, edited 1 time in total.

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

> As i don't have that much ram (as i guess that's the problem), Minetest can crash on me when i explore for a long time, so i thought about limiting the world size

RAM use is mostly due to the client storing the visual meshes for the mapblocks (16^3 nodes), the max memory use is controlled by this setting:

Code: Select all

#    Maximum number of mapblocks for client to be kept in memory.
#    Set to -1 for unlimited amount.
#    type: int
# client_mapblock_limit = 5000
5000 mapblocks tends to use around 1-2GB so you can reduce this number to limit RAM use.
World size has no effect on RAM use, only on total world database size on your harddisc.

> So is there a way to limit a world mapgen only on X / Y and not the Z level ? Or at least customised the world Z level differently than the X/Y one ?

No but it has been suggested, i'm not keen though i don't feel there is enough need. It's nice to keep the MT world cubic as it has always been.

Robsoie
Member
Posts: 104
Joined: Fri Apr 29, 2016 16:22

Re: Post your mapgen questions here (modding or engine)

by Robsoie » Post

Thanks, i'll try to play with the client_mapblock_limit , as i imagine some other mods consume memory too, and all in all things will go overboard at some point, so if i can already get mapgen to eat less it's already good.

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

Re: Post your mapgen questions here (modding or engine)

by paramat » Post

OOM (out of memory) error? Some mods can use a lot of Lua memory and LuaJIT has a low Lua memory use limit, try using non-LuaJIT, there's a build available.

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: Post your mapgen questions here (modding or engine)

by taikedz » Post

Hello

--- Question ---

How to create a biome that is consistently rare?

I am wondering, is the humidity and heat in the map generated pseudo-randomly - similar across maps, but with variations? Or is it consistent, but (depending on an additional variable), potentially wildly different even on a same seed and mapgen?

I confess to being mighty confused as to how to create a biome with a reliable/predictable frequency of appearance...

--- Context ---

We are trying to add a new biome such that it be rare, but we're having problems defining a good heuristic...

I did a run on a test server with the new biome at heat 55 humidity 10 and altitudes 110-180 - this test server uses the same seed and mapgen and mods as the live server, and it was indeed rare as had been intended. I found a small one and noted its coordinates.

So we added this to the live server and did a flyaround...... and found a super-massive one that extended for a good few dozen mapblocks in all directions...!

Returning to the test server, and going to those coordinates, we didn't find any such massive biome...

I studied the ethereal biomes a little and noted that rarer biomes are bunched together whereas common ones are not too ex-centered and don't have too many close neighbours... so far so good.

http://picbin.org/src/1305

So I was wondering, if I create a general "CustomBiome-neutral" with heat/humidity/altitudes = { 55 , 10, [110,180] }

and then create a second CustomBiome-special with heat/humidity/altitudes = { 55 , 10, [170,170] } (note the equal altitude in this one)

would this mean that my "neutral" biome would be more likely to appear, and the "special" biome would only have one chance in N of being embedded in the neutral biome....?

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

Heat and humidity are generated by perlin noise. You have no control over size or rarity

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: Post your mapgen questions here (modding or engine)

by hajo » Post

burli wrote:Heat and humidity are generated by perlin noise.
How about alternate formulae for these ?
E.g. humidity based on the amount of water-squares in the area,
and heat based on z-coordinate (i.e. location on north/south-axis) ?
Maybe also include y-value, for altitude (cooler and dryer when higher).
Last edited by hajo on Mon Jan 23, 2017 11:37, edited 1 time in total.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

hajo wrote: How about alternate formulae for these ?
If you write your own mapgen this would be possible. I don't think this is possible with the default mapgens

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Post

I want to fork MG v7 and replace the cave generation with the v6 mapgen. How can I do that? I need a little bit help to start

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests