Skip to content

Load planet textures progressively for faster startup - #55

Merged
darrinm merged 1 commit into
mainfrom
codex/progressive-loading
Sep 15, 2026
Merged

darrinm merged 1 commit into
mainfrom
codex/progressive-loading

Conversation

@darrinm

@darrinm darrinm commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Planet maps no longer hold the loading screen open. The rack starts with colored surfaces, downloads 512-pixel WebP previews alongside room assets, then upgrades existing textures to the original resolution in the background. Companion-only previews follow the rack, and full-resolution transfers run two at a time.

The previews total 547,724 bytes versus 11,532,863 bytes for the original maps. A cold local production-build comparison at 390×844, Fast 4G, and 4× CPU slowdown reduced time to attract mode from 19.8 s to 8.6 s (57%). This improves startup latency; the original detail maps still download afterward.

Texture updates preserve shared live/replay materials, ball positions, and collection selection. Resolution changes release the old GPU allocation; updates refresh cached shadows. Missing downloads keep the previous appearance, and teardown releases late arrivals without starting queued work. Includes a reproducible preview-generation script and pipeline documentation.

Validation: all 353 tests and the production build pass. New coverage checks progressive arrival, replay sharing, GPU allocation release, missing-preview recovery, concurrency, and late-disposal cleanup. Browser checks covered mobile startup, desktop previews with all detailed downloads held back, and resuming detail downloads during a game; no WebGL errors occurred. Existing Vite bundle-size/config warnings remain.

@darrinm
darrinm merged commit 866b332 into main Sep 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant