Wegolite is a browser-based, faithful reimplementation of Oolite's core single-player loop: fly a Cobra Mk III out of a Coriolis station, dock manually, trade commodities between star systems, and hyperspace across the eight galaxies. Desktop web only. It is an unofficial fan project, not affiliated with the Oolite project, Frontier Developments plc, David Braben or Ian Bell.
Every process — dev server, production preview, unit tests and browser tests — runs in Docker. The host machine is expected to provide Docker and a browser, nothing else: no host Node, npm or Playwright install is authoritative.
The project is licensed GPL-2.0-or-later. Oolite-derived artwork and
configuration files remain CC BY-NC-SA 3.0 (attribution required, non-commercial
only, share-alike). See NOTICE, LICENSE and
ASSETS.md.
Release: Wegolite 0.8.2. The version is read from package.json, and the
release title is derived from it, so the two cannot drift apart.
Build the production bundle and serve it:
docker compose up preview
then open http://localhost:4173. For development with hot reload, run
docker compose up app and open http://localhost:5173 instead. Saves stay in
your browser's IndexedDB; they are not uploaded anywhere.
The tables show the default keys, spelled the way the game labels them. The pause menu's Controls panel rebinds any of them; a rebind replaces the default for that action.
Flight
| Action | Keys |
|---|---|
| Pitch forward | Up arrow |
| Pitch back | Down arrow |
| Roll left | Left arrow |
| Roll right | Right arrow |
| Increase speed | W |
| Decrease speed | S |
| Torus drive | J |
| Launch | 1 / F1 |
| Docking computer | Shift+C |
| Target station | Q |
| Cycle compass | \ |
| Precision | Left Ctrl / Right Ctrl |
| Hyperspace | H |
| Fore view | 1 / F1 |
| Aft view | 2 / F2 |
| Port view | 3 / F3 |
| Starboard view | 4 / F4 |
| Fire laser | A |
| Ident | R |
| Untarget | U |
| Eject (double press) | Esc |
Galactic chart
| Action | Keys |
|---|---|
| Galactic chart | F6 / 6 |
| Chart up | Up arrow |
| Chart down | Down arrow |
| Chart left | Left arrow |
| Chart right | Right arrow |
| Chart commit | Enter |
| Chart preset | Tab |
| Chart close | Esc |
| Find planet | / |
The chart opens on the local view around the current system; Tab toggles the
whole-galaxy view, the mouse wheel zooms around the cursor, and dragging with
the left button pans. F6 on an open chart does nothing (Esc closes it). Find
planet (/) searches by the start of a name: the first match is selected and
every match is boxed; Down and Up step through the matches, Enter sets the
selection as the destination and Esc clears the search.
Docked station
| Action | Keys |
|---|---|
| Market | F8 / 8 |
| Outfitting | F3 / 3 |
| Status | F5 / 5 |
| Interfaces | F4 / 4 |
| Back | Esc / Backspace |
| Up | Up arrow |
| Down | Down arrow |
| Left | Left arrow |
| Right | Right arrow |
| Confirm | Enter / Y |
| Cancel | N |
| Next page | Tab / PageDown |
| Previous page | PageUp |
| Sell maximum | Shift+Left arrow |
| Buy maximum | Shift+Right arrow |
On the status screen, F5 (or 5) shows the manifest, and on the manifest it
returns to the status page, as in Oolite. On the market, a line under the list
shows Oolite's note on the selected commodity (empty when it has none), and F8
(or 8) on the market does nothing (Oolite opens a separate commodity screen
there instead). On the market, a click selects a commodity and a double click
opens the confirmation for the trade Oolite's Enter makes there (with Shift the
most you can buy, otherwise all you carry of it, otherwise the most you can
buy); Y or Enter completes it.
Save and load
| Action | Keys |
|---|---|
| Save / load | F2 / 2 |
| Save/load up | Up arrow |
| Save/load down | Down arrow |
| Save | S |
| Load | L |
| Return | Esc |
| Save/load activate | Enter |
| Save/load confirm | Y |
| Save/load cancel | N |
Anywhere
| Action | Keys |
|---|---|
| Pause | P |
Wegolite supports two desktop browsers: current stable Chrome and current stable Firefox. Both need WebGL2, so hardware acceleration must be enabled.
Two commands check the release. docker compose run --rm verify-full runs the
full suite on Chromium. docker compose run --rm e2e-cross runs the core loop on
Firefox under a virtual display. Real-GPU frame rate is measured by the protocol
in docs/PERFORMANCE.md, never inside Docker.
No other browser is tested for this release.
These are the same commands AGENTS.md documents; the service names are the
contract.
| Task | Command |
|---|---|
| Dev server (port 5173) | docker compose up app |
| Production preview (port 4173) | docker compose up preview |
| Unit tests | docker compose run --rm test |
| Unit tests (local, no coverage) | docker compose run --rm test npm run test:fast |
| Browser tests | docker compose run --rm e2e |
| Firefox browser tests | docker compose run --rm e2e-cross |
| Content build (regenerate) | docker compose run --rm assets |
| Content drift check | docker compose run --rm assets npm run assets:check |
| Fast verification gate | docker compose run --rm verify |
| Full release gate | docker compose run --rm verify-full |
| CI checks job (release gate without the Chromium suite) | docker compose run --rm verify-checks |
| Lint | docker compose run --rm lint |
| Typecheck | docker compose run --rm typecheck |
| Dependency audit (npm advisories, needs network) | docker compose run --rm audit |
| Rebuild after dependency changes | docker compose build --no-cache |
| Stop and clean up | docker compose down --volumes --remove-orphans |
FIDELITY.md maps each ported mechanic to the Oolite source
that defines it, at the pinned commit 7437f22. It also lists every recorded
divergence, and each divergence names its row in the PROJECT.md Key Decisions
table.
docs/PERFORMANCE.md holds the frame budget and the
measurement protocol. Each rendered frame may use at most 50 draw calls and at
most 250 000 triangles, and the planet may spend at most 9 noise evaluations.
The container checks the first two on SwiftShader. Frame rate is judged only on a
real GPU, by the protocol in that document.
These limits describe the default Standard quality. The pause menu's Settings panel has a "High-quality graphics" option, off by default, that adds sun-angle shading, soft layered clouds, an atmosphere haze and sky nebulae. High spends up to 17 noise evaluations and up to five more draw calls, and it is not measured by the budget tests.
Settings also has a "Show FPS counter" option, off by default, that shows the
frame rate on screen. It is a quick reading only: the protocol in
docs/PERFORMANCE.md remains the measurement of record.
- WebGL2 is unavailable. Wegolite needs WebGL2. When the browser does not provide it, the page shows a plain message in place of the game. Enable hardware acceleration in the browser, then reload the page.
- The graphics context is lost. The game pauses at once. When the browser restores the graphics, the pause overlay says "Graphics restored. The game is paused — press P to continue." If no restore arrives within 10 seconds, the page says "Wegolite could not restore the graphics. Your last save is safe. Reload the page to continue."
- A hidden tab pauses the game. Switching to another tab pauses Wegolite. Return to the tab and press P to carry on.
The game content is compiled at build time from a pinned Oolite snapshot. The browser never parses a plist and never downloads the snapshot.
- Pinned snapshot.
third_party/oolite/holds the exact bytes the compiler reads: Oolite release 1.93.1-241, commit7437f22. The identity lives inthird_party/oolite/pin.jsonand is explained bythird_party/oolite/SOURCE.md;scripts/vendor-oolite.shis the only sanctioned way those bytes enter the repository. - Regenerate.
docker compose run --rm assetscompiles the snapshot intosrc/content/generated/(typed JSON and the manifest) andpublic/models/,public/textures/(GLB, WebP and PNG). The output is committed: it is the reviewed baseline, not a build cache. - Textures. The ship and station textures are re-encoded from the vendored
PNGs to WebP with
cwebp, which is baked into the image.src/content/generated/texture-encodings.jsonrecords the source hash, the encoder arguments and the output hash of each file. A file whose source and arguments are unchanged is kept exactly as committed, so the output does not depend on the encoder version or the CPU;docker compose run --rm assets npm run assets:build -- --reencodeencodes every texture again. - Drift gate.
docker compose run --rm assets npm run assets:checkregenerates into a temporary directory and compares the file set, the bytes and each SHA-256 against the committed tree. It runs insidedocker compose run --rm verify, third in the chain, so a content change that was not regenerated and committed fails the definition of done. - Never hand-edit generated output. Every file under
src/content/generated/,public/models/andpublic/textures/is emitted by the compiler. Change the converter or the pinned input, then regenerate. - Bump the pin. Re-vendor at the new release/commit, run
docker compose run --rm assets, review every changed byte, and commit the regenerated output together with the newpin.json,SOURCE.md,CHECKSUMS.sha256andASSETS.mdhashes.verifystays red until that diff is reviewed and committed; there is no override. - Cross-architecture proof.
sh scripts/check-arch-determinism.shrebuilds the generator and regenerates underlinux/arm64andlinux/amd64, then compares the two trees file by file. It is deliberately outsideverifybecause Compose cannot select a platform per invocation; run it on CI or a host with arm64 execution. - Licensing. Oolite-derived data and artwork stay CC BY-NC-SA 3.0:
attribution required, non-commercial only, share-alike. Every vendored and
generated asset has a row with a SHA-256 in
ASSETS.md; see alsoNOTICE.
- Ports. The dev server publishes
5173and the production preview4173. The test services (test,e2e,e2e-cross,lint,typecheck,assets,verify,verify-full,verify-checks) publish no ports — Playwright starts its ownvite previewinside the container. - Definition of done. The definition of done for everyday changes is
docker compose run --rm verify, the fast gate: it runslint, thentypecheck, thenassets:check, thentest, thenbuild, then the e2e smoke subset (test:e2e:fast: the scene, docking and save/load specs), as one fail-fast chain in one container, exiting non-zero at the first failing stage.docker compose run --rm verify-fullruns the same fail-fast chain with the full Chromium suite (test:e2e), then the WR-04 seam spec (test:e2e:seams); run it before a release and when render, input, persistence or network-guard code changes. CI runs the same chain split across parallel jobs in.github/workflows/verify.yml:verify-checks(verify-fullwithout the full Chromium suite) and the Chromium suite in four--shard=N/4jobs; an aggregateverifyjob and the workflow conclusion gate the Pages deploy. The seam spec needs a test-only Vite bundle on its own origin, so it lives inplaywright.seams.config.tsand is excluded from the default config: ordinary and targeted Playwright runs no longer pay for that second build. A green host run is not evidence; tests pass only in the container. - Dependency changes. After any
package.jsonorpackage-lock.jsonchange rundocker compose build --no-cacheanddocker compose down --volumes. A rebuild alone is not enough: the namednode_modulesvolume is populated from the image once and otherwise keeps its old contents. - Hot reload on WSL2/macOS. If host edits stop triggering a reload, opt in to file polling with
VITE_USE_POLLING=1(see.env.example). Polling is opt-in because it costs CPU. - Chromium posture. Browser tests run the image's baked Chromium as root with its sandbox disabled, and the preview under test loads only content this repository serves. No third-party page is ever opened. Firefox in the
e2e-crossimage runs under the same localhost-only posture, ande2e-crossis not part ofverify, which stays Chromium-only. - Working tree, not image.
docker compose run --rm verifybind-mounts the repository at/app, so it checks the edits you can see. Rundocker compose buildfirst when you need the committed tree verified instead. - Reusing the local preview. The image sets
CI=1, soreuseExistingServer: !process.env.CIalone cannot turn preview reuse on inside a container. SetWEGOLITE_REUSE_PREVIEW=1and keep anpm run previewprocess alive in the same container as the Playwright process to reuse it across targeted spec runs; CI leaves reuse off so a stale server fails loudly. Compose services do not share a network namespace, so a preview in a separate container is not visible at127.0.0.1:4173. - Local unit loop.
npm run test:fastruns Vitest without coverage for a quick local check;npm run test, the oneverifyuses, keeps the measured D-19 coverage thresholds. Run it in the container, e.g.docker compose run --rm test npm run test:fast. The guard tests now share one ESLint Node API instance instead of spawningnpx eslintper assertion, which removes most of the unit stage's cold-start cost. The browser suite remains the slow part on SwiftShader.
src/sim/— pure TypeScript simulation core: no Three.js, no DOM, no wall clock.src/render/— camera-relative transforms and the scene, downstream of the sim.src/content/— compiled content: the zod schemas, the type-only surface the sim may import, and the generated JSON undersrc/content/generated/.tools/oolite-ingest/— the build-time compiler that turns the pinned snapshot into typed content, GLB models and textures.tests/— Vitest suites (compliance, golden fixtures, guards) and Playwright specs undertests/e2e/.third_party/oolite/— the pinned Oolite snapshot;public/holds the compiled GLB models and textures served by URL.
The project is developed with AI coding agents. None of these tools is needed to
build, run or test the game — Docker is the only requirement — but the agent
guide (AGENTS.md) assumes them when they are present:
- GSD (
@opengsd/gsd-core) — the planning and execution workflow behind.planning/(phases, plans, summaries, verification). See the project's site for installation instructions. - codebase-memory MCP — a code knowledge graph for symbol, caller and
architecture queries. Index this repository as project
wegoliteand, if you keep an Oolite source checkout for reference, index it as projectoolite. Without it, agents fall back torgand file reads.
Wegolite's own source code is licensed under GPL-2.0-or-later; the unmodified
licence text is in LICENSE. Oolite-derived artwork and
configuration files are licensed under CC BY-NC-SA 3.0: attribution is required,
use is non-commercial only, and derivatives must be shared alike. Every such file
has a row in ASSETS.md, and NOTICE gives the
attribution.
The built site ships NOTICE, LICENSE and ASSETS.md, and its footer links
all three.
The complete corresponding source for every distributed build is at https://github.com/DenisBY/wegolite.