Page 1 of 1

Infinite Maps

PostPosted: Sun Sep 02, 2012 13:02
by Jordach
To be precise.

VanessaE wrote:When you're near the center (even a couple thousand meters from it), the game renders fine within previously-documented limits. However, get really far from the center on both X and Z axes, say 30000m or so, and blocks start exhibiting severe rendering glitches. Edges dance around and/or disappear into neighboring edges, signs and other 2d objects flicker in and out of existence, etc. See this video for an example:

http://youtu.be/wBDPPJ6t0wA

Low framerate aside, this is typical of what I'm experiencing.


This is related to the map size, I once tested 62000 as the top limit, not 31000 - the entire textures and blocks vanished, thus meaning endless maps can't be done...

But they can. with that modification to the source, the map generate fine up until 32700/32600 (varies) then it will either crash or stop rendering the textures. (Actually, both can happen, it can also crash before this no render section pf the map.)

The crash I aforementioned is actually the co-ordinates, beyond their maxium variable number off 65535 or similar, thus meaning this variable; v3s16 must be changed into a long "signed" integer.

PostPosted: Fri Sep 28, 2012 18:59
by irksomeduck
Aren't maps pretty much infinite anyway? I think they are big enough anyway.

PostPosted: Fri Sep 28, 2012 22:31
by Jordach
Na, what if a server has been running for almost 4 years, that map "must" be exhausted.

PostPosted: Sat Sep 29, 2012 09:20
by irksomeduck
My idea would be to build an underground civilisation or something. Encourage people to move underground. I mean if you mine a huge cavern out and but dirt on the bottom, that way people could farm, grow trees ect. I lived very deep underground at one point, and it is worth it if you can get enough saplings, food ecy. Of course you would need lots of buckets of water, but I would recommend trying it out.

PostPosted: Thu Oct 04, 2012 06:32
by CTMN
Lots of buckets of water? Never played around with water?

U only need 2 buckets. Place them like this:

~ is water
[] is a hole that u have to dig after u placed the water

~[]
~

Then u have infinite water and can take it out of the hole. It will be refilled automatically.

PostPosted: Tue Oct 09, 2012 15:30
by srothe
Doesn't work for me. Could you please explain the procedure a bit more for dummies?

~[]
~ <--Is this a profile view or a map view?

Cheers, Stefan

PostPosted: Tue Oct 09, 2012 16:21
by PilzAdam
srothe wrote:Doesn't work for me. Could you please explain the procedure a bit more for dummies?

~[]
~ <--Is this a profile view or a map view?

Cheers, Stefan

Its from above.

PostPosted: Tue Oct 09, 2012 19:52
by Topywo
srothe wrote:Doesn't work for me. Could you please explain the procedure a bit more for dummies?

~[]
~ <--Is this a profile view or a map view?

Cheers, Stefan


There's a difference between water/lava_source and water/lava_flowing.

You can fill a bucket with a source, not with flowing. Right-click when you have a filled bucket in your hand to empty it (=placing the source-node)

Whenever you place 2 sources of the same kind (water or lava) with exactly 1 empty block between them, the empty block will fill itself. You might expect flowing water/lava, but in minetest the empty block will fill and turn into a source. This means you can take it with a bucket.

When you take the source that has been created like that, you create a new empty block. This will fill up again and turn into a source, thus becoming takeable again. Etc., etc.. therefore it's called infinite.

p.s. when you take away one of the two outer sources, thus creating an empty block, it will be filled with 'real' flowing water/lava, and not be takeable.

PostPosted: Thu Oct 11, 2012 11:40
by srothe
Ok, now I see how it works. But the initial explanation was wrong or incomplete in two points.

1. You need to create a basin around your intended fountain:

X X X X
X X O X X: Sand, Gravel, Rock, Wood, etc
X O O X O: Empty
X X X X

Otherwise, placing the two bucketloads of water would cause a flooding :-)

2. Now You first need to dig the hole in the ground, then you empty your buckets next to it

X X X X X: Sand, Gravel, Rock, Wood, etc
X X W X W: Water
X W[] X []: Hole
X X X X

If you place the water first, digging the hole has no effect. If you first dig the hole, it indeed refills on taking out water.

3. You may want to cover the two sources by rock etc, to prevent them from being bucketed by accident. Some green and a lantern for decoration, and here I got my personal fountain of youth :-)

Image

Cheers, Stefan

