Map generation, empty or flat worlds and world extents.
Map generation, empty or flat worlds and world extents.
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
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
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
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
https://github.com/cornernote/minetest-no_mapgen
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.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: 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/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 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.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
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.
[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.
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: 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.
A list of my mods can be found here.
Who is online
Users browsing this forum: No registered users and 36 guests