Help understanding Mapgen

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

Help understanding Mapgen

by crazy_baboon » Sun Jan 01, 2017 15:06

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: 396
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: Help understanding Mapgen

by hajo » Sun Jan 01, 2017 19:11

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

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

Re: Help understanding Mapgen

by paramat » Mon Jan 02, 2017 16:40

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.
 

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

Re: Help understanding Mapgen

by crazy_baboon » Wed Jan 04, 2017 13:45

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?
 

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

Re: Help understanding Mapgen

by paramat » Wed Jan 04, 2017 19:20

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.
 


Return to Partly official engine development



Who is online

Users browsing this forum: No registered users and 1 guest