Multiplayer: players table + migration from singleton account (step 1/12) — ships as v1.0.0 #105

Closed
opened 2026-09-22 10:31:15 +02:00 by kamilkrzywda · 1 comment
Owner

Part of the #101 multiplayer plan.

VERSIONING DECISION (user, 2026-09-22): this first multiplayer release bumps the major version — it ships as v1.0.0 (package.json + CHANGELOG), subsequent steps continue 1.x. The game world is RESET at this cutover per user decision (fresh year-2000 worlds; no save migration).

Add a players table (id TEXT PK, provider, username, cash REAL, reputation REAL) to lib/db/schema.ts and the DDL/migrateColumns in lib/db/client.ts. One-time migration: copy the existing singleton account row into a seeded player (e.g. id local) and drop account. No behavior change yet — all code still reads via a temporary helper so this ships standalone.

Part of the #101 multiplayer plan. VERSIONING DECISION (user, 2026-09-22): this first multiplayer release bumps the major version — it ships as **v1.0.0** (package.json + CHANGELOG), subsequent steps continue 1.x. The game world is RESET at this cutover per user decision (fresh year-2000 worlds; no save migration). Add a `players` table (`id TEXT PK`, `provider`, `username`, `cash REAL`, `reputation REAL`) to lib/db/schema.ts and the DDL/migrateColumns in lib/db/client.ts. One-time migration: copy the existing singleton `account` row into a seeded player (e.g. id `local`) and drop `account`. No behavior change yet — all code still reads via a temporary helper so this ships standalone.
kamilkrzywda added a new dependency 2026-09-22 12:47:28 +02:00
kamilkrzywda removed a dependency 2026-09-22 12:47:52 +02:00
kamilkrzywda changed title from Multiplayer: players table + migration from singleton account (step 1/12) to Multiplayer: players table + migration from singleton account (step 1/12) — ships as v1.0.0 2026-09-22 12:53:58 +02:00
Author
Owner

Decision (2026-09-24, user): no world wipe at the v1.0.0 cutover — deployed in-place; the player's wallet and current fleet persist. The "fresh year-2000 world" reset is deferred ("we can reset it later") and will be done by simply rewinding sim_state.clockMs to the start value (doable today via the admin panel's DB CRUD) — open market refreshes on its own via wall-clock expiry, no migration or wipe needed.

Decision (2026-09-24, user): **no world wipe at the v1.0.0 cutover** — deployed in-place; the player's wallet and current fleet persist. The "fresh year-2000 world" reset is deferred ("we can reset it later") and will be done by simply rewinding `sim_state.clockMs` to the start value (doable today via the admin panel's DB CRUD) — open market refreshes on its own via wall-clock expiry, no migration or wipe needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#105