UniverseGenerator in TypeScript: the same galaxy in a browser
A port of the C# galaxy generator to npm and JSR, and a month of plugins since the last post
UniverseGenerator came out for .NET and Unity in October. Version 1.0.0 of the TypeScript port is now on npm as universe-generator and on JSR as @m4bwav/universe-generator. A seed gives the same galaxy in a browser as it does in C#, down to the names.
The map below is made by the npm package in your browser while the page loads. Type a seed, pick a preset and click a star.
import {generateGalaxy} from 'universe-generator';
const galaxy = generateGalaxy('my-seed');
console.log(galaxy.shape, galaxy.regions[0].name); // Ring Musca Drift
Same seed, same galaxy
The C# library promised that a seed produces the same output on every platform. The port had to keep that promise across languages, so the C# repository's golden files are the test suite. Each one records what a seed made in C#, and the TypeScript output has to match it exactly. No golden was edited to make a test pass.
That meant porting the random number generator and the integer maths first, then the generator level by level. The C# side made this easier than it sounds, because it already kept its decisions in integers to survive Unity's float behaviour. Addresses work the same too: generateAt('v1-my-seed/galaxy/system/31/planet/1') rebuilds one planet without the rest of the galaxy.
Where it runs
The package ships ES module and CommonJS builds with type declarations. Before each release, CI installs the packed tarball in small consumer projects (ESM, CommonJS, four TypeScript setups, Bun and Deno) and checks known answers from the C# goldens. After a release, a second workflow installs the published version from npm on Linux, Windows and macOS with Node 20 to 26, and checks its signatures and provenance. npm publishing goes through trusted publishing from GitHub Actions, with a manual approval step on npmjs.com.
The full demo adds pan and zoom, factions, hazards, regions and a panel for every system's planets, moons, belts and stations. Its links carry the seed and options, so a shared link rebuilds the same galaxy. The source is at m4bwav/universe-generator-ts, MIT licensed.
Since the last post
The last post covered plugins up to October 4. Most of what came after is more of the same idea: narrow skills for AI coding agents that keep their research current and carry tests. New since then:
- Games: ludowright reviews game designs with every finding cited. game-juice audits a codebase for game feel and adds effects behind accessibility toggles. grindwright keeps an indie game moving across art, sound, code and testing, and queues questions instead of waiting. marketwright plans launches and reviews Steam store pages.
- Engines and mods: roblox-agent for Roblox games, minewright for Minecraft Bedrock add-ons, and madnesswright for modding MADNESS: Project Nexus.
- Art and media: pixelwright makes pixel art in code and checks it. polywright handles 3D models, from image-to-3D to printable files. artwright judges images in pairs. brandwright makes on-brand UI mock-ups.
- Sound and film: musicwright for music, sfxwright for sound effects with a licence record per file, voicewright for consistent character voices, and cinewright for film craft and AI video.
- Writing and research: everwrite reached 1.0 and wrote this post. editwright suggests edits and never writes on the page. historywright answers history questions from sources and computes dates in code. science-study-evaluator appraises papers and the news about them.
- Agent tooling: askwright puts an agent's questions on a local page, one per screen, and reads the answers back. tokenwright collects token-saving habits and absorbed skill-tidy. fetchwright reads pages that refuse scripts. package-modernize 1.0 is the playbook that released this port. finwright keeps net worth records on your own machine.
Older plugins kept moving as well: readwright passed 70 releases, and evergreen, everscout, threewright and wikiwright all had updates.
Claude wrote this post with the everwrite plugin, running Opus 5.5.