Ok so I’ve made some good progress with this. Code’s in the repo. No pictures I’m afraid. I’ve put some of the text dump outputs below.
Questions which we need to discuss before implementing this / moving forward with it.
-
Size of star. Stars which are very big burn out very fast. Faster than the game would take to complete (microbe stage a couple of billion years alone (which is probably 95% of the game) whereas a star of 3 stellar masses burns out in 370 million years and bigger ones much faster like the cube of the mass). How much ability should the player have to choose to live by a star that will kill them? If the play can choose this then what happens when the star burns out? Dialogue box or some sequence of events (it would be kind of fun to tell the player “you have only 200 million years left to make it to the space stage or die”). The gdd talks about planets in orbit of white dwarfs, do we want this? Right now I’ve only included main sequence stars.
-
The gdd talks a lot about stellar metallicity (what %age of the star is not made of hydrogen and helium). Currently I have taken no account of this. Does anyone know what difference it should make?
-
How much of the solar system should be generated now? I was thinking about this and basically just generating the star and the planet is enough until the space stage. Everything else (meteoroid impacts for example) could just be random.
-
Binary stars. Should they be allowed and if so what difference does it make? (I feel like it’s none, maybe it changes the stellar spectrum as two smaller stars will be much dimmer than a big one of twice the mass (because of how fusion occurs faster under higher gravity (which is why there are supernovas))). Maybe it’s a nice cosmetic thing to have.
-
Moons. Does it matter if the planet has moons? Does this affect anything other than cosmetically? I like the idea of the player evolving on a moon rather than a planet but again does this make any meaningful difference before the space stage?
-
What should we do about habitable zones? Basically (if we have temperature dependent climate effects, which are currently in) the habitable zone changes depends on which gasses are present in the atmosphere. So if you put more CO2 in the planet heats up. This means not all orbital radii are habitable all the time. So how much power should the player have to put themselves in a dangerous place with this? If the planet gets too cold that’s survivable (the oceans freeze over and all photosynthesizers die but you can retreat to the deep ocean vents and live there off Hydrogen Sulfide until volcanic activity puts more CO2 in the atmosphere to heat it up again). However if it gets too hot and all the oceans boil then it’s game over.
NB: Interestingly the size of the planet drops out of the temperature calculations. Basically the amount of light the planet absorbs is proportional to it’s surface area but so is the amount of energy it radiates away as a black body. Therefore that constant can be dropped. So if the earth were twice the size it would be the same temperature (not really as the atmospheric effects would be different but in a purely radiative model yeah). What matters is how far it is from the sun. (One way of intuiting this is to think how, for 1 sq m of land it really doesn’t matter whether it’s alone or surrounded by other land, what matters is how much energy in and how much out). I guess it’s a bit like how your own mass drops out of Newtonian gravity.
-
What about the size of the planet? Right now every planet is the size of the earth. Is there any meaningful difference to having a planet which is bigger and smaller? What about in later stages?
-
Atmosphere, how much, by mass, should there be? The same as earth? Again are there meaningful differences to having more or less gas? Also I just started the atmosphere with Nitorgen and Carbon Dixoide, should there be other starts? Ocean is Water, Nitrogen, Carbon Dioxide and Phosphates and the lithosphere is Hydrogen Sulfide and Carbon Dioxide. It’s interesting that these are enough for everything else to be produced / bootstrapped. Should there be some randomness to this or should it always be the same?
-
I’ve still got a little work to do with the stellar spectrum at the surface (after it passes through the atmosphere). It’s important we fix how much atmosphere there is and how big the planets are because the spectrum really depends on a tube of atmosphere of 1 sq m area (so a big planet with a lot of atmosphere has the same atmospheric absorption as a small planet with a little atmospheric gas). If the planets size and amount of gas will be the same as earth then I’ll just fix everything to that but if they are going to be variables I’ll build in a atmospheric depth calculator. (Once this is done the spectrum under the sea can be computed by the electromagnetic opacity of water (the amount of light exponentially decays as it goes through the water)).
-
List of events / fix the carbon cycle. We need to work out a list of reasons why things move from one bin to another (like atmosphere <-> ocean gas exchange or hydrogen sulphide vents putting stuff into patches). Anyway then I can write an update loop and then it’s pretty much done!
-
How does the player select all this? Is there a “Just give me a planet” button? Can you say “Just give me a hard planet”? Can you adjust everything with sliders etc? It’s nice to be able to design the whole planet yourself but it takes the mystery out of whether you will survive. Somehow hard mode might need to have all threats on but you not know what they are (but how hard is hard? is outside the habitable zone allowed etc)?
Hope you like it! All feedback welcome as always.
Notice how, below, the 2nd planet is 2.4x the size of the sun and so the planet has to be so far out to be habitable that it takes 5.9 earth years to orbit! I’d have just turned 5! (Unfortunately the sun is only in main sequence for 719 milllion years so I wouldn’t have evolved but that’s a technicality )
----- Output Dumps -------
Created new main sequence star
Mass = 0.676184137393 solar masses.
Life Span = 3.23e+10 of our years.
Luminosity = 9.78e+25 watts.
Radius = 4.89e+08 meters.
Temperature = 4892.45776559 Kelvin.
Stellar spectrum = [redacted stellar specturm output (watts / warvelegth)]
Habitable zone = [redacted habitable zone calcs]
Created new planet.
Orbital radius = 7.40e+10 meters.
Radius = Radius of the earth = 6.37e+06 meters.
Orbital period = 1.34e+07 seconds = 0.423404852217 earth years = 1 year for this planet.
Atmosphere = {‘Amino Acids’: 0, ‘DNA’: 0, ‘ATP’: 0, ‘Oxygen’: 0, ‘Carbon Dioxide’: 1.545e+18, ‘Pyruvate’: 0, ‘Hydrogen Sulfide’: 0, ‘Water’: 0, ‘Agents’: 0, ‘Fat’: 0, ‘Nitrogen’: 3.605e+18, ‘Phosphates’: 0, ‘Sulfur’: 0, ‘Protein’: 0, ‘Nucleotide’: 0, ‘Ammonia’: 0, ‘Glucose’: 0}
Ocean = {‘Amino Acids’: 0, ‘DNA’: 0, ‘ATP’: 0, ‘Oxygen’: 0, ‘Carbon Dioxide’: 1.4e+20, ‘Pyruvate’: 0, ‘Hydrogen Sulfide’: 0, ‘Water’: 1.12e+21, ‘Agents’: 0, ‘Fat’: 0, ‘Nitrogen’: 2.8e+20, ‘Phosphates’: 1.4e+20, ‘Sulfur’: 0, ‘Protein’: 0, ‘Nucleotide’: 0, ‘Ammonia’: 0, ‘Glucose’: 0}
Lithosphere = {‘Amino Acids’: 0, ‘DNA’: 0, ‘ATP’: 0, ‘Oxygen’: 0, ‘Carbon Dioxide’: 5000000000.0, ‘Pyruvate’: 0, ‘Hydrogen Sulfide’: 5000000000.0, ‘Water’: 0, ‘Agents’: 0, ‘Fat’: 0, ‘Nitrogen’: 0, ‘Phosphates’: 0, ‘Sulfur’: 0, ‘Protein’: 0, ‘Nucleotide’: 0, ‘Ammonia’: 0, ‘Glucose’: 0}
Spectrum on the surface = [redacted spectrum]
[Finished in 2.6s]
Created new main sequence star
Mass = 2.40534108141 solar masses.
Life Span = 7.19e+08 of our years.
Luminosity = 8.30e+27 watts.
Radius = 1.53e+09 meters.
Temperature = 8389.76031332 Kelvin.
Stellar spectrum = [redacted spectrum]
Habitable zone = [redacted hab calcs]
Created new planet.
Orbital radius = 6.56e+11 meters.
Radius = Radius of the earth = 6.37e+06 meters.
Orbital period = 1.87e+08 seconds = 5.9271568034 earth years = 1 year for this planet.
Atmosphere = {‘Amino Acids’: 0, ‘DNA’: 0, ‘ATP’: 0, ‘Oxygen’: 0, ‘Carbon Dioxide’: 1.545e+18, ‘Pyruvate’: 0, ‘Hydrogen Sulfide’: 0, ‘Water’: 0, ‘Agents’: 0, ‘Fat’: 0, ‘Nitrogen’: 3.605e+18, ‘Phosphates’: 0, ‘Sulfur’: 0, ‘Protein’: 0, ‘Nucleotide’: 0, ‘Ammonia’: 0, ‘Glucose’: 0}
Ocean = {‘Amino Acids’: 0, ‘DNA’: 0, ‘ATP’: 0, ‘Oxygen’: 0, ‘Carbon Dioxide’: 1.4e+20, ‘Pyruvate’: 0, ‘Hydrogen Sulfide’: 0, ‘Water’: 1.12e+21, ‘Agents’: 0, ‘Fat’: 0, ‘Nitrogen’: 2.8e+20, ‘Phosphates’: 1.4e+20, ‘Sulfur’: 0, ‘Protein’: 0, ‘Nucleotide’: 0, ‘Ammonia’: 0, ‘Glucose’: 0}
Lithosphere = {‘Amino Acids’: 0, ‘DNA’: 0, ‘ATP’: 0, ‘Oxygen’: 0, ‘Carbon Dioxide’: 5000000000.0, ‘Pyruvate’: 0, ‘Hydrogen Sulfide’: 5000000000.0, ‘Water’: 0, ‘Agents’: 0, ‘Fat’: 0, ‘Nitrogen’: 0, ‘Phosphates’: 0, ‘Sulfur’: 0, ‘Protein’: 0, ‘Nucleotide’: 0, ‘Ammonia’: 0, ‘Glucose’: 0}
Spectrum on the surface = [redacted spectrum]
[Finished in 2.3s]