fixed size world

minetestcr
Member
Posts: 58
Joined: Fri Feb 13, 2015 21:31

fixed size world

by minetestcr » Post

Hello!
I've been browsing the forum but cannot find a way to make a world with specific limited dimensions. For example, make a world tha is only a 1000 nodes in each direction. I am supposing that a limited world will consume less memory and run better!!! I also want to create a world in wich my students don't get so distracted. Thanks!

User avatar
12Me21
Member
Posts: 873
Joined: Tue Mar 05, 2013 00:36
GitHub: 12Me21
Location: (Ignore all of my posts before 2018)

Re: fixed size world

by 12Me21 » Post

you could make a wall of cloud or something, if there isn't any better way (IDK though)

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: fixed size world

by Calinou » Post

Try using the Map Tools mod. You can place unbreakable nodes.

To create large walls quickly, use WorldEdit.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: fixed size world

by Don » Post

You could use world edge and set the edges to the size you want.viewtopic.php?f=9&t=10753
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

minetestcr
Member
Posts: 58
Joined: Fri Feb 13, 2015 21:31

Re: fixed size world

by minetestcr » Post

Ok. Thanks for all the answers, I'm gonna try and see wich one works better for this case.

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.

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

Re: fixed size world

by Sokomine » Post

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.
That's right. I once started a mod that'd build the world based on 100x100 nodes big "platforms". I never got around to sort out some issues that would be needed for realeasing it, but it does work in general. You can choose how you want the next 100x100 area to be. The bottom of each area is indestructable cloud. There are, however, no borders, and anyone can expand.

Multiple platforms of diffrent type. Note that mapgen has not been disabled (which would have been better):
Image

Some pre-defined platform types. They're all based on one common schematic:
Image

Side view of one unchanged platform. The materials get replaced by whatever is suitable for the type you choosed.
Image

The mod so far just has the most basic features and no polish at all. If you choose the ocean type, water will start flowing out of it until you add more solid platforms at the sides. There's no border. And the build chests need to be digged in order to update their formspecs. Plus it might get a bit difficult to get the first chest placed. I can put it on Github if someone's intrested.
Attachments
Side view
Side view
screenshot_810431765.png (135.5 KiB) Viewed 1020 times
Some pre-defined platform types
Some pre-defined platform types
skyplatform.png (82.41 KiB) Viewed 1020 times
Platforms of diffrent type, seen from above.
Platforms of diffrent type, seen from above.
screenshot_810542394.png (550.91 KiB) Viewed 1020 times
A list of my mods can be found here.

Amaz
Member
Posts: 354
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

Re: fixed size world

by Amaz » Post

That looks very interesting Sokomine! If you would be able to put it on github, that would be great.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: fixed size world

by TenPlus1 » Post

Here is a simple and quick solution to your problem, create a mod and add the following code. It will hard-limit any player from crossing over a set boundary and return them to spawn area...

Code: Select all

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)

minetestcr
Member
Posts: 58
Joined: Fri Feb 13, 2015 21:31

Re: fixed size world

by minetestcr » Post

Thank you Sokomine and TenPlus1!

Sokomine, please post your mod, I would like to try it, thanks.

TenPlus1, interesting solution, I think it may help with another project of mine.

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

Re: fixed size world

by Sokomine » Post

I've added some walls around the skyplatforms so that you won't fall down (at least not as long as you don't deliberately climb up the wall and jump out). The mod is called skyplatform.
A list of my mods can be found here.

minetestcr
Member
Posts: 58
Joined: Fri Feb 13, 2015 21:31

Re: fixed size world

by minetestcr » Post

thanks!!! I'll try it now...

wcwyes
Member
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Post

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?

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

Re: fixed size world

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

wcwyes
Member
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Post

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.
What I don't get is why is the area there? Why is the area usable in some respects but not others?
The actual buildable(and able to be travelewithout noclip) area is (30,912+30,927+1)^3=236,487,637,504,000 While the area you can place non-coision entities(and they will stay) is (32,767*2+1)^3=281,462,092,005,375 or where the map will remove them (32,784*2+1)^3=281,900,392,615,009. You can teleport within the area of (214,748*2+1)^3=79,228,312,154,346,473.
You can travel over 250,000 at least in 3 directions. Why different restrictions for different amounts of space? The program removes/allows entities after the area, programmatically it already shows a larger dimension.

wcwyes
Member
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Post

I'm mainly hoping to use the area for Pocket realms, which already proves slightly promising, but not very with the program removing things shortly after

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: fixed size world

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

wcwyes
Member
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Post

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.
I think I already proved that to be untrue with my statement about entities(I wasn't talking about players either, hence my statement about teleporting and traveling) which brings me back to the why different restrictions for different funtions? Maybe you a point on the traveling, so why the strange restriction level on teleporting?
Updatate: The traveling(with noclip) restrictions are 617,721 in all directions with no juttering either, just an invisible wall on all sides which is (617,721*2+1)^3=1,885,680,626,214,483,307

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: fixed size world

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

wcwyes
Member
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Post

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.
It still stands why the the different limits? It does me no good to have a telephone limit of 214,748 if I can walk 617,721. It does me no good for the map to remove all entities except player after 32,767 if it won't let me even place them past 32,784. It does no good allow me to place entities at all past 30,927 if I can't place nodes. It's literally redundant programming that could be summed up with a single number.
As for jittering I can tell if I keep my eyes on the sun/moon(on slow servers I've experienced jittering and the sky moves).There's an invisible wall at 617,721.

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: fixed size world

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

wcwyes
Member
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Post

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.
Any limit that's not the result of a program failure is programmed that way, and you do have a point on the jittering except for the fact you said 617,721 wouldn't cause jittering anyways since I hit a wall(that would have been programmed also).
each limit would have to be programmed separately unless there was a central reference. There should be a central reference, instead of making several separate references to different limits(that's what I mean by redundant).

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: fixed size world

by rubenwardy » Post

The technical limits are caused by, for example, how big the number they use is, compared to "stop the map at this point".
The different limits are made into one by the map gen stopping at 31,000.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

Re: fixed size world

by prestidigitator » Post

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.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: fixed size world

by paramat » Post

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.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: fixed size world

by Don » Post

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.
I agree. I have been playing minetest for a couple years now and never was bothered by it.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], ROllerozxa and 20 guests