Solar system generator

Sooo,this post is,i think, is overdue.
Ive finished the prototype to the Solar System generator about 80%.With only some tweaks needed,that need to be discussed here.Ill show later what the prototype currently creates and how.

First of all,i want to ask how i should proceed with the player planet generation.
I was thinking of adding some common elements from the periodic table for metallic and non metallic elements.

theres the following choice of elements:
Non-Metallic : Hydrogen,Helium.
Metallic :Iron,Titanium,Tin,Copper,Aluminum,Carbon,Oxygen,Nitrogen,Carbon,Silicon and Uranium.Many more may be added as needed.

Also,non-metallics are found in higher quantities and further out from the main star since they are lighter than metallic elements,and the supernove that created the star system would blow the lighter elements farther out.
Those distributions could depend on the stars metalicity as they do in real life,but they might take more time to calculate.

The lithosphere and atmosphere composition will be decided by planet orbit position ,temperature and albedo.

Now,What my model currently does is simulate the orbit’s formation through pebble accretion.Big pebbles nonetheless lol, since computing power is limited.It uses the so-called Hills Sphere which is the radius around a body that can stably contain satellites.

The Y axis represents the distance from the sun on a logarithmic scale.
with each y value representing the smallest width of an orbit.

The picture on the right represents those pebbles and their mass, I’ve tried to “project” the discs of the orbits. and thus more mass should be on the higher orbits assuming the same density, then even more mass up to a certain point because of how elements on the planetary disk are arranged.
The one on the left the planets cleared orbit with a legend showing earth masses of each planet.

Firstly it calculates the Hills Sphere for every pebble, adding 1 on a “Field Matrix” to every orbit in the object’s Hills Sphere, then the orbit is given the average value of the field’s strength,because the pebbels clear the entirety of their orbit + if the added field strength is enough to pull the adjacent orbit to it(has the same value).It calculates the mass of every orbit that has formed.

Secondly it randomly chooses a distance (y point) and checks to see what orbit dominates that distance. Then it checks to see if the current object’s HillSphere is bigger than the current orbit width(it can merge with nearby orbits).It should actually reach the middle of the other body’s orbit but a compromise was made to speed up the simulation.
The simulation can stop after a number of iterations or after a certain number of planets is reached.If the second case then the HillSphere strength is increasing after each iteration to get to the desired planet number.

The player chosen planet WILL use TJWhales simulation,should it be used for every other habitable planet?

1 Like

How fast is the generation? I shouldn’t take more than a few seconds when starting a new game.
Does this complicated algorithm have so many benefits that it should be preferred over a simpler one (for example picking just a random number of planets, and placing them following a partially random distance ratio)?

1 Like

I second hhyyrylainen concern on generation time, but I see another thing we might want to discuss first: how randomly should the player’s planet be generated?

By that, I mean that we may want to give the player the possibility to define features of the planet and compute the rest from that, for those who are looking for a specific environment (and of course let randomization do the job if the player wants so). Now, if the player is allowed to define some parameters, we still have to deliver a realistic simulation (of course, we can’t let the player define anything, like a lava-filled planet at the edge of the solar system).

I think the orbit is, one way or another, something we’d want to leave to the player in such a case, with some degree of freedom (keeping within habitable range), as an example to define the length of a local year. So, my question related to this model would be: can we use this generation with parameters set so that we still have a predefined orbit emerging?

Of course, this question only apply if we want the player to actually be able to give some input to the generation.


More as a note on your post, I think it would be clearer if the figures actually had titles and axis & ticks labels appearing. Even though you (partly) detail these in the text, it’s much more cognitively demanding to look into the text, recall, move to the figure again and so on. It can also hold some details like distance that would only be a burden to the text itself.

Also, do the two subfigures share the same y-axis?

2 Likes

Its not in C# ,it was just an idea in python, i havent yet measured the speed in python but it takes around 3 secs.
As for the benefits its just random and semi-realistic.So semi-realistic diversity i guess.
If you want some realism regarding orbits you’d still need to calculate the gravity between every adjacent planet.

I was thinking that the player defined planet will delete whatever orbit it intersects in the habitable zone,and be placed there among the rest of the solar system.
and yes they share the same Y axis