Now With 50% More Tasty Astrophysics!

I’ve been on a bit of a mission this past week or so, firstly to learn more in-depth astrophysics so I can make an even more accurate galaxy, and secondly to future proof the galaxy generation code so that adding new locations won’t mess up the old ones.

When you have a massive procedurally generated world driven by random streams, one of the dangers you face is changing the entire face of that world when a single variable is adjusted. Random streams increment by 1 whenever you reference them, so adding or removing a single step in the process means every other reference to that stream is suddenly 1 digit off, and therefore the random outcome is changed. This has happened before in other games, and you can imagine the angst from the community when hundreds of hours spent mapping an area is suddenly rendered meaningless overnight, or that cool thing you found doesn’t exist anymore.

To help safeguard our galaxy from such an occurrence I’ve been changing the way its sectors are generated. Instead of generating all the stars at once, I’m now generating each class of star independently. Not only does that give us more control over each type of star, but it also means we can add additional types of star (or other locations) to the end of the list without affecting anything that came before it in the chain. In short, we can add interesting new things without breaking the old things.

Speaking of having greater control over each class of star, I really wanted to make sure our galaxy was as close to real-world astrophysics as possible. Being a mere armchair astrophysicist myself, I went on a journey of learning and discovery that is actually still ongoing this week. I’ve had to read more scientific papers than is good for a person, but the net result is something that looks like this:

 

 

That’s how our galaxy is now organised, with each 100ly sector falling into one of those regions. A sector’s region determines the number and type of stars it contains, and some have the chance to be a special sector for things like Open or Globular Clusters.

That’s probably all a bit meaningless to someone who isn’t familiar with such things, so here are the basics in a nutshell:

Galactic Core
This is a single 100ly sector right in the middle of the galaxy, and it will hold Sag A* (our supermassive black hole) and the stars surrounding it. This will be a special and dangerous place eventually.

Bulge Area
The central bulge surrounds the core, and it’s populated with mainly low-metal Population II stars over 10 billion years old. This is actually why the centre of spiral galaxies are yellow/orange in colour, it’s because of the type of stars generally found there. Low-metal stars have very few to no rocky worlds, due to the lack of heavier elements present.

Thin Disc – Arms and Inter-Arms                                                                                                                  The thin disc is where all the Population I stars are found, being high-metal stars younger than 8-10 billion years. This is the only place you’ll generally find O and B class stars, with O Class being limited almost exclusively to Open Clusters (star-forming dust clouds) as they are <100 million years old.

The inter-arm areas generally won’t have any O/B class stars or Open Clusters, consisting mainly of older stars.

The thin disc sectors are where the bulk of high-metal stars and planets can be found, with this region being responsible for some 85% of the entire galaxy’s mass. The edge of the thin disc extends to some 50,000ly from the galactic core, and the density per sector is driven by our galactic density map.

Thick Disc
The thick disc contains mainly low-metal Population II stars, somewhat older and even less metal-rich than the bulge region. Again, you won’t find many interesting worlds in this area. They will predominantly be gas giants or icy worlds.

Galactic Halo
Getting less and less dense the further out you go, the Halo is a mix of very old Population II stars and dense globular clusters. The Halo is actually twice as wide as shown in the diagram, extending some 100,000ly away from the core in every direction.

Globular Clusters
These are dense regions of Population II stars, which can be found scattered throughout the Halo and in some of the Thick Disc.

Intergalactic Space
As you pass beyond 100,000ly away from the galactic core stars will cease to be generated, and you will truly be in Intergalactic Space. There’s no hard edge and you can keep flying, but there’s nothing out there except running out of fuel and resources.

In total, this means the actual area where stars are generated is 8,000,000,000,000,000 cubic lightyears. That’s 8 Quadrillion, and you can fly the ship without any loading screens to every square cm of every one of those 8 quadrillion locations. Phew! mission accomplished!

The next task is now to fill those locations with interesting content, which is a whole new challengelaughing