Minetest on a spherical planet

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Minetest on a spherical planet

by Jeija » Thu Oct 06, 2016 19:59

I have made two YouTube videos on the (im)possibility of making the minetest world look and behave somewhat like a spherical planet. I thought I might share them with you. The title says Minecraft (because that is the more commonly known game and the math applies to both games), but this is acutally minetest. Click these pictures to watch them:


Image

Image

Download
You can get this game from my GitHub page with additional resources in the releases section.
You can also get a precompiled Windws build.

The planet_radius setting
The planet's radius is the number of mapblocks (=16x16x16 nodes) below sea level. So if
Code: Select all
planet_radius = 2

then you can dig down to max. y = -planet_radius * 16 = -2 * 16 = -32 before falling through the center.

The planet's circumference is then calculated as ceil(planet_radius * Pi) * 16 * 2 (basically 2 * Pi * r, but rounded up to mapblocks). The flat plane is centered at the origin (x = 0, z = 0), so you the map wraps around to the other side at x/z=+/- planet_circumference / 2. For planet_radius = 2 that means you will "teleport" at ceil(2 * 3.14) * 16 * 2 / 2 = ceil(6.28) * 16 = 7 * 16 = 112.

Does the the server or the client need the planet settings?
Both server AND client need to have the SAME settings to make the planet work. Connecting with a spheretest client to a minetest server generally works, but things like active blocks and objects (other players, items, mobs) close to planet edges will be broken. This is of course far from ideal (ideally, the radius should be defined at world creation and synced from the server to the client), but that is because spheretest is only a demo.

The center of the planet and planet_keep_scale
If planet_keep_scale is true, aspect ratios of blocks are preserved. Since there is the same density of blocks close to the core like on the surface, this implies that there is no center point, there will always be a empty space underneath you.
If planet_keep_scale is false, aspect ratios are not preserved. The further down you go, the narrower the blocks get. This means there will be a center point, but the world gets very glitchy down there.

I can't see across the edges. It just teleports the player!
You are propably on a very large planet. Spheretest has only ever really been tested with planet_radius <= 5. If you can't see across planet edges, please make the planet small enough and adjust your viewing range to 500 or more (smaller planets will also work fine with smaller viewing ranges):
Code: Select all
viewing_range = 500


How do you like it?
Last edited by Jeija on Sun Oct 09, 2016 08:40, edited 3 times in total.
 

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

Re: Minetest on a spherical planet

by Krock » Thu Oct 06, 2016 21:25

<3 it.

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

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
Location: Germany
In-game: lof

Re: Minetest on a spherical planet

by lightonflux » Fri Oct 07, 2016 00:43

Great work. With a map gen that is aware of the sphere setting it would make an astonishing feature that afaik no other voxel game has. Would really help to "sell" minetest.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Minetest on a spherical planet

by azekill_DIABLO » Fri Oct 07, 2016 11:11

Jeija wrote:I have made two YouTube videos on the (im)possibility of making the minetest world look and behave somewhat like a spherical planet. I thought I might share them with you. The title says Minecraft (because that is the more commonly known game and the math applies to both games), but this is acutally minetest. Click these pictures to watch them:


Image

Image

You can get this game from my GitHub page.

How do you like it?


Hail Jeija. this is. AWESOME§§§§§§§§!!!!!
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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

Re: Minetest on a spherical planet

by Krock » Fri Oct 07, 2016 11:44

azekill_DIABLO wrote:Is there a compiled version? im a noob with compiling

For the case you're on Windows or have Wine installed:

Download 1: Override pack for a dev_MSVC installation (Dropbox, 7z archive, ~ 1.36 MiB)
Download 2: Megapack (GitHub, zip archive, ~31.3 MiB)
Source: https://github.com/SmallJoker/minetest/ ... SPHERETEST

Otherwise you can compile it yourself from the source link in the main post ;)
Last edited by Krock on Sun Oct 09, 2016 09:09, edited 2 times in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Minetest on a spherical planet

by azekill_DIABLO » Fri Oct 07, 2016 11:47

ok i think i will need even more detailed explanation, in french if possible (don't know what do we talk in switzerland)
 

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

Re: Minetest on a spherical planet

by firefox » Fri Oct 07, 2016 15:26

=(0.0)= incredible

is it possible to create multiple planets in 1 world? guess not... but what about paramats skyland and layers mapgens? are they compatible?
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

User avatar
minos
New member
 
Posts: 2
Joined: Fri Oct 07, 2016 18:34
IRC: minos or hydargos123
In-game: minos

Re: Minetest on a spherical planet

by minos » Fri Oct 07, 2016 18:37

azekill_DIABLO wrote:Is there a compiled version? im a noob with compiling

Me too :p
And wine don't want to launch the windows version (just nothig happen)...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: Minetest on a spherical planet

by Jeija » Sat Oct 08, 2016 11:49

I have now updated the first post with a precompiled Microsoft Windows version of the game, including all necessary changes to minetest.conf to make the planet happen as well as minetest_game, the satellite mod and several other mods and the demo world from the videos.
Thanks to sfan5 and Krock who helped make this happen!
 

User avatar
maikerumine
Member
 
Posts: 1350
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Minetest on a spherical planet

by maikerumine » Sat Oct 08, 2016 12:14

Your videos are very detailed and very well made. I foresee this project of yours opening the door to a nee future in voxel games. :D
 

User avatar
maikerumine
Member
 
Posts: 1350
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Minetest on a spherical planet

by maikerumine » Sat Oct 08, 2016 13:24

If anybody is interested, I set up a temp server at: 23.28.87.79 port 30003 Running ESM game on a 200meter radius world. :)
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Minetest on a spherical planet

by taikedz » Sat Oct 08, 2016 13:59

Haha Maikerumine you beat me to it :-)

I'm running a server for this too, albeit a very basic one ;-)

minetest.ducakedhare.co.uk : 31000 ; it's minimal and on low resources, since it really is only a proof of concept for now.

For anybody interested, you can also get a compiled run-in-place Linux binary here, http://helpuse.com/spheretest

Just do

Code: Select all
git clone https://github.com/Jeija/spheretest
git clone https://github.com/minetest/mintetest_game minetest/games/minetest_game
cd minetest
mkdir bin
curl  http://helpuse.com/spheretest > /bin/spheretest
chmod 755 bin/spheretest
curl http://helpuse.com/minetest.conf > minetest.conf
nano minetest.conf # set your planet_radius to match that of the server!!
bin/spheretest


Quick vid:

https://www.youtube.com/watch?v=wMulYMzcKD8
Last edited by taikedz on Sun Oct 09, 2016 12:14, edited 2 times in total.
 

User avatar
ExeterDad
Member
 
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad

Re: Minetest on a spherical planet

by ExeterDad » Sat Oct 08, 2016 14:24

@Jeija this is so amazing! I'm also impressed with your video presentations. You did a amazing job illustrating the math (even though it was above me for the most part).
I'm hoping we will see this go further so we can have a alternate way to play MT. Maybe even see the landscape tile with a mapgen other than flat.
Thanks for your work!

Edit: @taikedz... Oooops! Typo in your github urls! Loved your demo video as well :)
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Minetest on a spherical planet

by taikedz » Sat Oct 08, 2016 17:45

Thanks ExeterDad - took the opportunity to also change the minetest URL to Jeija's
 

User avatar
Fixer
Member
 
Posts: 891
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer

Re: Minetest on a spherical planet

by Fixer » Sat Oct 08, 2016 21:21

This is very cool. I like that shader effect, I'm a bit confused about planet radius setting, if I want planet radius with 16000 nodes, which number I need to set? Watched your videos too, a lot of explanation. This game explains earth curvature like a boss.
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Minetest on a spherical planet

by taikedz » Sat Oct 08, 2016 22:45

the planet radius is expressed in "blocks" - where there are 16 voxel nodes per block side, a block being a section of map 16x16x16.

I forget where I read about the block size, but I'm sure it's somewhere in the dev wiki....


It should also be noted that you can connect to any Minetest server with the Spheretest client ; it's the client that decides the size of the world used, nothing you set on the server will change that.

Probably for the next version

Also a wee bit o feedback - it could be of interest to cause the client to take the server's value (intergate it to the connection protocol?) And to possibly add a field to the "create" screen for local worlds to specify a radius at that point... Dunno how easy this is to do or not....

But being able to turn on "sphere mode" when the server exposes it, or during a world creation setting, would be fantastically awesome - and I would love to see this variant become an option in the official client.....!

I noted some were noticing that if you get to the "centre" (bottom) of the world, it looks like a core central sphere is missing from the botom.... it might be useful to incorporate the explanation at some point of this phenomenon, many still are seeing this as a sphere where there would be an actual "centre". Rather, I would explain it as a wormhole at the bottom of the world...
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: Minetest on a spherical planet

by Jeija » Sun Oct 09, 2016 08:50

I have updated the first post to answer some of your questions, like what the planet_radius setting really does. If you can't see across the planet "edges", the first post should also explain how to fix that.

Unfortunately, I don't think I can continue working on spheretest or integrating spheretest into upstream minetest, just because I don't really have the time for it. If anyone wants to help out with spheretest, pull requests are very welcome. If you want to integrate spheretest into upstream minetest, then please go for it and use any spheretest code you like. Feel free to ask any questions you may have about my code / the maths / ...
 

User avatar
minos
New member
 
Posts: 2
Joined: Fri Oct 07, 2016 18:34
IRC: minos or hydargos123
In-game: minos

Re: Minetest on a spherical planet

by minos » Sun Oct 09, 2016 10:09

Hi !

Thanks jeija (i am hydargos123), with your help i have compile this version for linux:
https://drive.google.com/open?id=0B2YZv ... 1JNNDdiNm8
I dont know if it work between differents computers, but you just have to extract the .zip and run ./bin/Minetest
I have added the mods "Sky night, Mesecons, Satellites and Torches".*Dont forget you can tweak settings in Minetest.conf! ;)

minos
 

User avatar
Onyx
Member
 
Posts: 114
Joined: Fri Sep 25, 2015 08:36
Location: Steinheim-NodesNation
In-game: onyx58

Re: Minetest on a spherical planet

by Onyx » Sun Oct 09, 2016 10:13

Wow! More fun in Minetest, thanks for sharing. ;)
"Science sans conscience n'est que ruine de l'âme."
-----------------------------------------------------------------------------------------
Steinheim NodesNation : steinheim-minetest.servegame.com Pt : 28000
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Minetest on a spherical planet

by taikedz » Sun Oct 09, 2016 10:48

I have never learned C++ nor are my math skills up to scratch.... but i feel compelled to learn all of a sudden....

Thankfs for starting the POC Jeija and for all the explanations!

Anyone else here interested, and possibly with greater skills on all fronts than mine?
 

User avatar
toby109tt
Member
 
Posts: 648
Joined: Sun May 29, 2016 23:42
Location: Belgium menen
GitHub: tobyplowy
In-game: Toby109tt

Re: Minetest on a spherical planet

by toby109tt » Wed Oct 26, 2016 13:11

Jeija wrote:I have made two YouTube videos on the (im)possibility of making the minetest world look and behave somewhat like a spherical planet. I thought I might share them with you. The title says Minecraft (because that is the more commonly known game and the math applies to both games), but this is acutally minetest. Click these pictures to watch them:


Image

Image

Download
You can get this game from my GitHub page with additional resources in the releases section.
You can also get a precompiled Windws build.

The planet_radius setting
The planet's radius is the number of mapblocks (=16x16x16 nodes) below sea level. So if
Code: Select all
planet_radius = 2

then you can dig down to max. y = -planet_radius * 16 = -2 * 16 = -32 before falling through the center.

The planet's circumference is then calculated as ceil(planet_radius * Pi) * 16 * 2 (basically 2 * Pi * r, but rounded up to mapblocks). The flat plane is centered at the origin (x = 0, z = 0), so you the map wraps around to the other side at x/z=+/- planet_circumference / 2. For planet_radius = 2 that means you will "teleport" at ceil(2 * 3.14) * 16 * 2 / 2 = ceil(6.28) * 16 = 7 * 16 = 112.

Does the the server or the client need the planet settings?
Both server AND client need to have the SAME settings to make the planet work. Connecting with a spheretest client to a minetest server generally works, but things like active blocks and objects (other players, items, mobs) close to planet edges will be broken. This is of course far from ideal (ideally, the radius should be defined at world creation and synced from the server to the client), but that is because spheretest is only a demo.

The center of the planet and planet_keep_scale
If planet_keep_scale is true, aspect ratios of blocks are preserved. Since there is the same density of blocks close to the core like on the surface, this implies that there is no center point, there will always be a empty space underneath you.
If planet_keep_scale is false, aspect ratios are not preserved. The further down you go, the narrower the blocks get. This means there will be a center point, but the world gets very glitchy down there.

I can't see across the edges. It just teleports the player!
You are propably on a very large planet. Spheretest has only ever really been tested with planet_radius <= 5. If you can't see across planet edges, please make the planet small enough and adjust your viewing range to 500 or more (smaller planets will also work fine with smaller viewing ranges):
Code: Select all
viewing_range = 500


How do you like it?

This Is Amazing!! I Can't wait to see what you will make in the Future (Keep Up The Awesome work)
i'm the co-dev and lead artist of farlands
 

User avatar
Prot
Member
 
Posts: 36
Joined: Thu Apr 02, 2015 13:20
Location: SaratOFF
GitHub: EuPhobos
In-game: EuPhobos
 

Next

Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 1 guest