Galaxy Generation: Difference between revisions
mNo edit summary |
Ayjayaredii (talk | contribs) m →Future Expansion: updated |
||
| (8 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{WIP}} | {{WIP}} | ||
The '''Galaxy Generation''' system in [[Starship Simulator]] is responsible for creating the vast, explorable | The '''Galaxy Generation''' system in [[Starship Simulator]] is responsible for creating the vast, explorable 1:1 scale representation of the [[Milky Way]] galaxy featured in the game. It uses a combination of procedural generation techniques driven by astrophysical principles and integrated real-world astronomical data. | ||
== Core Principles == | == Core Principles & Scale Management == | ||
The | The system employs several key strategies to manage the immense scale of the galaxy and provide a seamless experience: | ||
* ''' | |||
* '''Sector-Based Structure:''' The galaxy is divided into millions of cubic sectors, each 100 light-years on a side (100ly³). | |||
* '''Coordinate System:''' The | * '''Sub-Sectors:''' Each 100ly³ sector is further subdivided into 1 million cubic sub-sectors, each 1 light-year on a side (1ly³), which serve as locations for content like star systems. Star systems occupy a single sub-sector and cannot exceed 0.5ly in radius. | ||
* '''Unique Seeds:''' Each 100ly³ sector is generated using its own unique seed, allowing for isolated generation and preventing changes in one sector from affecting others. Different classes of sub-sectors also utilize distinct seed pools. An upgraded seed system providing 2<sup>256</sup> unique seeds was implemented in [[Dev Builds|Build 0.225.0.21]]. | |||
* '''Coordinate System:''' A 64-bit Cartesian coordinate system is used. The system was rebased during development to place the true galactic centre, [[Sagittarius A*]], at coordinates 0,0,0 ([[Dev Builds|Build 0.225.0.14]], 0.225.0.16). [[Sol]] is located at coordinates -26670, 0, 56. | |||
* '''Origin Re-basing:''' To maintain precision, the player's local coordinate origin is continuously re-based relative to the sub-sector they are in, ensuring the player's ship effectively never travels more than 0.5 light-years from its current local origin point. | |||
* '''Seamless Travel:''' This system enables travel across the galaxy, including [[Alcubierre Drive|warp drive]] jumps, without loading screens. | |||
== Data Sources == | == Data Sources == | ||
The galaxy | The galaxy simulation incorporates various data sources: | ||
* '''Real Star | * '''Procedural Generation:''' Algorithms based on astrophysics generate the majority of stars, planets, and phenomena, filling gaps where real-world data is unavailable. | ||
* '''Backer Contributions:''' Systems and | * '''Real Star Data:''' Information from real-world astronomical surveys (like the [[wikipedia:Gaia catalogues|Gaia catalogue]] mentioned in development) is integrated, including millions of stars within a significant radius (e.g., 2000ly mentioned in [[Dev Builds|Build 0.225.0.21]]) of [[Sol System|Sol]]. Specific nearby stars (like [[Sirius]], [[Alpha Centauri]], [[Barnards Star|Barnard's Star]], [[Wolf 359]]) and Sol system objects are included ([[Dev Builds|Build 0.225.0.16]], 0.225.0.67). Data is retrieved via SQL database integration during the generation process. | ||
* '''Modding Support:''' | * '''Backer Contributions:''' Systems and races designed by backers are integrated into the galaxy via database lookups ([[Dev Builds|Build 0.225.0.39]], 0.225.0.79). | ||
* '''Modding Support:''' A local SQLite file (`stars_modded.db`) allows players to add custom star systems locally ([[Dev Builds|Build 0.225.0.79]]). | |||
* '''Custom Content:''' The system allows for specific procedural sectors to be replaced with hand-crafted ones for bespoke content or missions. | |||
== Stellar | == Galaxy Structure & Stellar Distribution == | ||
The | The simulation models the known large-scale structure of the [[Milky Way]] (see [[The Galaxy In Detail]]): | ||
* ''' | * '''Components:''' Includes representations of the Galactic Core, Bulge, Disc, Stellar Halo, Globular Clusters, Open Clusters, and potentially stellar streams and emission nebulae. | ||
* ''' | * '''Density Map:''' A large-scale greyscale density map defines the overall shape and stellar density distribution, where each pixel represents a 100ly³ sector. | ||
* '''Stellar Density:''' Densities within sectors range from 0 up to 8,000 stars, based on the density map value. | |||
* '''Vertical Distribution:''' The distribution of stars above and below the galactic plane within a sector is calculated mathematically. | |||
== | == Generation Process == | ||
The galaxy and its systems are generated dynamically as the player explores: | |||
* ''' | |||
* '''Galaxy Generation (Triggered by Movement):''' When the ship moves significantly (trigger points exist at 100ly and 1ly intervals), the system calculates data for a 3x3x3 grid of sectors around the player. For each sector, it reads the density map, assigns seeds, generates FTL civilizations, retrieves stellar data from databases, determines the sector's political state and galactic region type, generates sub-sector locations (prioritizing larger features first), and creates a textual description. Data from these sectors is combined, filtered by distance (within 50ly for performance - [[Dev Builds|Build 0.225.0.54]]), sorted by distance to the ship, and broadcast (typically several thousand locations) for use by systems like [[Sensors]]. Generation speed optimizations were a focus in development ([[Dev Builds|Build 0.225.0.16]], 0.225.0.21). | |||
* ''' | * '''Star System Generation (Triggered by Arrival/Scan):''' When a player enters a system or scans it deeply, the detailed system generation process begins. This involves: | ||
** Computing stellar data ([[Star types|sub-class]], mass fractions, escape velocity, [[wikipedia:Roche_limit|Roche Limit]], [[Habitable Zone]], etc. - refined in builds like 0.225.0.30, 0.225.0.67). | |||
** Creating a proto-planetary disk (considering H/He/Metals, lifespan, Hill radius - implemented [[Dev Builds|Build 0.225.0.32]]). | |||
** Calculating stellar temperature regions (determining Habitable Zone, Frost Line (~150K), Dust Sublimation Line (~2000K) - [[Dev Builds|Build 0.225.0.66]], Lava Line (~1200K)). | |||
** Iteratively determining planet orbits (using a formulation related to the Titius-Bode Law). | |||
** For each potential planet: Core mass accretion -> Determining Rocky vs. Gas Giant (based on escape velocity vs. H2 thermal velocity - [[Dev Builds|Build 0.225.0.32]]) -> Calculating physical characteristics -> Determining atmospheric composition -> Assigning final planet type -> Generating life flag -> Deducting mass from the proto-disk. | |||
** Generating a Kuiper Belt equivalent once the main disk mass is depleted ([[Dev Builds|Build 0.225.0.67]]). | |||
== Planet Characteristics == | == Planet Characteristics == | ||
Generated planets have detailed properties: | Generated planets have detailed, calculated properties including: | ||
* | * Orbital Mechanics: Orbital distance, period, velocity ([[Dev Builds|Build 0.225.0.69]]). | ||
* | * Physical Properties: Mass, radius, volume, gravity, core/mantle/crust densities, Roche Limit, Hill Radius ([[Dev Builds|Build 0.225.0.30]], 0.225.0.69). | ||
* | * Atmosphere: Presence/absence determined by factors like gravity and temperature; composition calculated (e.g., chemicals for gas giants, "tenuous exospheres" for airless bodies - [[Dev Builds|Build 0.225.0.31]], 0.225.0.70). | ||
* | * Temperature: Equilibrium and surface temperatures calculated based on stellar output, Bond Albedo, greenhouse effects, etc. ([[Dev Builds|Build 0.225.0.69]]). | ||
* Surface Features: Basic surface maps generated for [[Sensors]]/[[Holoprojector]] ([[Dev Builds|Build 0.225.0.48]], 0.225.0.70), incorporating [[wikipedia:Nanite (Unreal Engine)|Nanite]] tessellation for visual detail ([[Dev Builds|Build 0.225.0.70]], 0.225.0.72). | |||
== Life and Civilization == | == Life and Civilization == | ||
The | The system generates alien life and civilizations: | ||
* '''Life Generation:''' A "Has Life?" flag is | * '''Life Generation:''' A "Has Life?" flag is determined during planet generation ([[Dev Builds|Build 0.225.0.30]]), likely influenced by factors like the [[Habitable Zone]]. Confirmation requires detailed Short Range scans ([[Life and Tech Signatures]], [[Dev Builds|Build 0.225.0.69]]). | ||
* ''' | * '''Civilizations:''' Alien civilizations are generated throughout the galaxy. | ||
** Their chance of appearing is tied to the sector type. | |||
** Their technology level (ranging 0-100) is determined by the age of their star system ([[Dev Builds|Build 0.225.0.63]]). | |||
** FTL-capable civilizations are generated "in isolation". Non-FTL civilizations occur naturally based on planetary conditions during system generation. | |||
** Random alien race names are generated (with blacklist filter - [[Dev Builds|Build 0.225.0.69]]). | |||
** Detection relies on [[Life and Tech Signatures|Tech Signatures]] (Level 1 Knowledge / Long Range Scan - [[Dev Builds|Build 0.225.0.63]]) and [[Life and Tech Signatures|Life Signatures]] (Level 3 Knowledge / Short Range Scan). | |||
== | == Implementation & Consistency == | ||
* '''Isolated Generation:''' Generating sectors independently prevents cascading changes if generation logic is updated. | |||
* ''' | * '''Hand-Crafted Content:''' The system allows developers to replace any procedurally generated sector with bespoke, hand-crafted content. | ||
* '''Multiplayer Handling:''' | * '''Code Stability:''' The developers aim to lock down the core galaxy-generation code as much as possible once finalized to ensure consistency. | ||
* '''In-Game Hardware:''' A physical | * '''Multiplayer Handling:''' Galaxy generation runs locally on client machines for improved performance in multiplayer ([[Dev Builds|Build 0.225.0.60]]). | ||
* '''In-Game Hardware Representation:''' A physical box representing the Galaxy Generation computer exists in the [[Data Centre]] on [[C Deck]] ([[Dev Builds|Build 0.225.0.60]]). | |||
== Interaction == | == Interaction == | ||
Players primarily interact with the generated galaxy via the [[Sensors]] suite, which reveals progressively more detail about systems and celestial bodies based on scan type | Players primarily interact with the generated galaxy via the [[Sensors]] suite, which reveals progressively more detail about systems and celestial bodies based on scan type and achieved knowledge levels. The [[Holoprojector]] provides visual representations like Orrery maps. Navigation data is used by the [[Helm]]. | ||
On the [https://www.youtube.com/watch?v=0n3DCsmZ99U dev stream '''Starship Simulator - Random F̶r̶i̶d̶a̶y̶ Saturday! (Planetary Landings)'''] on 2025-12-06 Dan started the background work for [[Planetary Landings]] with the planned feature of the players gain the ablility to take a shuttle from the ship and take it to a planets surface to explore. a basic Proff of conspect feature was created and relaese on the [[Dev_Build#Development_Build_HistoryV0.226_—_VR | Development Build 0.226.0.16]] where players can use a hidden teleport in the bridge to access the planet. This will not be avalible for the Public Patch until it is implimented fully and withing the patch cycle of the [[Roadmap]]. Further development for was made on [https://www.youtube.com/watch?v=1lMms_DZv2g 2025-12-12] where an improved planet genaration surface map code was created in engine to give better surface genaration. | |||
== Future Expansion == | |||
Planned additions and refinements to the galaxy simulation include: | |||
* Wormholes | |||
* Rogue Planets (added for Demo 4 update) | |||
* Moons and Multi-star systems | |||
* Visible Proto-planetary disks | |||
* Volumetric Planetary Rings | |||
* Volumetric Gas Giants | |||
* Planetary Nebulae (added for Demo 4 update) | |||
* Real World Nebulae & Sci-fi Nebulae | |||
* Comets | |||
* Oort Clouds | |||
* More Stellar Classes | |||
== Sources == | |||
* Fleetyard Studios Pitcon Presentation #2 (April 2025) - Slides available [https://docs.google.com/presentation/d/16hy0FAoNFTbwVr1x0sHxHSVxLT8KET_Dp8sOq7CvOBE/edit#slide=id.g34fb5b24b7f_0_163 Here]. - Fleetyard Studios Pitcon Presentation #2 Video Recording (Segment: 2:46:30 - 3:24:00) - [https://www.youtube.com/watch?v=9XEw_qSheag&t=9990s Link] | |||
* [[Dev Builds|Development Build Update History]] (Various entries referenced above) | |||
* [[Dev Stream History|Dev Streams]] | |||
[[Category:Gameplay Mechanics]] | |||
Latest revision as of 08:33, 8 February 2026
NOTICE: This page is a Work in Progress as much of the lore/Development for the game is yet to be established.
The Galaxy Generation system in Starship Simulator is responsible for creating the vast, explorable 1:1 scale representation of the Milky Way galaxy featured in the game. It uses a combination of procedural generation techniques driven by astrophysical principles and integrated real-world astronomical data.
Core Principles & Scale Management
The system employs several key strategies to manage the immense scale of the galaxy and provide a seamless experience:
- Sector-Based Structure: The galaxy is divided into millions of cubic sectors, each 100 light-years on a side (100ly³).
- Sub-Sectors: Each 100ly³ sector is further subdivided into 1 million cubic sub-sectors, each 1 light-year on a side (1ly³), which serve as locations for content like star systems. Star systems occupy a single sub-sector and cannot exceed 0.5ly in radius.
- Unique Seeds: Each 100ly³ sector is generated using its own unique seed, allowing for isolated generation and preventing changes in one sector from affecting others. Different classes of sub-sectors also utilize distinct seed pools. An upgraded seed system providing 2256 unique seeds was implemented in Build 0.225.0.21.
- Coordinate System: A 64-bit Cartesian coordinate system is used. The system was rebased during development to place the true galactic centre, Sagittarius A*, at coordinates 0,0,0 (Build 0.225.0.14, 0.225.0.16). Sol is located at coordinates -26670, 0, 56.
- Origin Re-basing: To maintain precision, the player's local coordinate origin is continuously re-based relative to the sub-sector they are in, ensuring the player's ship effectively never travels more than 0.5 light-years from its current local origin point.
- Seamless Travel: This system enables travel across the galaxy, including warp drive jumps, without loading screens.
Data Sources
The galaxy simulation incorporates various data sources:
- Procedural Generation: Algorithms based on astrophysics generate the majority of stars, planets, and phenomena, filling gaps where real-world data is unavailable.
- Real Star Data: Information from real-world astronomical surveys (like the Gaia catalogue mentioned in development) is integrated, including millions of stars within a significant radius (e.g., 2000ly mentioned in Build 0.225.0.21) of Sol. Specific nearby stars (like Sirius, Alpha Centauri, Barnard's Star, Wolf 359) and Sol system objects are included (Build 0.225.0.16, 0.225.0.67). Data is retrieved via SQL database integration during the generation process.
- Backer Contributions: Systems and races designed by backers are integrated into the galaxy via database lookups (Build 0.225.0.39, 0.225.0.79).
- Modding Support: A local SQLite file (`stars_modded.db`) allows players to add custom star systems locally (Build 0.225.0.79).
- Custom Content: The system allows for specific procedural sectors to be replaced with hand-crafted ones for bespoke content or missions.
Galaxy Structure & Stellar Distribution
The simulation models the known large-scale structure of the Milky Way (see The Galaxy In Detail):
- Components: Includes representations of the Galactic Core, Bulge, Disc, Stellar Halo, Globular Clusters, Open Clusters, and potentially stellar streams and emission nebulae.
- Density Map: A large-scale greyscale density map defines the overall shape and stellar density distribution, where each pixel represents a 100ly³ sector.
- Stellar Density: Densities within sectors range from 0 up to 8,000 stars, based on the density map value.
- Vertical Distribution: The distribution of stars above and below the galactic plane within a sector is calculated mathematically.
Generation Process
The galaxy and its systems are generated dynamically as the player explores:
- Galaxy Generation (Triggered by Movement): When the ship moves significantly (trigger points exist at 100ly and 1ly intervals), the system calculates data for a 3x3x3 grid of sectors around the player. For each sector, it reads the density map, assigns seeds, generates FTL civilizations, retrieves stellar data from databases, determines the sector's political state and galactic region type, generates sub-sector locations (prioritizing larger features first), and creates a textual description. Data from these sectors is combined, filtered by distance (within 50ly for performance - Build 0.225.0.54), sorted by distance to the ship, and broadcast (typically several thousand locations) for use by systems like Sensors. Generation speed optimizations were a focus in development (Build 0.225.0.16, 0.225.0.21).
- Star System Generation (Triggered by Arrival/Scan): When a player enters a system or scans it deeply, the detailed system generation process begins. This involves:
- Computing stellar data (sub-class, mass fractions, escape velocity, Roche Limit, Habitable Zone, etc. - refined in builds like 0.225.0.30, 0.225.0.67).
- Creating a proto-planetary disk (considering H/He/Metals, lifespan, Hill radius - implemented Build 0.225.0.32).
- Calculating stellar temperature regions (determining Habitable Zone, Frost Line (~150K), Dust Sublimation Line (~2000K) - Build 0.225.0.66, Lava Line (~1200K)).
- Iteratively determining planet orbits (using a formulation related to the Titius-Bode Law).
- For each potential planet: Core mass accretion -> Determining Rocky vs. Gas Giant (based on escape velocity vs. H2 thermal velocity - Build 0.225.0.32) -> Calculating physical characteristics -> Determining atmospheric composition -> Assigning final planet type -> Generating life flag -> Deducting mass from the proto-disk.
- Generating a Kuiper Belt equivalent once the main disk mass is depleted (Build 0.225.0.67).
Planet Characteristics
Generated planets have detailed, calculated properties including:
- Orbital Mechanics: Orbital distance, period, velocity (Build 0.225.0.69).
- Physical Properties: Mass, radius, volume, gravity, core/mantle/crust densities, Roche Limit, Hill Radius (Build 0.225.0.30, 0.225.0.69).
- Atmosphere: Presence/absence determined by factors like gravity and temperature; composition calculated (e.g., chemicals for gas giants, "tenuous exospheres" for airless bodies - Build 0.225.0.31, 0.225.0.70).
- Temperature: Equilibrium and surface temperatures calculated based on stellar output, Bond Albedo, greenhouse effects, etc. (Build 0.225.0.69).
- Surface Features: Basic surface maps generated for Sensors/Holoprojector (Build 0.225.0.48, 0.225.0.70), incorporating Nanite tessellation for visual detail (Build 0.225.0.70, 0.225.0.72).
Life and Civilization
The system generates alien life and civilizations:
- Life Generation: A "Has Life?" flag is determined during planet generation (Build 0.225.0.30), likely influenced by factors like the Habitable Zone. Confirmation requires detailed Short Range scans (Life and Tech Signatures, Build 0.225.0.69).
- Civilizations: Alien civilizations are generated throughout the galaxy.
- Their chance of appearing is tied to the sector type.
- Their technology level (ranging 0-100) is determined by the age of their star system (Build 0.225.0.63).
- FTL-capable civilizations are generated "in isolation". Non-FTL civilizations occur naturally based on planetary conditions during system generation.
- Random alien race names are generated (with blacklist filter - Build 0.225.0.69).
- Detection relies on Tech Signatures (Level 1 Knowledge / Long Range Scan - Build 0.225.0.63) and Life Signatures (Level 3 Knowledge / Short Range Scan).
Implementation & Consistency
- Isolated Generation: Generating sectors independently prevents cascading changes if generation logic is updated.
- Hand-Crafted Content: The system allows developers to replace any procedurally generated sector with bespoke, hand-crafted content.
- Code Stability: The developers aim to lock down the core galaxy-generation code as much as possible once finalized to ensure consistency.
- Multiplayer Handling: Galaxy generation runs locally on client machines for improved performance in multiplayer (Build 0.225.0.60).
- In-Game Hardware Representation: A physical box representing the Galaxy Generation computer exists in the Data Centre on C Deck (Build 0.225.0.60).
Interaction
Players primarily interact with the generated galaxy via the Sensors suite, which reveals progressively more detail about systems and celestial bodies based on scan type and achieved knowledge levels. The Holoprojector provides visual representations like Orrery maps. Navigation data is used by the Helm.
On the dev stream Starship Simulator - Random F̶r̶i̶d̶a̶y̶ Saturday! (Planetary Landings) on 2025-12-06 Dan started the background work for Planetary Landings with the planned feature of the players gain the ablility to take a shuttle from the ship and take it to a planets surface to explore. a basic Proff of conspect feature was created and relaese on the Development Build 0.226.0.16 where players can use a hidden teleport in the bridge to access the planet. This will not be avalible for the Public Patch until it is implimented fully and withing the patch cycle of the Roadmap. Further development for was made on 2025-12-12 where an improved planet genaration surface map code was created in engine to give better surface genaration.
Future Expansion
Planned additions and refinements to the galaxy simulation include:
- Wormholes
- Rogue Planets (added for Demo 4 update)
- Moons and Multi-star systems
- Visible Proto-planetary disks
- Volumetric Planetary Rings
- Volumetric Gas Giants
- Planetary Nebulae (added for Demo 4 update)
- Real World Nebulae & Sci-fi Nebulae
- Comets
- Oort Clouds
- More Stellar Classes
Sources
- Fleetyard Studios Pitcon Presentation #2 (April 2025) - Slides available Here. - Fleetyard Studios Pitcon Presentation #2 Video Recording (Segment: 2:46:30 - 3:24:00) - Link
- Development Build Update History (Various entries referenced above)
- Dev Streams