Generating Star Systems & Documenting Celestial Phenomena


Introduction

I love space games. The cosmos has always been a great mystery - what could possibly be out there, within and beyond the thin slice of the Milky Way and the Universe that we can observe? We seek to make predictions about space and our role within it via the medium of science fiction, and via video games as soon as they were invented. Games which depict space exploration channel our curiosity about the Universe into something tangible. 

Most space exploration games have a similar, repeating structure - enter a star system, find planets and interesting phenomena, move on to the next star system - and that’s completely fine! I enjoy listening to something while documenting celestial phenomena with simple puzzle mechanics - one of the space exploration experiences that I have sunk the most amount of time into is Elite Dangerous, with its 1:1 scale recreation of the Milky Way, 20 types of planets to discover, and likewise, 20 types of plants to discover on select barren moons, it manages to encourage your inner greed and/or passion for finding something new that’s never been seen before (or for finding something that’s valuable), keeping you engaged. Ironically, most space exploration games fall short of a wealth of interesting discoveries - 20 types of planets and plants to catalogue makes the game become monotonous very, very quickly. Space exploration games are usually repetitive (which can be enjoyable), however generally fall short of possible interesting discoveries.

My aim for Stellar Cartographer is to present a somewhat simple, puzzle-like experience, akin to most space exploration games, whilst presenting a variety of planets to discover, anomalies to analyse, and events to experience. I also aim for it to manufacture feelings of separation from humanity and adventure, which some space games achieve, giving a weight to your actions (at least for me).

Generating Star Systems

I began working on Stellar Cartographer after reading this blog post: https://blog.steveasleep.com/using-data-from-the-kepler-mission-to-scientifically-imagine-star-systems. The entire post is incredibly interesting in its own right, and I must admit to shamelessly stealing some of the maths and ideas written within it, however the part that stood out to me the most was near the end - it outlines the idea of placing planets at preset 'slots' at various distances from a star, skipping over slots occasionally during generation in order to create interesting star systems. All of my ideas on how to generate systems previously were far more convoluted -  for some reason, I had never thought of such a simple idea. The approach I took in Stellar Cartographer is this: each body (planets, stars) has an amount of iterations. For each iteration, a value is iterated upwards from the bodies Roche limit - each iteration has a one-in-four chance of placing a planet with its orbital distance being the current value. For each planet created, its iterations will be halved. E.g, a star might have 24 iterations, a planet orbiting the star might have 12, and a moon orbiting the planet might have 6 - this is so nothing collides, and to mitigate the possibility of there being, for example, a moon orbiting a moon orbiting a moon orbiting a moon orbiting a moon ...

Which type of planet is generated at a specific distance is subject to some maths pertaining to the habitable zone of stars - the resources that the blog post used were depreciated, so I used this: https://www.planetarybiology.com/calculating_habitable_zone.html. Whether the distance is below, within or above the habitable zone is, unsurprisingly, the main test for which category (hot, habitable, cold) the type of planet is chosen from. Additionally, the size of the planet is estimated from three distinct planetary size classifications - Terrestrial, Neptunian and Jovian (which the blog post goes into great detail about). For example, a chosen Terrestrial world below the habitable zone could be a Lava, Silicate or Cthlonian planet. Further, there are some restrictions to prevent a situation where, hypothetically, a gas giant (Jovian) is orbiting a tiny rock (Terrestrial).

  • FUN FACT: a 'Cthlonian' planet is a type of exoplanet which is theorised to be the remaining core of a gas giant following its atmosphere being stripped away.

How bodies orbit their host body is greatly inspired by the game Starsector:

  • The bodies orbital speed is estimated via some physics equations (which I did NOT enjoy learning). 
  • The bodies position is set to its hosts position. 
  • The body is moved upwards by its orbital distance.
  • The body is rotated relative to its host body by its orbital speed.

This results in a stable, somewhat convincing depiction of real orbital physics, which I am quite fond of.

There was way more that went into generating star systems in Stellar Cartographer, but for the sake of your time, here are some highlights:

  • I made it so there was a small chance that an asteroid belt would be generated rather than a planet. The size of an asteroid belt is randomised between the values of 0.5x the size of the asteroid belt in our solar system, up to 1.5x the size of the asteroid belt in our solar system - with the resulting size being scaled to the size of the body. Although the system is ... unorthodox, it seems to work decently.
  • Bodies are named by randomly picking from a list of mostly made-up, but some real, words. Additionally, a second word has a chance to be picked, which mostly consist of me translating the words 'major' and 'minor' to different languages. 

Results

One of the more reasonable (boring) results from the generator.
One of the stranger results from the generator. Shows how halving the amount of iterations isn't actually sufficient for preventing impossible orbits. The grey ring is an asteroid belt.


Gameplay

The core gameplay of Stellar Cartographer (currently) can be summarised into three dot points:

  • A variety of modules can be utilised to discover stellar phenomena, providing exploration data. Additionally, some modules can make additional observations on stellar phenomena, yielding further exploration data.
  • Each system has three wormholes which can be discovered. Wormholes can be traversed to travel to new star systems.
  • After a certain quantity of wormhole traversals, the player will arrive in a civilised star system where exploration data can be sold and upgrades can be bought.

Modules

Scopes

Provides a three dimensional view of the game world. Stellar phenomena must be viewed by scopes within a certain range in order to be discovered, and for exploration data to be gained. 

Orbiting a fire giant named Onha, as viewed from the scopes.

Sonar

Can send a ping to the game world, which highlights the location of phenomena within its arc.

(This particular gif is slowed down tremendously.)

Barycenter Visualizer

Displays which direction bodies of significant mass are from a selected body. Should be utilised to track down more elusive targets, but requires some work at the moment.

Displays the direction to the star (right) from the gas giant (left).

Audio Visualizer

Will be used to discern variations in different planet types. E.g, the sound generated from a gas giant with low volatile content will be different to a gas giant with high volatile content. 

The 'additional observations' tab for a Silicate type planet.

Guessing the correct variation will increase the bodies reward when turning in exploration data. This is the first of Stellar Cartographers 'simple puzzle mechanics'.

What Next?

Ironically, the game does not present a 'variety of planets to discover, anomalies to analyse, and events to experience' at the moment, despite my aim for the game being so. Of course, I am still working on the core gameplay loop, but I'd like to start on creating systems for anomalies and events early on. I will be working towards two primary objectives:

  1. Finishing the 'Audio Visualizer' module.
  2. Creating an events system - currently I am inclining towards Stellaris-esc random events. Maybe when you orbit a planet, an event will have a chance of occurring?

Thank you for taking the time to read this devlog. 


Leave a comment

Log in with itch.io to leave a comment.