Creating Realistic Stars and Planets

Stars and Planets Detailed

Hello, intrepid followers! Welcome to another episode of our behind-the-scenes look at the latest developments in our game. Today, we’ve focused on adding depth to the cosmos by better representing the diversity of stars and planets you’ll encounter. Let’s dive in!

Star Bright

We’ve been hard at work refining the creation process for stars, the shining hearts of every solar system in our game. With the enums we set up for StarType, StarSize and SpectralClass, we now have a much wider variety of celestial bodies dotting the night sky. We’ve also successfully established a relationship between a star’s SpectralClass and its surface temperature, thereby allowing a generated star to portray more realistic characteristics.

Another significant feature we implemented this week was color differentiation for stars based on their SpectralClass. This change will enhance the game’s visual aesthetics, while also offering players a more intuitive way to identify the star type just by its color.

One of the highlights was writing a function that randomly generates new stars, complete with unique alphanumeric names. It’s quite a sight seeing these new stars spring into existence, each with its unique characteristics.

Planetary Sizes and Habitable Zones

Next, we turned our attention to planets. We’ve taken into consideration the actual proportions of various planet types, including Terrestrial, Gas Giant, Ice Giant, and Dwarf Planet. We’ve set up a dictionary with different Unity scale ranges per planet type, ensuring the planets are accurately represented in comparison to their parent star.

Additionally, we developed a relationship between the spectral class of a star and the habitable zone’s distance, introducing another layer of realism to our game. Each star type now has a set habitable zone where life-sustaining planets are more likely to be found.

Debugging the Cosmos

No day in Eternity’s development goes without its fair share of bugs and errors. This week, we tackled a few tricky ones regarding the orbital representation of our planets. After a bit of back and forth, we managed to ensure the planets’ orbits are correctly visualized, and that they align perfectly with the actual paths of the planets.

What’s Next?

We’ve made significant strides in procedural solar system visuals, but our journey through the stars is far from over. Next, we plan on working on more celestial body types, including asteroid belts, comets, and more.

Stay tuned for more stellar updates from our development journey! As always, thanks for joining us on this incredible journey! 

Until next time, keep reaching for the stars!