Page 1 of 1

Super Flat Mapgen

Posted: Fri Jan 11, 2013 15:23
by PilzAdam
Obsolete You can add "flat" to "mg_flags" in minetest.conf to get a flat map in Minetest 0.4.5 or later.

Hello everyone!
Many people try to make a flat mapgen by creating mods in Lua. This mods are very slow and also have some bugs.
So I changed the C++ mapgen to be super flat and here is the result:
Image

There is one layer of grass, one dirt and the rest is stone (there are no caves).
The trees and everything that is added by Lua mods (by default ores and junglegrass) spawns normally.

You have to compile the source yourself and be sure to create a new world and dont open existing worlds with this.

It is not only super flat it is also super fast because I deleted 90% of the old mapgenerator.

I try to keep this branch up-to-date with the official minetest.

GitHub:
https://github.com/PilzAdam/minetest/tree/flat

Download the source:
https://github.com/PilzAdam/minetest/archive/flat.zip

Windows build:
http://minetest.ru/builds/minetest-flat ... 96ad63.zip (provided by thexyz)

Posted: Fri Jan 11, 2013 15:28
by Ragnar
I am from the near future, here to warn everybody of the huge fame Minetest is gonna get soon!
Proof:
PilzAdam wrote:
Ragnar wrote:btw, how do i compile?
what do i need, what are the commands etc...
Read the Readme.txt file.
Oh, and please bring all of your questions/comments in one post and dont post multiple times in a row. Think before you post :-)
Dont say, i didnt warn you!

Posted: Fri Jan 11, 2013 15:29
by Ragnar
btw, how do i compile?
what do i need, what are the commands etc...

Posted: Fri Jan 11, 2013 15:33
by PilzAdam
Ragnar wrote:btw, how do i compile?
what do i need, what are the commands etc...
Read the Readme.txt file.
Oh, and please bring all of your questions/comments in one post and dont post multiple times in a row. Think before you post :-)

Posted: Fri Jan 11, 2013 15:51
by PilzAdam
Windows build by thexyz added (see first post).

Posted: Fri Jan 11, 2013 15:54
by Ragnar
hey, if i make an Ubuntu 12.10 i686 build, it will work on all of the other ones with Ubuntu 12.10 i686?
AWESOME *starts making build*

Posted: Fri Jan 11, 2013 18:59
by 4aiman
PilzAdam, is that possible to make it configurable whether use flat or normal mapgen?

Also, some thoughts:
It would be nice to have the ability to make an influence onto the mapgen using some variables defined in the world.mt, like
- type of mapgen*: [normal/super flat/external]
- caves average size** [some integer value]
- enabled_bioms [list of enabled bioms, so it would be possible to make a map with only 1-2 biomes***]
- zero_ground**** [some integer value]

_________
Commentaries:
* I doubt there are people who would rush in and start to code different mapgens but it would be nice to define shared library path so it's one and only exported function called smth like "generate_world" would be called instead of in-built. That will save anyone from recompilation. Those who afraid of malicious software may consider this as a plug-in. No one's afraid of plug-ins, right? ;)
** super flat world too! setting this to 0 will result in no caves at all
*** may be useful for some contest/survival maps
**** there are too much of unused space up in the sky, so this value will define which height is considered as 0 meters above the sea.

Please, do comment.

Posted: Fri Jan 11, 2013 19:11
by PilzAdam
4aiman wrote:PilzAdam, is that possible to make it configurable whether use flat or normal mapgen?

Also, some thoughts:
It would be nice to have the ability to make an influence onto the mapgen using some variables defined in the world.mt, like
- type of mapgen*: [normal/super flat/external]
- caves average size** [some integer value]
- enabled_bioms [list of enabled bioms, so it would be possible to make a map with only 1-2 biomes***]
- zero_ground**** [some integer value]