PostPosted: Thu Oct 11, 2012 13:56
by Jordach
Back to on topic, as soon as I can find this among the code:

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
short int v3s16


And change it to a long signed variable, this means we will have a truly endless map downwards!

Short signed: -32768 to 32767

Long signed: -2147483648 to 2147483647

Source: http://www.cplusplus.com/files/tutorial.pdf Page 12

PostPosted: Thu Oct 11, 2012 15:31
by CTMN
@srothe: 1. U can't make holes in the air. And beside, the "hole in the air" would still be filled. ;-)

2. It doesn't matter if u dig the hole in the middle first or if u dig the hole as last. U probably had a lag.

3. It works without that.

@Jordach: Celeron also could make an UNSIGNED long and a bool or short as the negative flag or a long double and do as if the blocks were 0.1 metre(or whatever) high. I'm not sure if he is using integers right now(if u press F5, it sometimes says there "X,0.5,Y" or so).

PostPosted: Thu Oct 11, 2012 21:34
by SegFault22
Jordach wrote:Back to on topic, as soon as I can find this among the code:

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
short int v3s16


And change it to a long signed variable, this means we will have a truly endless map downwards!

Short signed: -32768 to 32767

Long signed: -2147483648 to 2147483647

Source: http://www.cplusplus.com/files/tutorial.pdf Page 12

+1
Can you try to test this and see what happens with it?

PostPosted: Fri Oct 12, 2012 09:36
by Jordach
Do I look like I am going to search out one single damn line?

That's like Santa Claus NOT delivering presents.

PostPosted: Fri Oct 12, 2012 14:51
by CTMN
SegFault, write to Celeron, not to Jordach

PostPosted: Fri Nov 02, 2012 18:52
by MasterGollum
If you do it, we will not finish the map in our lifetime :) it will be more than 10 times the distance from the Earth to the Moon! If I calculated well, starting from the center of the map at 3 m/s speed as the AV moves in my screen, we will need about 23 years walking without stop to reach the end of the map :P Who will be the first to arrive? :) I support this change it is a great idea, the current 32Km size is limiting.

But I think it will require more changes than just "1 line of code", all the places were the coordinates are being used will requires to be changed to 4bytes (long), or it will crash. For example the variables of the lua scripts (if they are not already been stored in 4bytes).

PostPosted: Fri Nov 02, 2012 19:11
by PilzAdam
MasterGollum wrote:If you do it, we will not finish the map in our lifetime :) it will be more than 10 times the distance from the Earth to the Moon! If I calculated well, starting from the center of the map at 3 m/s speed as the AV moves in my screen, we will need about 23 years walking without stop to reach the end of the map :P Who will be the first to arrive? :) I support this change it is a great idea, the current 32Km size is limiting.

But I think it will require more changes than just "1 line of code", all the places were the coordinates are being used will requires to be changed to 4bytes (long), or it will crash. For example the variables of the lua scripts (if they are not already been stored in 4bytes).

Its 2.7777 days with the current map limits.

PostPosted: Fri Nov 02, 2012 20:01
by Dragonop
srothe wrote:
Doesn't work for me. Could you please explain the procedure a bit more for dummies?
~[]
~ <--Is this a profile view or a map view?
Cheers, Stefan


BECAUSE IT NEEDS TO BE LIKE THIS
~[]
[]~ and now you can take from everywere

PostPosted: Thu Jan 24, 2013 19:19
by rubenwardy
You could use find to look for short ints

PostPosted: Thu Jan 24, 2013 20:18
by Calinou
MasterGollum wrote:If I calculated well, starting from the center of the map at 3 m/s speed as the AV moves in my screen.


Walking speed is 4 blocks/second (1 block is one cubic meter), sneaking speed is 1 + 1/3 blocks/second.

PostPosted: Thu Jan 24, 2013 20:56
by jordan4ibanez
This would be a fucking problem. If maps were generated ∞ then there would be ∞ ores and no stone past 31500.

PostPosted: Fri Jan 25, 2013 11:58
by rarkenin
SegFault22 wrote:
Jordach wrote:Back to on topic, as soon as I can find this among the code:

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
short int v3s16


And change it to a long signed variable, this means we will have a truly endless map downwards!

Short signed: -32768 to 32767

Long signed: -2147483648 to 2147483647

Source: http://www.cplusplus.com/files/tutorial.pdf Page 12

+1
Can you try to test this and see what happens with it?


This would involve changing the serialization formats of PointedThing and MapNode, as well as countless other data structures and communication packets.