Stupid planets aims to recreate a sandbox-like environment of procedural star systems and exoplanets. The aim of Stupid Planets is to provide an educational experience on the basic elements needed for life and colonization on exoplanets through scientific modelling, physically based orbital movement and loose modelling of chemical compositions and interactions.
The focal point of the game play mechanic revolves around the mad and intricate balance of several different factors including the chemical composition of planets, temperature, its orbital radius, and its mass. Players have the ability to colonize planets and get real time feedback on why their colonization efforts failed/succeed or they can wait for life to randomly develop on planets. However, players need to be aware that changing one variable could lead to an unforeseen reaction of circumstance that may ruin the planet entirely.
We calculated the temperatures of the planets via multiple factors involving the sun's mass, the planets' distances to the sun, as well as their chemical makeup and terrain. By altering these elements, the player is able to create a potentially habitable planet. The calculations were taken from a number of online sources, and changed to suit our purposes. Some values that are essential to our calculations such as the albedo values of these simulated planets cannot be calculated so we approximated it based on known planets and their characteristics.
We implemented another method for temperature. We analyzed the thermal conditions at a planet's surface. The power on the surface per area is related to a multitude of factors, including the temperature and the radius of the star, the distance between the star and the planet, and the percentage of energy actually arrived at the planet (which is related to the chemical composition of the atmosphere). The power emitted by the planet per area is related to the surface temperature and the absorption of the atmosphere. We looked up some graphs of absorption curves (https://www.sciencedirect.com/science/article/pii/S2405844018327415) and estimated the absorption percentage at different frequencies for some common atmospheric chemicals.Then we combined them with the black-body radiation curve to obtain the planet's surface temperature at which the power by the surface per area equals the power on the surface per area.
The large part of Stupid Planets is its ability to generate completely procedural planets based on a variety of properties. Taking inspiration from real categories of exoplanets, several types of planets may appear in any given solar system. Earth-like planets appear in the habitable zone with usually habitable conditions while snowy and rocky worlds exist on the outer bounds of the system. Each terrain is generated through a layered Perlin noise based on the chemical composition, orbital radius, properties of the sun, etc.
Features/Technical aspects
- Orbit System: the velocity of the planet is calculated with v = SQRT(G * Mcentral / R); the orbiting motion is done with Unity’s Transform.RotateAround() method with the calculated v as the speed parameter.
- Sun Properties: Mass, Radius, Luminosity. All can be changed by user in-game.
- Planet Properties: Mass, Radius, Orbit Radius, Carbon Dioxide Level (1 - 3), Oxygen Level (1 - 3), Water Level (1 - 3). All can be changed by user in-game.
- Planet Generation: a random number of planets is generated, each created at a random radius (a custom random number generation function is written to make sure planets don’t spawn on top of each other). The GameMaster class also stores an array of planets objects with different textures and randomly selects textures for the planets.
- Camera System: two modes, solar and planet. In solar, the player can drag the mouse to move the camera horizontally and scroll to zoom in and out to view the entire solar system. When the player right clicks on a planet, the camera shifts to planet view and focuses on the selected planet. The player can move the camera to view the surface of the planet and zoom in and out. The UI changes as the camera mode changes.
- Temperature Calculation: using the formula T4 = L⊙ (1 - a) / 16πd2ơ where L⊙ = luminosity of sun, a = albedo of planet, d = distance from sun, and ơ = Stefan-Bozman Constant, each planet’s temperature is calculated and displayed. Albedo is decided based on the chemical properties of the planet by taking a weighted average of known approximations of the albedo values of Carbon Dioxide, Oxygen, and Water multiplied by the concentration in the planet’s properties.
- UI: The title screen gives the option to start the game or read a manual on the game. In solar view, the player can modify the sun’s mass, radius, and luminosity. In planet view, the player can modify the selected planet’s mass, radius, orbit radius, CO2 level, O2 level, and H2O level. The player can quit back to the title screen at any point.
- Winning: once the player successfully secures a planet’s temperature between 5 and 35 Celcius, has Oxygen and Water on the planet, and have a Carbon Dioxide concentration less than the highest level, then the planet is considered plausible for life. A spider will spawn crawling on the planet, indicating winning on that planet.
- Applying textures: take computer-generated textures, make materials with them, and apply them to planets.
- Music Composition: using BeepBox to create simple tunes for both the title screen and the game.
Source code & compiled binaries.
https://github.com/ianthespaceperson/StupidPlanets
Resources used.
https://exoplanets.nasa.gov/
https://exoplanetarchive.ipac.caltech.edu/
https://experilous.com/1/blog/post/procedural-planet-generation
https://www.nasa.gov/feature/jpl/20-intriguing-exoplanets/
http://web.mit.edu/cesium/Public/terrain.pdf
https://medium.com/@miguelceledon/exploring-the-game-development-world-procedural-terrain-generation-theory-849d6e54f3a1
http://www.messagetoeagle.com/color-sky-exoplanet/
https://phys.org/news/2013-07-true-colour-exoplanet.html
https://www.nationalgeographic.com/news/2013/7/130711-hd189733b-exoplanet-hot-jupiter-blue-color-space-astronomy-hubble-telescope/
https://space-facts.com/exoplanets/
https://www.universetoday.com/33506/gas-giants/
https://www.space.com/35069-what-is-an-earthlike-planet.html
