Hello again everyone. I've got some questions hopefully someone can answer about planetary orbital periods, distances and the like in a fictitious solar system. As I explained in my previous post I'm currently developing a Space-based game where I programmatically generate a galaxy, stars, solar systems, etc. Right now I'm randomizing some basic values based on known ranges. This works, but things are disjointed and do not follow certain rules. For example, Kepler's Third Law for a solar system will generate different values for each planet when they should be similar. Thus this post. I tend to be verbose but I'll try to be as concise as possible. What I'd like to know is from where should I start so everything fits together. Here are the steps I use to make a solar system right now. 1 - Solar System's mass should be ~.15% more than its central star. 2 - Leftover mass is used to generate planets. --- -- Repeat the following until we run out of mass (or mass is smaller than X). -- --- 3 - Randomize type of planet from one of these: Minor, Rocky, Ice or Gas Giant. 4 - Get a mass for planet based on Min/Max of each type (as gathered from exoplanet library and other). 5 - Randomize a Rotation Period from 1 hour up to 60 days. 6 - Randomize a Radius between Min/Max for given planetary type. 7 - Finally, derive Volume, Density, Gravity, Escape Velocity, etc and last the planet's moons if any, from the generated values above. Now, this works fine and end up with a variety of planets in a given solar system. The problem here is the whole. From what I've read and understood from Kepler's Third Law (and scaling), orbit distances (among other things) should be scaled (I guess in my case it would be based on the first generated planet since proportionality have to be similar for all planets in the same solar system. Right?) Kepler's Third Law's equation, 4pi^2/MG, I don't know what to do with it. How can I use it? In what context should I use it? To calculate the next planet's orbital rotation, period, other values? I'm at a complete loss here. The next problem is with the .15 percent mass of a central body, which is a lot, if the algorithm gives a lot of minor and rocky planets, I end up with sometimes more than 20 planets. I don't personally have a problem with that, but when you look at the last planet's semi-major axis in AU, they are so far out it's unlikely they would still be orbiting the star. Right now, orbit radius (circular for simplicity's sake) for a planet is derived from the previous planet's orbit radius * 1.7. This value, 1.7, was taken from wikipedia for our solar system. So the question is: Is there a formula to get the extent of a star's gravitational pull which, once passed, would simply make it impossible for a planet to remain? I guess I'm wondering if something like Hill's Sphere exist for stars. --- I imagine some people would scoff at those questions (I hope not), but I do want to make things as life-like as possible. I have to make concessions since the game is not a galaxy simulator, but if I can harmonize the basic ingredients to make my game as close as possible to real life I will try to do so. Thank you for your time.