Repository navigation
The first stable release. Everything in 1.0.0-beta.1, plus the features below; no seed that 1.0.0-beta.1 generated changes, and every golden file of 1.0.0-beta.1 is unchanged. From here the seed promise holds for the whole 1.x line.
Added
GeneratorOptions.ToCode()andGeneratorOptions.FromCode(code): the settings that differ from the defaults as short text (systems=120&shape=barred), and links:Universe.Link(address, options)writes the address,?and the code, andUniverse.At(link)regenerates the object with those options, so a shared address carries its options.- Presets
Pocket(20 systems, at most 6 planets),Roguelike(30 systems, few extra lanes, danger +2, more outliers),Cozy(40 well-connected systems, danger -3, few outliers) andEpic(300 systems), and the options they use:Arms(2 to 4 arms for spirals and bars; null draws),ExtraLanes(0 to 100, the chance of a lane beyond the connected network; default 25) andDangerShift(-5 to 5, added to every system's danger). Each changes values after every draw, so the defaults give the same output as before; their galaxies are in the new golden filepresets.json. ToJson(indented, children)onUniverse,GalaxyCluster,CosmicVoid,Galaxy,StarSystem,Planet,Moon,BeltandStation: every field as JSON with"schema": "universe-generator/1"and the type first, the same text on every runtime, no reflection (the writer is generated from the records byscripts/gen-json-export.py). Lists generated when first read stay null unlesschildren: true. Examples in the new golden fileexport.json.Planet.Eccentricity,Planet.InclinationandPlanet.PeriapsisAngle, drawn on a new stream of each planet's seed (so nothing else moves): Rayleigh draws as Kepler's multi-planet systems show (about 0.05 and 1.5 degrees), larger for a planet alone, damped for hot planets, and capped so no orbit crosses a neighbour's. In the new golden fileorbital-elements.json;export.jsonfilters them out and stays as written.GeneratorOptions.Names:NameStyle.Catalogue(the default, real catalogue names) orNameStyle.Invented(two- or three-syllable names such as Olmex, Zertron or Bethor, at most ten letters, unique in a galaxy). Drawn from each system's own names stream, so only names change; planets and moons take the system's name. Option codenames=invented; in the new golden filenames.json.Units.ConvertbetweenLengthUnit(km, Earth, Jupiter and solar radii, au, light-years, parsecs),MassUnit,TemperatureUnitandTimeUnit, andUnits.Mapfrom galaxy, cluster or universe map units to any length. Conversions on plain doubles (IAU nominal values, no units library); the generated values keep the units their documentation names.GeneratorOptions.Check()andGalaxy.Warnings: soft problems asGeneratorWarningvalues (WarningCodeSystemsTrimmed,ArmsIgnored,ShapeTooSmall,NameNumbered, and a message), reported and never thrown. In the new golden filediagnostics.json;export.jsonfilters the newwarningskey.GalaxyShape.Colliding(two discs, a tidal bridge and tails),GalaxyShape.Starburst(a dense core with knots) andGalaxyShape.Clustered(tight knots over a faint oval), with type codes Pec, Burst and Clumpy. Asked for by name only:Autonever draws them (Stop 2, S1), and they use only parameters already drawn, so no seed moves. In the new golden fileshapes.json.GeneratorOptions.Require:Guaranteeflags (GardenWorld,OceanWorld,PrecursorSite,BlueStar,Giant,WhiteDwarf,NeutronStar,BlackHole,SunLikeStar) that every galaxy must hold at least one of. A galaxy that lacks one gets it in a single system picked on the galaxy's ownconstraintsstream and passed down in that system's context, soUniverse.Atregenerates the same system; the default (none) draws nothing, so no seed moves. Unmet guarantees areWarningCode.GuaranteeUnmetwarnings. Option coderequire=garden,blackhole; in the new golden fileconstraints.json.GeneratorHooks(OnPlanet,OnSystem,OnGalaxy,OnCluster,OnUniverse): post-processors run wherever an object is made, in lazy lists too, passed to newGenerate(seed, options, hooks)overloads on every level and toUniverse.At(address, options, hooks), which runs them again on everything it regenerates. They live outsideGeneratorOptionsbecause options are a value with a text code and a delegate has neither. Hooks never change what the generator draws (guarantees are judged before them).CustomonUniverse,GalaxyCluster,CosmicVoid,Galaxy,StarSystem,Planet,Moon,BeltandStation: a read-only dictionary of your own text fields, empty from the generator, written byToJsonwith names in ordinal order;CustomFields.With(name, value)returns a copy with one field set. In the new golden filehooks.json;export.jsonfilters thecustomkey and stays as written.GeneratorTables,WeightTableandWeightEntry: the weight tables behind star classes (by region age, and forStarMix.Plausible), rocky planet kinds per orbit zone and giant planets' moons, editable by id (star-classes.mature,planet-kinds.temperate, ...).Withchanges the built-in tables,FromJsonreads a set (a hand-written reader: no reflection, nothing parsed in a static constructor) andToJsonwrites one;Registermakes a set findable by its id, andGeneratorOptions.Tablesnames it (option codetables=my-mod, so links carry it). The built-in tables give exactly the output of no tables. In the new golden filetables.json.- Unity: a second assembly,
UniverseGenerator.Unity(in the UPM package only, not in the NuGet package), withTablesAsset, a ScriptableObject holding a table set to edit in the Inspector. Compiled in Unity 6000.6.4f1. - Unity:
UnityVectorsinUniverseGenerator.Unity:ToVector2andToVector3(XZ or XY plane, with a scale) for map entries, cluster entries, universe nodes, voids and hazard areas;Lane.Ends(galaxy);Planet.OrbitPosition(days)by Kepler's equation from the orbital elements. Floats for drawing only. Compiled and run in Unity 6000.6.4f1, where a galaxy's export matched .NET 10's.
Size
Measured by the size gate (scripts/size-gate.py) in ci run 37171661790 on master (4260ff5), every metric green: nupkg 441.0 KB (green under 1 MB), largest DLL 563.0 KB (green under 750 KB), Unity package 606.7 KB unpacked (green under 2 MB) and 143.2 KB compressed, 46 Runtime source files and 13,423 lines.