A finished, single-screen two-van routing puzzle built with Phaser 3.90 + Vite. 36 fixed, hand-authored campaign boards in three chapters (街区起步 / 繁忙枢纽 / 立交高峰), plus a date-based daily challenge; original vector roads, trees, vans and depots; original WebAudio effects. English and Simplified Chinese. No accounts, analytics or runtime art/font services. The standalone build has no ads; the YouTube Playables and Playgama builds can show optional rewarded hints and occasional natural-break interstitials through their host platform (see below).
Node 22+ recommended (verified on Node 24.21.0).
npm ci
npm run devOpen http://localhost:8080. Mouse, touch and keyboard work. Tab selects a control; Enter / Space activates it. On a junction, Up chooses straight, Left chooses left, Right chooses right. Each sign is also a semantic DOM button layered over the Phaser scene.
Plan before dispatching. Both vans launch together; each beat moves each active van one road cell. A sign chooses straight, left or right relative to the arriving van's heading. At an ordinary two-way corner, the van automatically follows the bend. Straight signs therefore allow cars from different approaches to cross, rather than forcing them into one shared exit.
An enabled waiting pad makes a van stay one extra beat on every entry. It still occupies that cell. Same-cell collisions and head-on edge swaps both fail. A goes to coral A, B to teal B. Wrong depot, offroad or a 64-beat loop freezes the run with the cause marked. Delivered vans leave the road.
Replan keeps the route edits and returns vans to their starts. Retry same routes launches again without changing edits. Reset board clears this level's settings. Undo handles both turns and wait toggles, including reset. No lives or planning timer. Completing a level unlocks the next; the last level celebrates all 36 stops and offers replay. A chapter picker (atlas) lists levels with stars.
Stars. Each clear earns 1–3 stars from the beats used versus the level's minimum: minimum or better = 3, up to 2 beats over = 2, otherwise 1. Failed dispatches since the last win count as extra beats; hints do not. Only the best star count is kept.
Hints. A hint reveals one sign from the proven solution (the first one the proven run reads that differs from your board); it never applies it. On the standalone build hints are free. On Playables/Playgama a hint is a rewarded ad: the reward is granted only when the host confirms completion, a cancelled or failed ad changes nothing, and an already-granted hint can be reopened free while its sign still differs. No hint is offered when your board already reaches the minimum beats.
Daily challenge. One board per local calendar date, picked from three authored base boards (src/daily-pool.js) and eight rotations/reflections (src/level-transform.js), a 24-day cycle. A daily win records only that date; it never affects campaign progress, stars, last level or drafts. A streak counts consecutive dated wins (yesterday's streak stays live until today ends).
Interstitials (hosted builds only). After every two distinct first-ever campaign clears, and at least 60 s after load and after the previous break, pressing Next may request one interstitial. Replays and daily runs never do; a failed or unavailable ad never blocks the next level and is never rewarded.
npm test # engine, levels, save/progress, session, ad adapters (93 tests)
npm run verify:levels # exhaustive 123,504 configurations (50,544 for the daily pool); writes reports/level-verification.json
npx playwright install chromium
npm run test:e2e # real clicks/taps; all 36 UI solutions; daily/progression; YouTube ad flows; several viewports; test-only SDK mocks
npm run build:all # dist/, dist-playables/, dist-playgama/
npm run release:check # builds all three and checks their isolation
npm run smoke # serves and checks the actual standalone production build
npm run smoke:playables # actual Playables production build; explicitly mocked SDK
npm run smoke:playgama # actual Playgama build; explicitly mocked host-injected bridge
npm run package:playables # root index.html in tiny-dispatch-playables.zip
npm run package:playgama # root index.html in tiny-dispatch-playgama.zipBrowser screenshots, traces and smoke results are under gitignored artifacts/ and test-results/. E2E runs the ordinary development game with a shorter beat (VITE_BEAT_MS=90) and a read-only development state hook; production always uses 650 ms and contains no hook. All puzzle changes and progression in the full-run test use actual controls. Additional isolated cases seed save fixtures or inject a clearly test-only SDK.
src/levels.js contains fixed shipping boards and proven solutions. scripts/level-specs.js and scripts/district-specs.js hold the hand-authored campaign and daily-pool specs; node scripts/author-levels.js is an optional development-only authoring tool that also generates src/levels.js and src/daily-pool.js; it is never part of the runtime. verify:levels independently exhausts all S/L/R signs and boolean pads against the deterministic engine, for all 36 levels and every daily date in the cycle. The JSON includes candidate counts, outcome counts, shortest solution, required waits/detours and negative cases per level, plus road-overlap comparisons between levels. Waiting is mandatory on selected levels starting with level 3 (e.g. 3, 6, 19–21, 24–30, 33, 35, 36) and multi-pad boards appear in the later chapters; difficulty grows through crossings, waits, loops, detours and denser networks rather than reskinned boards.
dist/: standalone static website; The standalone build does not include a platform SDK and makes no external game requests. Upload its contents to any static host. Relative base works under GitHub Pages project paths.dist-playables/: includeshttps://www.youtube.com/game_api/v1before the game module. All own asset references are relative.tiny-dispatch-playables.zipplacesindex.htmlat archive root.- To check a parent-deployed public demo:
BASE_URL=https://your-host/your-project/ npm run smoke. This exercises fresh browser storage and does not change the hosted files. dist-playgama/: same-frame host-injection build for Playgama. It ships no Playgama SDK/Bridge and includes a restrictive CSP; the host must injectwindow.bridgein the game's own iframe before the game starts.tiny-dispatch-playgama.ziphasindex.htmlat root. The two ZIPs are not interchangeable. The contract and release checks are in docs/PUBLISHER.md.- No remote repository, deployment or external service was created by this assignment. Parent Yui handles publication.
- A public demo is not an accepted or certified YouTube Playable. The included SDK mocks are integration tests, not Google's official certification test suite or a real Playables host test.
src/platform.js selects the platform; src/playgama-bridge-platform.js (bundled only into the Playgama build) adapts an injected Bridge; src/platform-ads.js holds the shared rewarded/interstitial lock and watchdog. src/platform.js adapts the official sample's readiness, audio, pause and save architecture. Real loading HTML precedes firstFrameReady; gameReady follows the interactable canvas and controls. In IN_PLAYABLES_ENV, the initial language comes from getLanguage (English fallback; an in-session switch is not persisted), platform mute cannot be bypassed, only SDK resume releases platform pause, and neither localStorage nor page visibility is used. A small source-grounded Phaser Game.start override omits Phaser's otherwise automatic VisibilityHandler. Recheck that override when upgrading Phaser.
Standalone defaults to Chinese, has a visible language/mute toggle and uses visibility pause. Audio is created/resumed only on a user gesture. All motion and the game clock stop on pause; reduced motion removes interpolation, bobbing and stamp settling.
Saves are version 2 (completed levels, best stars, daily-win dates, last level, per-level drafts, mute, language). Version-1 saves (12 levels) are read and migrated, with completed levels getting 1 star; unknown newer versions are rejected as incompatible and not overwritten. Progress fields only grow, so merges are order-independent. Parsing validates progress and drafts. Storage exceptions and corrupt/newer save versions show an inline status. A failed cloud read blocks writes and offers retry; successful retry merges remote and current-session progress. Writes are serialized, including slow cloud writes that outlive the five-second warning, so an older completion cannot race a newer snapshot. Only the latest queued snapshot is retained while a write remains unsettled; the UI reports it as pending, and in-memory progress remains playable. Platform language is never written into cloud saves.
See THIRD_PARTY_NOTICES.md, DESIGN.md and reports/IMPLEMENTATION_REPORT.md for precise provenance, visual decisions and measured verification results.