UniverseGenerator 1.0: one seed, the same galaxy everywhere
A galaxy generator pulled out of SpaceDeckBuilder2 and released for .NET and Unity
UniverseGenerator 1.0.0 is out on NuGet and OpenUPM. Give it a seed and it builds a universe, galaxy clusters, galaxies, star systems, planets and moons as plain C# records. The same seed gives the same output on Windows, Linux and macOS, on .NET 10 and .NET Framework 4.8, and in Unity under both Mono and IL2CPP.
using UniverseGeneration;
var galaxy = Galaxy.Generate("my-seed");
foreach (var system in galaxy.Systems)
Console.WriteLine($"{system.Name}: {system.Star.Class} star, {system.Planets.Count} planets, danger {system.Danger}");
HD 147927: K star, 6 planets, danger 9
HD 165595: M star, 1 planets, danger 6
HD 28101: K star, 6 planets, danger 6
...
Where it came from
My game SpaceDeckBuilder2 has a galaxy generator of about 1,400 lines. On October 2 I asked how many other projects generate game worlds like it, and whether it should be a library. The answer became an extraction plan, and the library shipped two days later.