Spaces:
Paused
Paused
Commit History
18 days ago
-
feat(web): add view-only mode and a Hugging Face Space deployment
Hosting the dashboard publicly means every visitor shares one game, and control commands are unauthenticated POSTs. --view-only rejects /api/cmd/* with 403 and the page disables the shared controls, while per-viewer view options (view mode, time of day, grid, camera follow) keep working. The Dockerfile builds the binary, bakes the root checkpoint into the image and serves on port 7860 with --view-only, sized for the free CPU tier (LAYA_THREADS=2). The README gains the Space config header and the deploy steps. The event stream sends X-Accel-Buffering: no so proxies pass it through unbuffered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>634fb2d
21 days ago
-
Add obstacles, multiple foods and a real-time 3D (Three.js) view
Game rules: - Several foods on the board at once (5 by default, 1-12, `foods/<n>` command); eating one spawns a replacement so the count stays constant. - Rock obstacles on ~5% of cells each round, generated so every free cell stays connected, two cells off the fence, apart from each other, and clear of the spawn lane. Hitting a rock ends the round ("rock" cause, counted separately). `obstacles` command / `O` key toggles them. - "Closer to the food" in the model prompt now means a shorter path to the nearest food around rocks and the body, not straight-line distance. Default board is 32x20. Browser dashboard: - Page split into index.html, css/dashboard.css and ES modules under js/, compiled into the binary; web.rs serves them plus optional /assets/* (GLB models) read from disk. - 3D and Realistic views render a WebGL miniature garden with Three.js r170 (vendored, MIT): a skinned, rigged snake whose bones are laid along the server's smoothed path each frame, sleeping rabb…38cd66a