What size galaxy would you like?

We would like to share with you more secrets about generating our randomly created galaxy.

Specifically how we determine which faction each planet belongs to.

Before we create the galaxy, we decide on several points on the map that belong to each faction. That way, every faction will have a sector in the galaxy under its control.

Then we generate the solar systems, and for each star we check which faction point is closest to it to determine which faction the solar system will belong to.

However, we encountered some problems when creating the location of the starsrandomly.

Some stars were created too close to one another.

To overcome this problem, before setting a new star’s location, we check if it is far enough away from the nearest solar system, if not, we randomly choose a new location and check again, till we find an empty space.

It’s solved our problem, but during development, we found out that the more solar systems we add to the galaxy the more cramped our galaxy will look.
Here are a few examples:

 A normal galaxy size with 200 solar systems:

A big  galaxy size with 500 solar systems:

A huge  galaxy size with 800 solar systems:

We tried to create a galaxy with 1000 solar systems, but then our galaxy generator was stuck.
It couldn’t find enough empty space for all our solar systems.

We plan to let you choose the size of the galaxy when you start a new game, just don’t tear the fabric of space with infinite stars…

Your friendly galaxy crafter