Page 1 of 1
Map generation, empty or flat worlds and world extents.

Posted:
Mon Sep 10, 2012 03:26
by mrtops
Hi All
I'm new to minetest modding and was wondering if anyone can help me out with this question:
Is it possible to start in an empty world (no blocks) or flat world (a single plane of blocks)?
How would you organise this?
I could write a Lua script to loop through every possible {x,y,z} and 'dig' the blocks but that seems like an extreme approach.
Could I simply delete all the data from the the sqlite database?
Also, does any know what the extents of the default maps are i.e. {-x,-y,-z} to {x,y,z}?
And, finally, is the entire map generated at the start, or do new areas get added to the database as you explore?
Thanks

Posted:
Mon Sep 10, 2012 05:34
by sfan5
There is a Flatland Mod

Posted:
Mon Sep 10, 2012 09:31
by cornernote
this mod will disable all mapgen, creating a void world... you will need something like worldedit to place the 1st block:
https://github.com/cornernote/minetest-no_mapgen

Posted:
Mon Sep 10, 2012 10:43
by mrtops
Had a look at this.
It looks like it's overriding the default objects with "air", which seems like the right idea, except I'm not sure where to stick it.
Tried just dumping into the mods directory but I got the "unable to load message". Does it go into the mods folder or elsewhere?
Thanks
P.S. I did check the linefeed characters to see if it was a windows / linux issue but it appears not to be.

Posted:
Mon Sep 10, 2012 11:09
by cornernote
you have to rename it without the dashes (-). Just naming it "no_mapgen" should work.

Posted:
Mon Sep 10, 2012 22:53
by mrtops
cornernote wrote:you have to rename it without the dashes (-). Just naming it "no_mapgen" should work.
OK, thanks. I'll try that tonight.

Posted:
Wed Sep 12, 2012 07:12
by mrtops
cornernote wrote:you have to rename it without the dashes (-). Just naming it "no_mapgen" should work.
OK, totally cool, effective and easy!
Yeah, I just renamed the folder and it all worked as described.
Thanks for the help.

Posted:
Wed Sep 12, 2012 15:46
by Sokomine
It does work, especially if both mods are combined. And it will most likely work with further versions of Minetest as well. The drawback is that it is slow and inefficient. All that map data is computed and then discared and replaced by new blocks. If I want to import my maps I really can't afford to allow map generation to run in the background (though it may be needed because all those chunks that will be filled with to be imported data have never been visited). And all that time the game client is running and consuming valuable computing time.
A much faster way would be to go down to the database level. According to this
https://github.com/celeron55/minetest/blob/master/doc/mapformat.txt the map data is organised in 16x16x16 node large chunks. Creating data for one chunk and just copying that chunk to wherever it may fit would be way faster. For a grass world 2-3 initial chunks would be needed: one consisting entirely of dirt (for everything underground) and one consisting of one layer of grass with air above (maybe a third consisting of nothing but air). That ought to stop the map generator from starting altogether. The result would be a map.sqlite which replaces that one in the world directory. At the borders of the map normal mapgeneration would start. A large area could be covered with relatively few data because all one really neeads are two chunks in height for each 16x16 area.

Posted:
Thu Sep 13, 2012 02:48
by mrtops
Can you turn the map generation off?

Posted:
Thu Sep 13, 2012 03:40
by cornernote
mrtops wrote:Can you turn the map generation off?
not in the current version, the best you can do is re-alias the mapgen_ aliases.

Posted:
Thu Sep 13, 2012 05:21
by mrtops
OK, so it seems the notion is to:
[1] put a simple flat world under your map space to calm the mapgen down, alias the map gen blocks to air
and constrain players to your own map to keep them from reaching the edge of the world and kicking off the map generator.
or
[2] finding somewhere in the source code to switch it off.
I'll opt for [1] for now :)
Still, an option to turn it off would be a good update to the source.

Posted:
Wed Jan 16, 2013 19:20
by Jonni
I tried to use this mod, but, I' can't get use it.
I want to play in a world without map, or flat plane.
Where do I put this mod?
I don't know what I have to do with this Mod.
PS: I renamed it "no mapgen" without "".
PSS: I'm a new player with this game
PSSS: Sorry my bad English, I'm Brazilian

Posted:
Wed Jan 16, 2013 20:52
by Sokomine
If you prefer a flat map, download and compile this version of minetest:
super flat mapgen. It can be compiled the same way as the normal game and is faster when generating new areas.