#generation #star #system #generator #generate #sectors #planet

planet_generator

[WIP] Generates data for galaxies, sectors, solar systems, planets and their inhabitants (Check README for features list)

1 unstable release

0.0.5-pre-alpha Jan 14, 2024
0.0.4-pre-alpha Apr 9, 2023
0.0.3-pre-alpha Dec 4, 2022
0.0.2-pre-alpha Nov 20, 2022
0.0.1-pre-alpha Nov 5, 2022

#141 in Science

MIT license

2MB
106K SLoC

Planet Generator

A Rust library that aims to generate galaxies, sectors, solar systems, planets with maps, and their inhabitants, along with tons of narrative elements and ideas.

The library is intended for use in game development to generate believable worlds for Roguelikes, 4X games, or any other project that sparks your imagination.

I've tried my best to use realistic formulas and up-to-date data when possible for generation. However, as I am not an astrophysicist myself, and my limited knowledge on the subject isn't sufficient to build something entirely accurate, I've compensated for my shortfalls by borrowing ideas from various other generators I have previously used and loved, mostly from RPGs. These include, but are not limited to: the RTT Complicated Star System Generator, Instant Universe, and generators from various editions of GURPS Traveller, Stars Without Number, Rogue Trader and Alternity.

Example

An example of how to use this library can be found in this project, a simple Actix server that serves generated results. A web app that displays the generation results using the previous project is available here - please note that it is also a work in progress, and not all library features are available in the web app yet.

Roadmap

This is the current roadmap of the library:

  • Universe generation
    • Age
    • Era
  • Galaxy generation
    • Neighborhood
    • Age
    • Shape
    • Peculiarities
    • Names
    • Our local group galaxies
  • Sector and subsector generation
    • Configurable divisions
    • Hex and division calculations
    • Temporary region mapping
    • Proper region mapping
    • Names
  • Star system generation
    • Spawn chance according to density
    • Stars generation
      • Age
      • Spectral type
      • Luminosity
      • Subdwarfs
      • Star differences according to population
      • Name generation
      • Configurable stars
      • Peculiarities
      • Multiple star system orbit eccentricity and inclination
    • Peculiarities
    • Orbital zones
    • Filling orbits
    • Orbit eccentricity and inclination
  • Planet generation
    • Orbit parameters
    • Moons
    • World parameters and climate
    • Resources
      • Accessibility
      • Rarity
      • Quantity
    • Life presence
    • Points of interest
    • Map generation
    • Exotic planets
  • Species generation
    • Add species using the given settings
    • Spawn species using conditions found in specific systems
    • Writing the species' history
    • Filling the various systems with appropriate life
  • Populated sectors/systems/planets
    • Add methods to generate populated objects "directly"

Contribute

I'd be happy to receive issues requesting new features or reporting bug fixes. Feel free to point out areas where the code could be improved, whether in terms of performance, readability, documentation, or adherence to best practices, and/or submit pull requests yourselves.

License:

Licensed under MIT license.

Dependencies

~1–11MB
~88K SLoC