12/4/2016 in devlog
The unofficial title of this issue could be "Generating star systems with science". Because that's essentially what Michi did this week and he'll tell you all about it below.
The bad news: This was one of the (fortunately) rare weeks with more or less zero time available for Prosperous Universe. The year is drawing to a close and that usually means that all kinds of external jobs need to get finished before everyone disappears over the holidays.
The good news: Next week, Michi and I will be together at simulogics HQ again, so there'll definitely be something to report!
This week I focused on two things: First, continue the work on the planet generation and second, implement an algorithm to distribute resources to the generated planets.
One of the attributes that was missing for the planet generation up until now was the planets' masses. The mass has a huge influence on how planets are shaped. If a planet's mass is low it might loose almost all of its atmosphere due to solar effects. If the mass is high it might accumulate a very dense atmosphere which leads to a high surface pressure.
To find out more about the distribution of masses in solar systems I started to look at the mass distribution in our solar system. The first few planets are rocky and have a maximum mass of one earth mass. Then the big gas giants follow, with masses larger than 100 earth masses. After that we have two fairly large ice giant, Neptune and Uranus, and finally a few rocks, that aren't even called planets anymore. Is this mass distribution a blueprint for other solar systems? Or is this just a whim of nature? It turns out that the formation of star systems is a fairly complex topic. From what I found out the scientific community is still figuring out the details. I found one thing though, that might make a good rule to implement in a game like Prosperous Universe and that's the concept of the frost line. The frost line is a distance from the sun at which elements can only exist as ices. These ices are more compact than the gases closer to the sun and have a greater gravitational influence and therefore the planets behind the frost line are larger. That is what I went for with creation the masses of the planets. So far it produces nice and believable results.
The second big topic this week was resource distribution. We obviously don't want to have super-planets that have all the resources. Ideally resources are scattered throughout the star systems and rare resources simply occur less often than the common ones. To implement this every natural resource has two values: abundance and concentration. Abundance is a simple value that states how common a resource is in the whole universe. If the value is high the world generation process will create the resource more often than one with a low value. Concentration is a value that indicates how much of a resource is available at a planet if that planet has that resource. So a quick example: Gold ore has a low abundance and a low concentration value. That means it is hard to find, and even if you find gold ore it doesn't contain much gold. Air for example has a low abundance value but a high concentration value. That means it is really hard to find a planet that has air as atmosphere, but if you found one that air is literally everywhere.
Of course there are a lot of other things to consider: Gas planets can only have gas resources, no ores etc. The atmosphere's density influences the concentration of gaseous resources and so on!