Page 1 of 1

Help understanding Mapgen

PostPosted: Sun Jan 01, 2017 15:06
by crazy_baboon
Hi,

I want to create a custom map generator. However, I am struggling to get my head over all 46 .cpp and .h files that are presumably related to the map generator. Is there any good documentation about the code that is used to compute the map?
I found the file reference here https://doxy.minetest.net/, with a description of all classes and corresponding members, but it doesn't help much because there is no explanation on what these functions/classes do. Any help?


Thanks

Re: Help understanding Mapgen

PostPosted: Sun Jan 01, 2017 19:11
by hajo
crazy_baboon wrote:I want to create a custom map generator. ..
Is there any good documentation about the code
that is used to compute the map?

You also found the page/category about mapgen on the developer-wiki ?

Also, see forum Post your mapgen questions here (modding or engine).

Re: Help understanding Mapgen

PostPosted: Mon Jan 02, 2017 16:40
by paramat
Although this is a fairly complex core mapgen, this commit shows you what is needed to add a core mapgen https://github.com/paramat/minetest/commit/a5b2a9f6f901be4b51381ae17d9bba592c1d30c3
There is no documentation to help with writing core mapgens, writing Lua mapgens helps a lot, see my mods for Lua mapgen examples.

Re: Help understanding Mapgen

PostPosted: Wed Jan 04, 2017 13:45
by crazy_baboon
Thanks paramat. the lack of documentation really is a pain. What does you engine mapgen_watershed does different than other maps and from which mapgen_vX was it derived?

Re: Help understanding Mapgen

PostPosted: Wed Jan 04, 2017 19:20
by paramat
It's broken at the moment but i hope to get it to a usable state soon. It focusses on sloping rivers and mountain ranges, everything on a big scale.