| name | verify |
| description | Launch Ο ΝΟΣΤΟΣ in headless Chromium and drive it via the __nostos debug handle |
Verifying the game
Zero build step. Serve the repo root over HTTP and open it in a browser.
Gotcha: three.js CDN
index.html pins three.js from cdn.jsdelivr.net, which sandboxed egress
policies may block. Fix: npm install three@0.164.1 (registry.npmjs.org is
usually allowlisted), then have your test HTTP server rewrite the importmap
URL in index.html to a locally-served /three.module.js
(node_modules/three/build/three.module.js). Do NOT edit index.html itself.
Launch (Playwright)
const browser = await chromium.launch({
executablePath: '/opt/pw-browsers/chromium-1194/chrome-linux/chrome',
headless: true, args: ['--use-angle=swiftshader','--no-sandbox'] });
WebGL works under SwiftShader. Capture console type=error and pageerror —
a shader compile failure only shows up there.
Drive it
Wait for window.__nostos, then localStorage.clear() and click #startBtn.
The __nostos handle exposes: player, boat, flags, cyclops,
sheepList, heightAt/groundAt/resolveCollide, setTod(v) (0..1 day time),
petSheep(i), talkTo(id), update(nFrames, dt) to step the sim
deterministically, and input().keys — the LIVE keys object, so
keys['w']=1; update(120,1/60); keys['w']=0 walks the player.
Movement is camera-relative (camYaw=-0.35): 'w' moves (0.343,-0.939),
'a' moves (-0.939,-0.343) — compensate when aiming at a doorway.
Useful flows: sheep quest (petSheep then stand near pen PEN_C, sheep pens
within r=6), boat (flags.hasBoat=true; boat.onBoat=true, teleport boat.x/z),
cyclops catch (place player inside vision cone, awake, on island 1).
Terrain is fully deterministic (heightAt); prop placement is Math.random.