Help understanding Mapgen

For people working on the C++ code.
Post Reply
crazy_baboon
Member
Posts: 96
Joined: Sat Oct 17, 2015 10:47

Help understanding Mapgen

by crazy_baboon » Post

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

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

Re: Help understanding Mapgen

by hajo » Post

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).

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

Re: Help understanding Mapgen

by paramat » Post

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/com ... 592c1d30c3
There is no documentation to help with writing core mapgens, writing Lua mapgens helps a lot, see my mods for Lua mapgen examples.

crazy_baboon
Member
Posts: 96
Joined: Sat Oct 17, 2015 10:47

Re: Help understanding Mapgen

by crazy_baboon » Post

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?

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

Re: Help understanding Mapgen

by paramat » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests