Add game UI panels, keyboard shortcuts, docs narrative overhaul, and unified dev script
- Add MiniStarMap, NpcMarketPanel, ShipStatusPanel, useKeyboardShortcuts - Add progress bars for approach/mining operations and cargo fill indicator - Rewrite docs from spreadsheet-first to exploration-first open-world RPG - Replace dev:db + dev:standalone with unified dev script (scripts/dev.sh) - Add Vite chunk splitting for three.js and spacetimedb - Fix displayName dependency in useSpacetimeConnection - Remove stale usePlayerSession.ts - Add AGENTS.md files across all packages
This commit is contained in:
84
README.md
84
README.md
@@ -1,6 +1,23 @@
|
||||
# VOID::NAV
|
||||
|
||||
VOID::NAV is now a pnpm workspace monorepo for the game website, living design docs, browser game shell, and SpacetimeDB backend module.
|
||||
**An open-world space exploration RPG** — trade, quest, fight, or simply drift and enjoy the ambiance. Inspired by the charm and freedom of Windward Horizon, set in a procedurally generated galaxy with FTL-style tactical combat.
|
||||
|
||||
You are a young, unaffiliated captain with an entire galaxy open for exploration. Every campaign features a unique, procedurally generated sector map. Trade goods between stations, take on quests for various factions, mine asteroid belts, or simply cruise and enjoy the void. Prefer a quieter life? You can simply sail the stars.
|
||||
|
||||
Combat is **FTL-style tactical resource management** — no dogfighting or direct piloting. Click a hostile, your ship auto-engages, and you manage reactor power between Weapons / Shields / Engines / Auxiliary. The skill is in *what* you power and *when*, not how fast you click.
|
||||
|
||||
VOID::NAV is a pnpm workspace monorepo for the game website, living design docs, browser game shell, and SpacetimeDB backend module.
|
||||
|
||||
## Core Pillars
|
||||
|
||||
| Pillar | Description |
|
||||
|--------|-------------|
|
||||
| **Open-World Exploration** | Procedurally generated galaxy with unique sectors, anomalies, and hidden treasures every campaign |
|
||||
| **Trade & Commerce** | Regional price differences, supply/demand, and trade routes between stations and factions |
|
||||
| **FTL-Style Combat** | Tactical power management (not action). Auto-engage with reactor allocation decisions |
|
||||
| **Ship Customization** | Build the ship that suits your style — tough juggernaut, nimble scout, or cargo hauler |
|
||||
| **Dynamic World Impact** | Faction leaders, world events, and player actions shape the galaxy without firing a shot |
|
||||
| **Solo or Co-op** | Brave the void alone or crew with friends. Built with co-op in mind. |
|
||||
|
||||
## Layout
|
||||
|
||||
@@ -17,17 +34,30 @@ archive/legacy-static Legacy static prototype files kept for reference
|
||||
|
||||
- Node.js 24+
|
||||
- pnpm 9+
|
||||
- SpacetimeDB CLI for backend build, generation, and local DB runs
|
||||
- SpacetimeDB CLI (`spacetime`) v2.3.0+
|
||||
|
||||
The SpacetimeDB CLI is not vendored. Frontend builds use the committed placeholder bindings in `apps/game/src/module_bindings`; run `pnpm generate:bindings` after installing the CLI to replace them with generated bindings.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
This single command starts a fresh SpacetimeDB instance (ephemeral, in-memory), publishes the module, generates bindings, and launches the game dev server.
|
||||
|
||||
Open `http://localhost:5175` to play.
|
||||
|
||||
Press `Ctrl+C` to stop everything.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev:docs
|
||||
pnpm dev:site
|
||||
pnpm dev:game
|
||||
pnpm dev # Full stack: SpacetimeDB + game (port 5175)
|
||||
pnpm dev:docs # Docs only (port 5173)
|
||||
pnpm dev:site # Site only (port 5174)
|
||||
pnpm dev:game # Game frontend only (requires running SpacetimeDB)
|
||||
```
|
||||
|
||||
Default ports:
|
||||
@@ -35,50 +65,20 @@ Default ports:
|
||||
- docs: `http://localhost:5173/docs`
|
||||
- site: `http://localhost:5174`
|
||||
- game: `http://localhost:5175`
|
||||
|
||||
The public site links to docs and game via:
|
||||
|
||||
```text
|
||||
VITE_DOCS_URL=http://localhost:5173/docs
|
||||
VITE_GAME_URL=http://localhost:5175
|
||||
```
|
||||
|
||||
The game shell reads:
|
||||
|
||||
```text
|
||||
VITE_SPACETIME_URI=http://localhost:3000
|
||||
VITE_SPACETIME_DATABASE=void-nav-dev
|
||||
```
|
||||
- SpacetimeDB: `http://127.0.0.1:3000`
|
||||
|
||||
## Builds
|
||||
|
||||
```bash
|
||||
pnpm --filter @void-nav/docs build
|
||||
pnpm --filter @void-nav/site build
|
||||
pnpm --filter @void-nav/game build
|
||||
pnpm build
|
||||
pnpm check
|
||||
pnpm build # Build all apps
|
||||
pnpm check # Typecheck all packages
|
||||
pnpm generate:bindings # Regenerate SpacetimeDB TypeScript bindings
|
||||
```
|
||||
|
||||
## SpacetimeDB
|
||||
|
||||
Root `spacetime.json` points at `services/spacetimedb` and generates TypeScript bindings into `apps/game/src/module_bindings`.
|
||||
|
||||
With the CLI installed:
|
||||
The `pnpm dev` script uses an isolated ephemeral data directory (`.spacetime-dev/`) so it starts clean every time. No stale database or auth issues.
|
||||
|
||||
```bash
|
||||
spacetime build --module-path services/spacetimedb
|
||||
pnpm generate:bindings
|
||||
pnpm dev:db
|
||||
```
|
||||
|
||||
`pnpm dev:db` targets the SpacetimeDB CLI server nickname `local` so development publishes to `http://127.0.0.1:3000` instead of any configured cloud default.
|
||||
|
||||
Initial reducers:
|
||||
|
||||
- `connectPlayer(displayName: string)`
|
||||
- `renamePlayer(displayName: string)`
|
||||
- `seedWorld()`
|
||||
- `ping()`
|
||||
|
||||
The game shell calls `connectPlayer` after connection, subscribes to starter shell rows, and displays connection, player, ship, system, station, and reducer status. When SpacetimeDB is unavailable or bindings are still placeholders, it shows a clear disconnected/error state.
|
||||
Reducers: `connectPlayer`, `renamePlayer`, `seedWorld`, `ping`, `undock`, `selectTarget`, `startApproach`, `completeApproach`, `dock`, `startMining`, `completeMiningCycle`, `sellOreToNpcMarket`
|
||||
|
||||
Reference in New Issue
Block a user