Minetest on a spherical planet

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

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

Re: Minetest on a spherical planet

by Krock » Thu Oct 06, 2016 21:25

<3 it.

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

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
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
Naj
Member
 
Posts: 170
Joined: Sat Sep 19, 2015 21:14
GitHub: pyrollo
In-game: naj

Re: Minetest on a spherical planet

by Naj » Fri Oct 07, 2016 10:06

That reminds me maps on freeciv. The settings allow to have a cylinder (East-west wrapped) or donut world (E/W and N/S wrapped). The maps stays flat, but you can go around the world.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
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§§§§§§§§!!!!!
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

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

Re: Minetest on a spherical planet

by azekill_DIABLO » Fri Oct 07, 2016 11:16

Is there a compiled version? im a noob with compiling
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
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.
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>
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
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)
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
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?
 

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: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Minetest on a spherical planet

by azekill_DIABLO » Fri Oct 07, 2016 20:32

welcome to the forums ;P

you know, everything wih windows involved will bug.
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

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: 946
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: 946
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: 587
Joined: Sun May 15, 2016 11:11
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

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
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: 1121
Joined: Sun Jun 01, 2014 20:00
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 :)
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
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
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: Minetest on a spherical planet

by Fixerol » 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: 587
Joined: Sun May 15, 2016 11:11
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

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: 99
Joined: Fri Sep 25, 2015 08:36
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: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Minetest on a spherical planet

by azekill_DIABLO » Sun Oct 09, 2016 10:39

not flat mapgen bugs ;0;
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
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: 296
Joined: Sun May 29, 2016 23:42
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
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
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):
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
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 love pixels and voxels ( ͡° ͜ʖ ͡°)
 

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

Re: Minetest on a spherical planet

by Prot » Sun Nov 06, 2016 08:28

Very awesome, but "stitch problems" present..
https://youtu.be/OmJ2UNU-3P0
 

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

Re: Minetest on a spherical planet

by paramat » Mon Nov 07, 2016 12:52

You just need a mapgen that blends across the wrap-edges, it could be done with a lua mapgen or a custom core mapgen.
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Minetest on a spherical planet

by D00Med » Fri Nov 11, 2016 23:05

This looks incredible!
edit: it is incredible!
Last edited by D00Med on Tue Nov 15, 2016 08:06, edited 1 time in total.
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

BlueTangs Rock
Member
 
Posts: 62
Joined: Sun Jul 10, 2016 05:00

Re: Minetest on a spherical planet

by BlueTangs Rock » Tue Nov 15, 2016 04:43

Cool!
 

BlueTangs Rock
Member
 
Posts: 62
Joined: Sun Jul 10, 2016 05:00

Re: Minetest on a spherical planet

by BlueTangs Rock » Tue Nov 15, 2016 04:44

Is it compatible with mods that add extra biomes,or mods that add new terrain blocks?
 

Next

Return to Minetest-Related

Who is online

Users browsing this forum: No registered users and 3 guests

cron