I’m a hobbyist programmer with a profound love for procedural content generation. I’m working on a 2D space exploration game and while it’s not meant to simulate anything real, I’d like to give it a natural feel. I have no real knowledge in astronomy, so I figured someone here should have an answer.

I was wondering if there are a few simple mathematical models I could use to determine some parameters for my generation algorithm.

  • the orbital radius of the planets
  • the size of the planets (is it more likely that gas giants and the likes will show up closer to the sun or further away, etc.)
  • the number of planets orbiting a star

Also, a few questions come to my mind too:

  • is it a common occurence to have a star with nothing orbiting it? Like just a single lone star sitting there in the middle of space.
  • IIRC, Earth is kind of a weird thing (besides the fact that it hosts life) because our moon is way bigger than the average moons and also the only satellite of the planet. Is there any usual correllation between the planet size/density and the size or number of moons around it?
  • Is an asteroid belt something common in solar systems?

Thanks a lot for your help!

  • $\begingroup$ I think you could somehow model the distribution of the known exoplanets, calculate the effect that we have different probability to find them (bigger ones close to their start have the highest P), and then use a Bayes... $\endgroup$
    – peterh
    Jun 22, 2018 at 18:54
  • 2
    $\begingroup$ These are all areas of active research, and the problem is we tend to see what our technology can detect, rather than how the planets actually are. For example, many of the gas giants we see are much closer to the star than in our solar system, but it's not clear how common that is. At this point, you could do almost anything, and no one could say you are wrong. But this is a nice figure about what has been seen: en.wikipedia.org/wiki/Exoplanet#/media/… $\endgroup$
    – Ken G
    Jun 23, 2018 at 3:11
  • $\begingroup$ I think you need to decide on and tell us the storyline or theme to get some assistance. For example: Idea #1: Each system has 10 planets, you start at the outer one moving towards the star, each planet has a mission, once you complete all the planets you shoot the star and go to the next level (possibly with more planets and after a few levels multiple stars) - so the size range is what looks good on the screen. -- Idea #2: Discover which planets are inhabitable and land to get supplies, avoiding the inhabitants. -- Idea #3: Shoot out in space, no landing. - etc. That affects our suggestions. $\endgroup$
    – Rob
    Jun 23, 2018 at 8:05
  • 2
    $\begingroup$ I'm voting to close this question as off-topic because this is more appropriate to Worldbuilding SE. $\endgroup$ Jun 23, 2018 at 9:21
  • $\begingroup$ @Rob really those aspects are not in the scope of my question. My game project is everything but linear. Everything will be procedurally generated besides key elements. The gameplay mechanics are not in question here. I’m just looking for a more realistic set of rules for my algorithm. $\endgroup$ Jun 29, 2018 at 1:28

1 Answer 1


I "grew up" with the old roleplaying game 2300AD's system creation rules, which were based on fairly hard science (and used the Gliese star catalog as a map!) They have stood the test of time fairly well (here is an astronomer friend's take on it).

Here is a rough sketch of how I typically make my system generators, which is based on the same logic:

  1. Generate a number $N$ of planets in the system. At present there is no clear data constraining this, although we may imagine high metallicity stars could have more planets (but maybe not).
  2. Generate orbits $a_i$: start with a random innermost orbit $a_1$, and then make $a_{n+1}=(1+r_n)a_n$ where $r_n \sim U(K_1,K_2)$ is a random number. This imitates the Titus-Bode law pattern and looks roughly like observed systems. I tend to use $K_1=0.1, K_2=2$ but this is guesswork. Note that this process has problems handling hot Jupiters really close - you may want to add them by hand. It also ignore resonances etc.
  3. Generate a planetary seed size/mass. This can be done in an elaborate way by looking at exoplanet $(a,M)$ distributions and extrapolating to unobserved corners, or using some suitable skew random number distribution.
  4. From the mass and distance to the star, estimate planetary and atmospheric composition. Basically, outside the snowline ($\approx 1.4\sqrt{L/L_\odot}$ where $L$ is star luminosity) planets will start accumulating volatiles, and having ice crusts become possible. Essentially, decide on a core density randomly.
  5. Calculate the approximate minimum molecular weight retained based on the surface gravity. This will determine the atmospheric density. Especially, if the planet retains hydrogen it will become a gas giant: multiply up the mass a lot (the overall radius of a planet scales as $M^{1/3}$ for solid planets up to a few earth masses, and up to Jupiter size for gas giants - then degeneracy pressure will make the size level off and they become denser instead). Note that this is going to be the most fudgy step, since actually estimating a consistent atmosphere (especially exosphere) temperature, composition and pressure is really involved (and nontrivial even in reality).
  6. Given the size, temperature zone and atmosphere classify it suitably ("ice ball", "gas giant", "venusian hothouse", "super-earth", ...).
  7. Add random moons, rotation periods, eccentricities and whatnot, calculating their effects (like tide sizes, estimated magnetic fields, temperature variations, number of Hadley cells...) - lots of handwaving here, even when you base it on real astronomy and atmospheric physics papers.

This is the simple version. It does not try to actually simulate planet formation, where important processes like migrating gas giants can really affect systems.

You extra questions:

Right now it looks like planets are very common, so a system with no planets is likely pretty unusual.

Big moons might be uncommon, or they might be ordinary. In the solar system Pluto/Charon is also a pretty even pair. I personally think double-planets may be more common than people expect. We'll see.

Asteroid belts are likely pretty common. In a way we have two, the main belt and Kuiper belt. I would expect most systems to at least have a bit of debris that has not cohered in the outer regions.

  • $\begingroup$ Didn’t get to leave you a note yet, so here we are! Thanks a lot for the pointers! You are actually giving me more ideas on how to model the whole universe too. So I understand that looking at stuff so far away is still a WIP for the human race and that most science behind all this is getting challenged by new discoveries all the time, but I’m quite sure that I’ll be able to work something out with what you told me. Anyway, it’s a 2D game so you can only go so far with being realistic ;) $\endgroup$ Jun 29, 2018 at 1:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .