Stargen.Net 1.0.0.1

dotnet add package Stargen.Net --version 1.0.0.1
                    
NuGet\Install-Package Stargen.Net -Version 1.0.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Stargen.Net" Version="1.0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Stargen.Net" Version="1.0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Stargen.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Stargen.Net --version 1.0.0.1
                    
#r "nuget: Stargen.Net, 1.0.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Stargen.Net@1.0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Stargen.Net&version=1.0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Stargen.Net&version=1.0.0.1
                    
Install as a Cake Tool

Stargen.Net

Stargen.Net is a rewrite of StarformNET but with significant stuff mostly copy/pasted or renamed. I tried to make the whole thing more modern by removing most of the artifacts from the C port (e.g. cross referenced static classes, fields instead of properties etc.). I also modernized the output classes to use UnitsNet for all values, as the values used in the original where the units Dole used for the accrete simulation.

How to use

The most basic use is this:

var system = SystemGenerator.GenerateSystem();

this will generate a random stellar system with a random seed.

To more finely control the generation parameters you can use

var system = SystemGenerator.GenerateSystem(new Generation.GenerationOptions() 
{
    DustDensityCoefficient = 0.0015,
    CloudEccentricity = 0.25,
    GasDustRatio = 50,
    Alpha = 5,
    N = 3,
    InnerDustLimit = 0,
    Seed = 1337
});

All properties have some more or less detailed instructions in what they do. If you want to go deeper, I referenced Dole's names for these values.

These values are the default values used (aside from the seed).

When generation 10.000 systems with this seed (1337) you get:

  • 2310 habitable planets (~23% of systems)
  • 204 earthlike planets (~2% of systems)
  • 29282 planets with moons

Why?

I'm creating a game where I was in need of a somewhat fast and somewhat realistic star system generator. I tried using the original accrete but parsable outputs were lacking and I could not use the HTML output. I stumbled upon StarformNET, but it's last update was 7 years ago and was also written for .NET Framework, so it lacked some of the more "modern" .NET stuff. Initially I only ported it to .NET Standard but soon realized that I had more ideas to improve it.

What it is and what it isn't

The original Accrete simulation is from 1970, so the sciency stuff is propably mostly out of date. So this library does NOT create completely realistic star systems. It does however create plausible systems - and that's what I needed and why I did this rewrite.

I make no guarantees that the whole accrete simulation is perfectly implemented but I tried to cross reference Stephen H. Doles Paper Formation of Planetary Systems by Aggregation: A Computer Simulation as much as possible, although the original StarformNET did this too. I updated some values and tried to comment most of the simulation parameters so you can understand what each of them does.

Credits

As previously stated, most of the actual simulation stuff was copied from StarformNET, I just made minor adjustments and fixes. As so I will also copy the credits of StarformNET:

Starform.NET's core is a direct port of Jim Burrows' StarGen. The original readme and credits from that version are included in this repository as StarGen-ReadMe.txt and StarGen-Credits.txt. The StarGen-Credits.txt file contains a more complete history of all of the authors who have contributed to Accrete/Starform/StarGen as well as a bibliography for the papers and books used to design it.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.1 186 11/5/2025
1.0.0 179 11/4/2025