Page 1 of 1

[Mod] Planets [0.1.11] [planets]

PostPosted: Sat Jul 02, 2016 10:52
by paramat
Image

Image

^ A moon

Image

^ Fissures leading to a lava core

For Minetest 0.4.13 and later
Depends default
Licenses: Code LGPL 2.1. Media CC BY-SA 3.0
Download ZIP, extract and rename to 'planets' https://github.com/paramat/planets/archive/master.zip
Browse code https://github.com/paramat/planets

See later posts for more information.
Disable damage before entering a new world.
On entering a new world the screen will probably be black, look down and wait a while.

Re: [Mod] Planets [0.1.4] [planets]

PostPosted: Sat Jul 02, 2016 11:11
by KCoombes
very nice work! does the world wrap around now?

Re: [Mod] Planets [0.1.4] [planets]

PostPosted: Sat Aug 27, 2016 19:58
by taikedz
Nice :-)

Feels mostly decorative/ POC for now.... undersides of worlds have no lighting, and there aren't any ores in the ground.... so it's more for creative users at the moment...... any plans to further develop this or was it just a proof of concept?

Re: [Mod] Planets [0.1.4] [planets]

PostPosted: Sat Aug 27, 2016 20:09
by paramat
Very unfinished, i also need to explain it fully.
It is somewhat POC.

Re: [Mod] Planets [0.1.4] [planets]

PostPosted: Sat Aug 27, 2016 23:45
by paramat
This mod addresses a problem i have been wanting to solve: how to generate multiple planets throughout the MT worldspace when each planet can be much larger than one mapchunk, considering that mapgen works per-mapchunk?

//////////////

On mod startup a 'space' table is created which is a flat array where each entry represents a mapchunk within a 128^3 mapchunk worldspace. The used worldspace is therefore 10240 nodes along each edge and the table has 2,097,152 entries.
Table entries start as 'nil', and 'nil' is interpreted as a mapchunk full of vacuum nodes.

For each planet added the 'planet id' number is added to the 'space' table for every mapchunk that planet occupies.
Before this though these mapchunks are scanned for any previously added planet, to avoid collided planets.

Random data for each planet is added to a second table called 'def' which is indexed by 'planet id'. This allows a large amount of data for each planet to be stored without it being duplicated in the 'space' table.
The most important planet data is the co-ordinates for it's centre, but there is also data for atmosphere radius, terrain scale, average terrain radius, lava core radius, ocean bool, water radius, atmosphere bool and cloud cover, with more data intended.

All randomness is pseudorandom, so every game session the exact same tables are generated, planets are in the same positions etc.

////////////////

Now when mapgen operates it looks up the entry in the space table corresponding to the mapchunk being generated, 'nil' results in vacuum nodes, otherwise planet data is used to generate part of a planet.

Player gravity depends on planet size and whether the player is close to a planet.
Away from a planet player gravity is set to zero. If in vacuum nodes the player will 'drown' (spacesuit intended).
If there is an atmosphere player sky is set to normal, otherwise a space skybox is used (currently black).

New players are spawned above the first planet and fall down onto it, disable damage first.
If you enable fly and disable damage you can travel through space to find new worlds.

////////////////

Currently all planets are fairly similar, Earthlike and lack caves and ores. The intention is for a variety of planets / moons / asteroids / comets of varying sizes and varying nodes, with or without atmospheres, oceans, clouds.

The spherical planets are for fun, and only have flora on the top segment. More suitable may be to have cubic planets each structured as a standard Minetest world is.

Re: [Mod] Planets [0.1.4] [planets]

PostPosted: Sat Aug 27, 2016 23:59
by TheReaperKing
This is so awesome. I can't wait to see how it progresses.

Re: [Mod] Planets [0.1.4] [planets]

PostPosted: Sun Aug 28, 2016 09:16
by azekill_DIABLO
TheReaperKing wrote:This is so awesome. I can't wait to see how it progresses.

This is the word

Re: [Mod] Planets [0.1.9] [planets]

PostPosted: Mon Oct 03, 2016 02:49
by paramat
v1.9
Add mod-registered ores and decorations using engine ore and decoration placement.

Caves were added a while ago.
Added most ores and basic decorations, intending to add the minimum needed for reasonable gameplay.
Still only Earthlike planets of radius 512. There will be roughly 150 packed into the active space, so fly around to find other planets but disable damage otherwise you will suffocate in the vacuum.

Re: [Mod] Planets [0.1.11] [planets]

PostPosted: Wed Oct 19, 2016 06:07
by paramat
v1.11
Add grey moons. Avoid normal sky on moons. Re-add random radius. Add sun to space skybox. Use silver sand texture for moons. Add moon_stone
Terrain scale proportional to radius. Remove junglegrass. Less cloud cover variation. Don't alter jump strength

See new screenshots in first post.
Basic functionality now, with grey moons added. There will be roughly 1000 planets placed.

Re: [Mod] Planets [0.1.11] [planets]

PostPosted: Thu Oct 20, 2016 12:05
by ManElevation
wow great mod but i cant find an use for it

Re: [Mod] Planets [0.1.11] [planets]

PostPosted: Thu Oct 20, 2016 12:57
by azekill_DIABLO
paramat wrote:v1.11
Add grey moons. Avoid normal sky on moons. Re-add random radius. Add sun to space skybox. Use silver sand texture for moons. Add moon_stone
Terrain scale proportional to radius. Remove junglegrass. Less cloud cover variation. Don't alter jump strength

See new screenshots in first post.
Basic functionality now, with grey moons added. There will be roughly 1000 planets placed.

awesome paramat!