minetestcr wrote:Wuzzy helped me understand my own question, all the worlds have the same size, what I need is to use singlenode mapgen, and then generate a limited square of land, the rest of the world would be air.
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime
-- every 2 seconds
if timer < 2 then return end
timer = 0
for _,player in ipairs(minetest.get_connected_players()) do
-- where am I?
local pos = player:getpos()
-- map limits (5000 blocks either way and 500 up/down)
if pos.x < -5000 or pos.x > 5000
or pos.y < -500 or pos.y > 500
or pos.z < -5000 or pos.z > 5000 then
local statspawn = (minetest.setting_get_pos("static_spawnpoint") or {x = 0, y = 2, z = 0})
player:setpos(statspawn)
minetest.chat_send_player(player:get_player_name(), "You Passed the map limits, returning to Spawn")
end
end
end)
wcwyes wrote:I noticed that the world is fixed to -30912 to 30927, but you can teleport anywhere from -214748 to 214748. is there a way to utilize this extra space via realms or something else?
Krock wrote:wcwyes wrote:I noticed that the world is fixed to -30912 to 30927, but you can teleport anywhere from -214748 to 214748. is there a way to utilize this extra space via realms or something else?
All worlds are limited to that size, the type s16 (16-bit signed integer) used in the database does not allow bigger dimensions.
rubenwardy wrote:The player position is stored using floating point numbers. It's like scientific notation: 1.12345 * 10^3. Floats can handle larger ranges, but when the number is too big then errors begin to occur due to precision. For example, it might be able to store 5 decimal places like 1.12345 * 10^3. If 0.00001 starts to represent a large unit, for example a metre, because of the 10^x scale, you will notice juttering (it can only be precise to a metre then).
Blocks are stored using integers. You don't get these errors with them, but you're limited to a range depending on how big the int is.
rubenwardy wrote:Players are entities. And I was talking about being able to teleport outside of the map range.
The maximum possible limits of the map are 2^16 / 2 = 32,768 due to chunks using 16 bit positions per axis (it's slightly more complicated than that, because they use serials rather than x, y, z). The map stops generating, however, at 31,000ish (it's a multiple of 16, iirc) to stop bugs, or something like that, so all the blocks from 31,000 to 32,768 are invisible ignore nodes.
As for teleporting, it's probably not checked. By jittering I mean shaking whilst moving, and you won't be able to tell if there's no blocks. Player positions are stored using floats, but there will be something else that limits the range to 617,721. 600,000 probably isn't far enough for jittering to happen, you'd need at least 1,000,000 at a guess.
rubenwardy wrote:It's due to there being different technical limits, the 31000 stops this being an issue. The teleport command not validating input is an issue in terms of a user interface - it shouldn't be possible to teleport outside of the map. The sun and moon don't move except across the sky, they're relative to the player, so they won't be effected by jittering Also, I said movement jittering not rotation. Rotation is unaffected. When i say jittering, I don't mean low fps.
And it's not redundant at all, the only programmed limit is the map gen at 31000 the rest are a result of technical details. As for what exactly the technical details relating to player position are, it'll have to be researched.
wcwyes wrote:Any limit that's not the result of a program failure is programmed that way....
paramat wrote:There are probably good reasons for different limits we are not aware of, or if not, that's just the way MT chaotically evolved and it's too much of a rewrite to alter it. This is all just something to be accepted.
prestidigitator wrote:wcwyes wrote:Any limit that's not the result of a program failure is programmed that way....
You make it sound like the entire game was developed very consciously, with a single set of completely consistent intentions, by a single neigh-omniscient programmer. Hell, even relatively small projects by a single developer don't always work that way, let alone open-source projects with multiple developers. Welcome to the world of software.
This is almost certainly a bug. You can debate all day over whether it should be made a feature somehow, and how much effort it would take to make it work. But there's not much point in arguing over whether it was done this way for some nefarious and elusive reason to allow some kind of interesting functionality that none of us know about.
wcwyes wrote:For my projects it would be nice to see this added as a feature, but if it can't be done I'd like to see the limits unified down to the world limits seems they are the smallest limits.
rubenwardy wrote:Glass walls break easily, so on laggy servers you'd be able to break free before the server notices. Would be better to add an immortal node.
Users browsing this forum: No registered users and 10 guests