World size

Post Reply
User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

World size

by LouisDB » Post

Hi,

I was wondering why the world size is 62000? Why this number?
Is it possible to change it? Is it hardcoded or is there some kind of limit?

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: World size

by Krock » Post

It comes from the fact that node positions are sent and handled as 16-bit numbers. This means we could have a world that's about 65500^3 nodes big. The world generator stops some kilometers earlier to prevent occasional bugs due to overflows etc.
This topic might be interesting for you: Infinite world size
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: World size

by LouisDB » Post

I knew it was something like that but 62000 seems odd.
Thanks :)

User avatar
Wuzzy
Member
Posts: 4803
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: World size

by Wuzzy » Post

The world is a cube of side length 61840. Coordinates go from −30912 to 30927 in any direction.

The side length is a multiple of 80, an important number in Minetest.

773 × 80 = 61840

80 is the side length of a Mapchunk. A Mapchunk is a cube of 80×80×80 blocks which is a piece of the world which is generated by the map generator at once. (80 in turn is a multiple of 16, and 16 is the side length of a MapBlock, a cube which can be loaded at once. This means 5×5×5 MapBlocks neatly fit into a Mapchunk. But back to topic.)
This explains why the world side length is a multiple of 80 but it doesn't explain where the 773 comes from, however. This seems like a fairly odd number.

Maybe you need to ask in the Minetest chatroom to find out more.

And yes, you can change the size of the world. But it is only possible to make it smaller.
Edit the advanced configuration setting “map_generation_limit”. Explanation:
# Where the map generator stops.
# Please note:
# - Limited to 31000 (setting above has no effect)
# - The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).
# - Those groups have an offset of -32, -32 nodes from the origin.
# - Only groups which are within the map_generation_limit are generated
# type: int min: 0 max: 31000
I do not recommend using this setting if you're not an experienced user. It it fairly odd to use.

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: World size

by LouisDB » Post

Somewhat related question :
When implementing a plot manager, is it better to align with MapChunk or MapBlock coordinates?

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

Re: World size

by sfan5 » Post

MapChunks are only used during map generation and don't really matter.
If you absolutely want to align to something I suggest using MapBlocks.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Andrey01
Member
Posts: 2577
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: World size

by Andrey01 » Post

LouisDB wrote:Hi,

I was wondering why the world size is 62000? Why this number?
Is it possible to change it? Is it hardcoded or is there some kind of limit?
I think what map size much more than you wrote.For example i longly dug under land and i dug possible 100000 blocks!

User avatar
firefox
Member
Posts: 1709
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: World size

by firefox » Post

Andrey01 wrote:
LouisDB wrote:Hi,

I was wondering why the world size is 62000? Why this number?
Is it possible to change it? Is it hardcoded or is there some kind of limit?
I think what map size much more than you wrote.For example i longly dug under land and i dug possible 100000 blocks!
press F5 to display debug info and see your coordinates. the middle number is depth.
at -31000 there should be an "invisible wall" with nothing below it, so you can see the sky.
the same applies the "edge of the world" on the surface.

maybe you went down to 10.000, not 100.000 :P
✨🏳️‍🌈♣️✨

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests