Skip to content

About

Single-player space trading game with browser and native editions, portable captain identities, and verified progression.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

49 Commits

Folders and files

Repository files navigation

Spacetrader

A single-player space-trading game: explore the solar system, trade commodities, manage a fleet, and build a captain's history.

Play at captain.bittrees.org.

The first public edition runs entirely in the browser and saves progress on that device. Wallet saves, NFT-controlled captains, verified rankings and agent play are planned work; they are not enabled in this edition. Clearing browser storage removes local progress, including its checkpoint slots. Use a regular browser profile and keep its site data; this edition does not yet provide cross-device recovery.

The browser action ledger uses IndexedDB. The public build also maintains one verified, current localStorage recovery copy after each successful action; it recovers from recorded history first if the ledger head is missing. An older legacy autosave is preserved before its first replacement. Secondary-copy quota failures do not invalidate successful primary commits. Save/Load exposes a collapsed storage-status panel, and supported browsers receive one persistence request after a game interaction. These protections do not prevent deliberate site-data removal or provide cloud recovery. Run node Tests/browser/browser-save-safety.test.cjs and node Tests/browser/public-build.test.cjs after changing this public-only adapter.

The public cockpit uses Web/play-layout.js and Web/play-viewport.css for rotation, the visible viewport above the software keyboard, safe areas and compact phone navigation. Narrow establishments use one scrolling sheet; tablet/desktop desks retain independent panes. Trade controls stack on small screens. Editable mobile controls use at least 16 px text without disabling pinch zoom. Run node Tests/browser/play-layout.test.cjs and the public build checks, then inspect phone/tablet portrait and landscape layouts. Desktop viewport checks do not replace physical iOS keyboard and touch acceptance. Touch layouts cap the cockpit at Safari's small viewport and reserve a 6 px bottom inset. Popouts share the fitted cockpit height, including while keyboard panning changes its offset. Tablet windows below 620 px reflow navigation before the sidebar's contents become crowded.

Run locally

Use an existing Node.js installation and Python 3. No dependency installation is needed for the static build.

node Tools/check_balance.cjs
python3 Web/build.py
python3 Tests/browser/public-seo.test.py
node Tests/browser/public-goods-delivery.test.cjs
python3 Web/serve.py

Open /play/, /guide/, /characters/, /ships/ or /goods/. The static build uses reviewed generic reference snapshots and never reads player saves. The game engine and approved economy are unchanged by the web packaging adapter.

Public search metadata, canonical URLs, sitemap, structured data and favicon links are generated by Web/seo.py. Committed icons and the sharing image live in Web/assets; the optional local Pillow generator is Web/make-brand-assets.py.

The public goods catalogue uses a lossless column dictionary for normal browsing. Daily pricing statistics load by commodity group only when item summaries are requested, and run in a worker. Web/goods_delivery.py builds these derived files from the approved reference; the original snapshot remains available unchanged.

Vercel releases use the generated Build Output API directory in Web/.vercel. Guest play saves locally in browser IndexedDB. Optional account saves use the isolated Node function and existing restricted PostgreSQL, email and Bittrees SSO services described in Web/account/README.md. The account interface reuses the canonical shared sign-in components with the requested Spacetrader theme. Builds reuse compatible pinned dependencies; they do not provision services or install packages automatically. Public hosting and account storage retain provider limits.

Licensing

Code and owned game assets are MIT licensed. See LICENSE and THIRD_PARTY_NOTICES.md. Third-party notices must be retained.

Mathematical reference presentation

Local/formula_notation.py provides native MathML summaries and local symbol definitions for the 40 pricing-reference blocks and four Guide banking groups. Exact source calculations remain available in disclosures. The approved formula page and economic inputs stay unchanged. Run python3 Tools/typeset_formulas.py, python3 Local/guide-catalogue/build.py, python3 Tests/formula_notation_test.py and node Tools/check_guide.cjs after edits. The derived formula page has its own presentation manifest; public builds verify it, and the local read-only catalogue applies the same reviewed presentation through catalogue_shell.py.

Public section navigation

Web/reference-nav.js and Web/reference-nav.css provide live reading-position highlights on the public Guide, Formulas and Trading Mechanics sidebars. The public builder removes Section 14’s dated bank sample table and its rendering call, preserving the approved source/data and the remaining examples. Run node Tests/browser/reference-nav.test.cjs after building.

About

Single-player space trading game with browser and native editions, portable captain identities, and verified progression.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages