fixed size world

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

fixed size world

by minetestcr » Tue Mar 17, 2015 14:49

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: 826
Joined: Tue Mar 05, 2013 00:36

Re: fixed size world

by 12Me21 » Tue Mar 17, 2015 16:11

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

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: fixed size world

by Calinou » Tue Mar 17, 2015 16:13

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

To create large walls quickly, use WorldEdit.
 

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

Re: fixed size world

by Don » Tue Mar 17, 2015 16:29

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: 57
Joined: Fri Feb 13, 2015 21:31

Re: fixed size world

by minetestcr » Tue Mar 17, 2015 19:02

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: 2980
Joined: Sun Sep 09, 2012 17:31

Re: fixed size world

by Sokomine » Thu Mar 19, 2015 04:49

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
screenshot_810431765.png
Side view
screenshot_810431765.png (135.5 KiB) Viewed 3038 times
skyplatform.png
Some pre-defined platform types
skyplatform.png (82.41 KiB) Viewed 3038 times
screenshot_810542394.png
Platforms of diffrent type, seen from above.
screenshot_810542394.png (550.91 KiB) Viewed 3038 times
A list of my mods can be found here.
 

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

Re: fixed size world

by Amaz » Thu Mar 19, 2015 08:21

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

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: fixed size world

by TenPlus1 » Thu Mar 19, 2015 10:24

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...

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 57
Joined: Fri Feb 13, 2015 21:31

Re: fixed size world

by minetestcr » Thu Mar 19, 2015 13:34

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: 2980
Joined: Sun Sep 09, 2012 17:31

Re: fixed size world

by Sokomine » Fri Mar 20, 2015 11:51

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: 57
Joined: Fri Feb 13, 2015 21:31

Re: fixed size world

by minetestcr » Mon Mar 23, 2015 14:16

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

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

Re: fixed size world

by wcwyes » Mon Apr 13, 2015 23:26

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
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: fixed size world

by Krock » Tue Apr 14, 2015 05:56

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.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

Re: fixed size world

by wcwyes » Tue Apr 14, 2015 07:15

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 » Tue Apr 14, 2015 07:19

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: fixed size world

by rubenwardy » Tue Apr 14, 2015 07:39

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.
 

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

Re: fixed size world

by wcwyes » Wed Apr 15, 2015 05:17

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: fixed size world

by rubenwardy » Wed Apr 15, 2015 07:50

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.
 

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

Re: fixed size world

by wcwyes » Wed Apr 15, 2015 19:39

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: fixed size world

by rubenwardy » Wed Apr 15, 2015 19:58

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
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

Re: fixed size world

by wcwyes » Thu Apr 16, 2015 05:30

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: fixed size world

by rubenwardy » Thu Apr 16, 2015 05:52

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.
 

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

Re: fixed size world

by prestidigitator » Thu Apr 16, 2015 08:45

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.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: fixed size world

by paramat » Thu Apr 16, 2015 20:45

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: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: fixed size world

by Don » Thu Apr 16, 2015 20:57

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
 

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

Re: fixed size world

by wcwyes » Fri Apr 17, 2015 03:20

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.

I'm not saying reasons why it was programmed this way only that it was.
I'm not saying that it should be a feature, but more that the limits should be unified.
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.
 

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

Re: fixed size world

by prestidigitator » Fri Apr 17, 2015 07:22

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.

Fair enough. That does seem like the most likely resolution, given that the fixed-type storage of node positions is most likely sprinkled all throughout the engine code and the database. I suggest filing a bug report using GitHub.
 

hjvl
New member
 
Posts: 1
Joined: Thu May 14, 2015 00:09
In-game: Jeroen

Re: fixed size world

by hjvl » Thu May 14, 2015 00:13

What about creating 6 glass walls (worldedit) and protect them with areas protection?
Like a hollow cube.

I mean, what are the down sides of doing this?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: fixed size world

by rubenwardy » Thu May 14, 2015 07:41

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.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: fixed size world

by twoelk » Thu May 14, 2015 13:43

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.


clouds?
 

Next

Return to Minetest General

Who is online

Users browsing this forum: No registered users and 10 guests

cron