Environment
- OS: Windows 10 (x64)
- Bun: 1.3.2
- Browser: Chrome 144, also tested Edge 144
- Docker Desktop: Running
Problem
Game client stuck at 3% loading. Server starts fine and shows "Hyperscape Server Ready" on port 5555. Browser console shows:
[physx-script-loader] Failed to load PhysX script (physx-script-loader.ts:70)
PhysX WASM loading timeout after 30 seconds (PhysXManager.ts:316)
The game world loads correctly server-side (fishing spots initialize, 235 items loaded, 200 skill unlocks, 9 prayers, etc). The issue is client-side only.
Root Cause
The physx-script-loader.ts loads PhysX from the CDN at: ${cdnUrl}/web/physx-js-webidl.js?v=1.0.0
which resolves to http://localhost:8080/web/physx-js-webidl.js.
However, after running bun run cdn:up and bun run dev, the CDN container (hyperscape-cdn) does not have a /web/ directory. Running docker exec hyperscape-cdn ls /usr/share/nginx/html/ shows only:
- 50x.html
- assets
- index.html
No /web/ folder exists. The PhysX files are built correctly in packages/physx-js-webidl/dist/ (physx-js-webidl.js at 4.6MB, physx-js-webidl.wasm at 5.9MB) but are never copied to the CDN container.
What I Tried
- Manually copied both files into the CDN container:
- After copying,
http://localhost:8080/web/physx-js-webidl.js serves correctly and http://localhost:8080/web/physx-js-webidl.wasm downloads successfully (5.9MB)
- The "Failed to load PhysX script" error goes away after copying the JS file
- However, "PhysX WASM loading timeout after 30 seconds" still occurs — the JS loads but WASM initialization times out
Steps to Reproduce
- Fresh clone on Windows
bun install
- Copy .env files for server and client
bun run cdn:up
bun run dev
- Open http://localhost:3333 — stuck at 3%
Expected
PhysX files should be automatically available in the CDN container after setup, and the game should load past 3%.
Setup completed
bun install ✅
packages/server/.env created ✅
packages/client/.env created ✅
- Docker running ✅
- PostgreSQL running ✅
bunx drizzle-kit push (tables created) ✅
- Server shows "Hyperscape Server Ready" ✅
- PhysX files exist in physx-js-webidl/dist/ ✅
Environment
Problem
Game client stuck at 3% loading. Server starts fine and shows "Hyperscape Server Ready" on port 5555. Browser console shows:
[physx-script-loader] Failed to load PhysX script(physx-script-loader.ts:70)PhysX WASM loading timeout after 30 seconds(PhysXManager.ts:316)The game world loads correctly server-side (fishing spots initialize, 235 items loaded, 200 skill unlocks, 9 prayers, etc). The issue is client-side only.
Root Cause
The
physx-script-loader.tsloads PhysX from the CDN at: ${cdnUrl}/web/physx-js-webidl.js?v=1.0.0which resolves to
http://localhost:8080/web/physx-js-webidl.js.However, after running
bun run cdn:upandbun run dev, the CDN container (hyperscape-cdn) does not have a/web/directory. Runningdocker exec hyperscape-cdn ls /usr/share/nginx/html/shows only:No
/web/folder exists. The PhysX files are built correctly inpackages/physx-js-webidl/dist/(physx-js-webidl.js at 4.6MB, physx-js-webidl.wasm at 5.9MB) but are never copied to the CDN container.What I Tried
http://localhost:8080/web/physx-js-webidl.jsserves correctly andhttp://localhost:8080/web/physx-js-webidl.wasmdownloads successfully (5.9MB)Steps to Reproduce
bun installbun run cdn:upbun run devExpected
PhysX files should be automatically available in the CDN container after setup, and the game should load past 3%.
Setup completed
bun install✅packages/server/.envcreated ✅packages/client/.envcreated ✅bunx drizzle-kit push(tables created) ✅