Map generation, empty or flat worlds and world extents.

Post Reply
mrtops
Member
Posts: 10
Joined: Tue Sep 04, 2012 22:59

Map generation, empty or flat worlds and world extents.

by mrtops » Post

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

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

There is a Flatland Mod
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

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

mrtops
Member
Posts: 10
Joined: Tue Sep 04, 2012 22:59

by mrtops » Post

cornernote wrote: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

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.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

you have to rename it without the dashes (-). Just naming it "no_mapgen" should work.

mrtops
Member
Posts: 10
Joined: Tue Sep 04, 2012 22:59

by mrtops » Post

cornernote wrote:you have to rename it without the dashes (-). Just naming it "no_mapgen" should work.

OK, thanks. I'll try that tonight.

mrtops
Member
Posts: 10
Joined: Tue Sep 04, 2012 22:59

by mrtops » Post

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.

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

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/b ... format.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.
A list of my mods can be found here.

mrtops
Member
Posts: 10
Joined: Tue Sep 04, 2012 22:59

by mrtops » Post

Can you turn the map generation off?

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

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.

mrtops
Member
Posts: 10
Joined: Tue Sep 04, 2012 22:59

by mrtops » Post

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.

Jonni
New member
Posts: 4
Joined: Tue Jan 15, 2013 16:06

by Jonni » Post

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

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

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.
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests