[Mod] Planets [0.1.11] [planets]

User avatar
paramat
Developer
 
Posts: 3252
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

[Mod] Planets [0.1.11] [planets]

by paramat » Sat Jul 02, 2016 10:52

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

Disable damage before entering a new world.
On entering a new world the screen will probably be black, look down and wait a while.

Description
--------------
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.
Last edited by paramat on Sun Jul 15, 2018 23:44, edited 7 times in total.
 

KCoombes
Member
 
Posts: 404
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt

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

by KCoombes » Sat Jul 02, 2016 11:11

very nice work! does the world wrap around now?
 

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

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

by taikedz » Sat Aug 27, 2016 19:58

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?
Not my monkeys; not my circus.
 

User avatar
paramat
Developer
 
Posts: 3252
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Sat Aug 27, 2016 20:09

Very unfinished, i also need to explain it fully.
It is somewhat POC.
Last edited by paramat on Sun Aug 28, 2016 00:05, edited 1 time in total.
 

User avatar
paramat
Developer
 
Posts: 3252
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Sat Aug 27, 2016 23:45

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.
Last edited by paramat on Sat Aug 27, 2016 23:59, edited 1 time in total.
 

User avatar
TheReaperKing
Member
 
Posts: 529
Joined: Sun Nov 22, 2015 21:36

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

by TheReaperKing » Sat Aug 27, 2016 23:59

This is so awesome. I can't wait to see how it progresses.
Resources on happiness and life management - http://MikesHappyPlace.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

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

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

by azekill_DIABLO » Sun Aug 28, 2016 09:16

TheReaperKing wrote:This is so awesome. I can't wait to see how it progresses.

This is the word
 

User avatar
paramat
Developer
 
Posts: 3252
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Mon Oct 03, 2016 02:49

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.
 

User avatar
paramat
Developer
 
Posts: 3252
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Wed Oct 19, 2016 06:07

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.
 

User avatar
ManElevation
Member
 
Posts: 893
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation

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

by ManElevation » Thu Oct 20, 2016 12:05

wow great mod but i cant find an use for it
My Public Mods! Discord: Rottweiler Games#3368
 

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

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

by azekill_DIABLO » Thu Oct 20, 2016 12:57

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!
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 8 guests