_________
Commentaries:
* I doubt there are people who would rush in and start to code different mapgens but it would be nice to define shared library path so it's one and only exported function called smth like "generate_world" would be called instead of in-built. That will save anyone from recompilation. Those who afraid of malicious software may consider this as a plug-in. No one's afraid of plug-ins, right? ;)
** super flat world too! setting this to 0 will result in no caves at all
*** may be useful for some contest/survival maps
**** there are too much of unused space up in the sky, so this value will define which height is considered as 0 meters above the sea.

Please, do comment.
If you want this, code it! Sorry, but I wont do all of this. Maybe I will make the flat mapgen configureable, but dunno.

Posted: Fri Jan 11, 2013 19:22
by 4aiman
You've got it wrong, PilzAdam.
Sorry if that sounded like I want you to make that.
I only asked of you if you would make switching normal/superflat by configuring that. (And you have answered already - thanks for quick reply!)

I'm not asking to make anything else. By no means. That's just some thoughts in case someone can and will do that.
As for myself - I can't at the moment, first I must learn c++ ...

Posted: Mon Jan 14, 2013 22:41
by dannydark
Nice work PilzAdam, btw you do know that mapgen v7 has a flat type biome, so in theory you could just setup a single biome world using the flat biome to achieve the same results, although I'm not sure its ready for upstream merge yet.

Also hmmmm's new mapgen branch adds a lot of config options so maybe what some of the people above are asking for is already part of that branch.

In fact I should speak with hmmmm to see what's needed to be done to the new mapgen before its merged upstream as I've been using it now for a few months without any problems, although there is one commit I've seen in his branch that I don't have but its not related to the mapgen...but I will merge that with my local copy on my windows system just to make sure no issues arise.

Anyway nice work ^_^ flat worlds are always useful when building stupidly big mesecon structures.

Posted: Tue Jan 15, 2013 00:11
by Sokomine
Thank you for your super flat world! It is very very helpful for importing Minecraft classic maps with my mcimport mod. With the normal mapgen, it took far too long to create a large enough free space. Also this is very useful for building and getting creative. Normal mapgen usually requires to flatten the landscape first.

Posted: Wed Jan 16, 2013 22:11
by tinoesroho
Thank you! I've wanted something like this for a long time. :-)

Posted: Thu Jan 17, 2013 08:07
by Calinou
We should have an option for this... looks good.

Posted: Thu Jan 17, 2013 12:54
by NakedFury
Other possible world types:
Waterworld
World with very very few water, only on caves or deep underground.

Posted: Sun Feb 03, 2013 15:24
by Jordach
This is handy for the mesecons users out there.

Posted: Thu Mar 14, 2013 18:50
by PilzAdam
This is obsolete now since you can add "flat" to "mg_flags" in minetest.conf (Minetest 0.4.5 or later).

Posted: Mon Apr 01, 2013 19:12
by Luke123
This is great! Less lag and a faster working game. This is useful for the mesecons mod because it leaves you with lots of room to create and build. This is perfect! Thx PlzAdam!

-Luke

Also known as Luca

Posted: Mon Apr 01, 2013 19:21
by PilzAdam
Luke123 wrote:This is the best mod ever! Less lag and a faster working game. This is useful for the mesecons mod because it leaves you with lots of room to create and build. This is perfect! Thx PlzAdam!

-Luke

Also known as Luca
You dont have to use this, you can just add "flat" to "mg_flags" in minetest.conf
Also this isnt a mod, its an engine patch. Mods are written in Lua.

Posted: Mon Apr 01, 2013 20:52
by Luke123
PilzAdam wrote:
Luke123 wrote:This is the best mod ever! Less lag and a faster working game. This is useful for the mesecons mod because it leaves you with lots of room to create and build. This is perfect! Thx PlzAdam!

-Luke

Also known as Luca
You dont have to use this, you can just add "flat" to "mg_flags" in minetest.conf
Also this isnt a mod, its an engine patch. Mods are written in Lua.
That was a mistake, I know it is not a mod :-)