Skip to content

v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Oct 03:35
· 45 commits to master since this release
3505547

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() and GeneratorOptions.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, and Universe.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) and Epic (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) and DangerShift (-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 file presets.json.
  • ToJson(indented, children) on Universe, GalaxyCluster, CosmicVoid, Galaxy, StarSystem, Planet, Moon, Belt and Station: 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 by scripts/gen-json-export.py). Lists generated when first read stay null unless children: true. Examples in the new golden file export.json.
  • Planet.Eccentricity, Planet.Inclination and Planet.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 file orbital-elements.json; export.json filters them out and stays as written.
  • GeneratorOptions.Names: NameStyle.Catalogue (the default, real catalogue names) or NameStyle.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 code names=invented; in the new golden file names.json.
  • Units.Convert between LengthUnit (km, Earth, Jupiter and solar radii, au, light-years, parsecs), MassUnit, TemperatureUnit and TimeUnit, and Units.Map from 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() and Galaxy.Warnings: soft problems as GeneratorWarning values (WarningCode SystemsTrimmed, ArmsIgnored, ShapeTooSmall, NameNumbered, and a message), reported and never thrown. In the new golden file diagnostics.json; export.json filters the new warnings key.
  • GalaxyShape.Colliding (two discs, a tidal bridge and tails), GalaxyShape.Starburst (a dense core with knots) and GalaxyShape.Clustered (tight knots over a faint oval), with type codes Pec, Burst and Clumpy. Asked for by name only: Auto never draws them (Stop 2, S1), and they use only parameters already drawn, so no seed moves. In the new golden file shapes.json.
  • GeneratorOptions.Require: Guarantee flags (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 own constraints stream and passed down in that system's context, so Universe.At regenerates the same system; the default (none) draws nothing, so no seed moves. Unmet guarantees are WarningCode.GuaranteeUnmet warnings. Option code require=garden,blackhole; in the new golden file constraints.json.
  • GeneratorHooks (OnPlanet, OnSystem, OnGalaxy, OnCluster, OnUniverse): post-processors run wherever an object is made, in lazy lists too, passed to new Generate(seed, options, hooks) overloads on every level and to Universe.At(address, options, hooks), which runs them again on everything it regenerates. They live outside GeneratorOptions because 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).
  • Custom on Universe, GalaxyCluster, CosmicVoid, Galaxy, StarSystem, Planet, Moon, Belt and Station: a read-only dictionary of your own text fields, empty from the generator, written by ToJson with names in ordinal order; CustomFields.With(name, value) returns a copy with one field set. In the new golden file hooks.json; export.json filters the custom key and stays as written.
  • GeneratorTables, WeightTable and WeightEntry: the weight tables behind star classes (by region age, and for StarMix.Plausible), rocky planet kinds per orbit zone and giant planets' moons, editable by id (star-classes.mature, planet-kinds.temperate, ...). With changes the built-in tables, FromJson reads a set (a hand-written reader: no reflection, nothing parsed in a static constructor) and ToJson writes one; Register makes a set findable by its id, and GeneratorOptions.Tables names it (option code tables=my-mod, so links carry it). The built-in tables give exactly the output of no tables. In the new golden file tables.json.
  • Unity: a second assembly, UniverseGenerator.Unity (in the UPM package only, not in the NuGet package), with TablesAsset, a ScriptableObject holding a table set to edit in the Inspector. Compiled in Unity 6000.6.4f1.
  • Unity: UnityVectors in UniverseGenerator.Unity: ToVector2 and ToVector3 (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.