You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dfed03c
Browse filesBrowse the repository at this point in the historyBrowse files
|`bun install`, `bun dev`| Install dependencies; start the dev server |
20
-
|`bun run typecheck`| Typecheck with `tsrs`, including the Effect rules. It covers `tools/audit`, so run `bun install` there once too |
21
-
|`bun run lint`| Lint with oxlint and the Effect rules |
22
-
|`bun run test`| The fast tier: Story, Scene, and unit tests and the packages, about 6 s. `-- <files>` or `-- --changed` narrows it |
23
-
|`bun run test:full`| The full tier, as CI runs it: the fast tier plus the sim tier (`*.sim.test.ts`), whole wave replays and seed sweeps |
24
-
|`bun run build`| Build for production |
25
-
|`bun run perf:check`| Compare frame time to `tools/audit/frame-baseline.json` in headless Chrome |
26
-
|`cd infra && bun alchemy plan --stage prod`| Show what a production deploy would change. `deploy` in place of `plan` deploys by hand (see `infra/README.md`) |
27
-
|`cd tools/audit && bun live-check.ts [url]`| Load a deployed copy in headless Chrome and check that it boots |
28
-
|`cd infra && bun run test`| Test the analytics Worker: the size cap, rate limits, decoding, and D1 rows |
29
-
|`bun tools/analytics/report.ts --stage <s>`| Print a stage's analytics. `smoke.ts <api url>` posts one fake run summary and checks the API Worker |
30
-
|`bun run heavy -- bun tools/audit/sqlite.ts`| Check the SQLite save on OPFS in headless Chrome. `sync.ts <url>` checks player sync on a deployed copy. `offline.ts` checks offline play and updates with the service worker |
31
-
|`bun run balance [runs]`| The balance bot through the guard. `-- --wave 4 --runs 100` plays one wave from snapshots (`--wave all` for every wave). Env vars such as `MODE=endless` and `VIEW=portrait` pass through |
32
-
|`bun run balance:model`| The analytical balance model: every wave and level from the tables, in under a second |
33
-
|`bun run balance:nightly`| The nightly balance suite through the guard, reported in `tools/balance/reports/<date>.md`|
34
-
|`bun run heavy -- <command...>`| Run any CPU-heavy command through the guard: timing jobs alone, the rest within a load budget of about 70% of the cores |
35
-
|`bun run determinism`| One scripted run in Bun, Node, headless Chrome, and workerd, through the guard: where engines first differ |
36
-
|`bun run determinism:diff -- [ref]`| Whether the working tree plays exactly like `ref` (`origin/main`), through the guard, for no-change refactors |
|`bun install`, `bun dev`| Install dependencies; start the dev server |
20
+
|`bun run typecheck`| Typecheck with `tsrs`, including the Effect rules. It covers `tools/audit`, so run `bun install` there once too |
21
+
|`bun run lint`| Lint with oxlint and the Effect rules |
22
+
|`bun run test`| The fast tier: Story, Scene, and unit tests and the packages, about 6 s. `-- <files>` or `-- --changed` narrows it |
23
+
|`bun run test:full`| The full tier, as CI runs it: the fast tier plus the sim tier (`*.sim.test.ts`), whole wave replays and seed sweeps |
24
+
|`bun run build`| Build for production |
25
+
|`bun run perf:check`| Compare frame time to `tools/audit/frame-baseline.json` in headless Chrome |
26
+
|`cd infra && bun alchemy plan --stage prod`| Show what a production deploy would change. `deploy` in place of `plan` deploys by hand (see `infra/README.md`) |
27
+
|`cd tools/audit && bun live-check.ts [url]`| Load a deployed copy in headless Chrome and check that it boots |
28
+
|`cd infra && bun run test`| Test the analytics Worker: the size cap, rate limits, decoding, and D1 rows |
29
+
|`bun tools/analytics/report.ts --stage <s>`| Print a stage's analytics. `smoke.ts <api url>` posts one fake run summary and checks the API Worker |
30
+
|`bun run heavy -- bun tools/audit/sqlite.ts`| Check the SQLite save on OPFS in headless Chrome. `sync.ts <url>` checks player sync on a deployed copy. `offline.ts` checks offline play and updates with the service worker |
31
+
|`bun run balance [runs]`| The balance bot through the guard. `-- --wave 4 --runs 100` plays one wave from snapshots (`--wave all` for every wave). Env vars such as `MODE=endless` and `VIEW=portrait` pass through |
32
+
|`bun run balance:model`| The analytical balance model: every wave and level from the tables, in under a second |
33
+
|`bun run balance:nightly`| The nightly balance suite through the guard, reported in `tools/balance/reports/<date>.md`|
34
+
|`bun run heavy -- <command...>`| Run any CPU-heavy command through the guard: timing jobs alone, the rest within a load budget of about 70% of the cores |
35
+
|`bun run determinism`| One scripted run in Bun, Node, headless Chrome, and workerd, through the guard: where engines first differ |
36
+
|`bun run determinism:diff -- [ref]`| Whether the working tree plays exactly like `ref` (`origin/main`), through the guard, for no-change refactors |
37
+
|`bun run mp:e2e`| Co-op rooms end to end in a local workerd: three players by code, then a QUICK PLAY group (a Shared heavy job) |
38
+
|`bun tools/mp-dev/serve.ts <api origin>`| The co-op dev page at `http://localhost:4180/`; `bun tools/mp-dev/local.ts` runs a local API at `:8798` for it |
39
+
|`bun run heavy -- --shared bun tools/audit/mp.ts <url> [n]`| Co-op in headless Chrome on a deploy's dev page: 2 to 4 pages join, play, rejoin, end, then QUICK PLAY |
37
40
38
41
Before you finish a change, run `typecheck`, `lint`, `test`, and `build`. All four must pass. Also run `test:full` when the change touches gameplay (`simulation.ts`, `waves.ts`, `pacing.ts`, `combat.ts`, the zombie, boss, or trap modules), since CI runs it and blocks the deploy on it.
39
42
@@ -113,6 +116,7 @@ Paths are under `src/`. The API Worker is in `infra/worker/` (analytics, and syn
113
116
-**The Foldkit patch.** Every fixed sprite is a `Canvas.Image`, which Foldkit 0.169.0 has only through the Bun patch `patches/foldkit@0.169.0.patch`. Read [`patches/README.md`](./patches/README.md) before changing it, dropping it, or upgrading Foldkit.
114
117
-**Deploying.** A push to `main` deploys production through `.github/workflows/deploy.yml` once `typecheck`, `lint`, `test`, and `build` pass, and a pull request gets a preview. Stages, local deploys, itch.io, and credentials are in [`infra/README.md`](./infra/README.md). The workflow is the only deploy path: never connect Cloudflare Workers Builds, and never put a token in the repo or in a `VITE_` variable.
115
118
-**How updates reach installed apps, and offline play.** Each build is stamped into `version.json`, and a "New version ready" chip waits on the home menu. A service worker (`src/sw/`) precaches the build so the game cold starts with no network; it never decides which build runs, `version.json` does. Its kill switch is `IS_SERVICE_WORKER_KILLED` in `src/sw/precache.ts`. Check it with `bun run heavy -- bun tools/audit/offline.ts`. See "How updates reach installed apps" in [`PLATFORM.md`](./PLATFORM.md).
119
+
-**Co-op.** The room protocol, the room's tick, the `room:<code>` lobby scope, QUICK PLAY, and the browser client are in `packages/netcode`; the `GameRoom` and `Matchmaker` Durable Objects in `infra/worker/`; the dev page and the local workerd in `tools/mp-dev`. They run a stand-in world until the World split; the dev page deploys on preview stages only. See "What Phases 2 and 3 built" in [`MULTIPLAYER.md`](./MULTIPLAYER.md).
0 commit comments