Files
rolld/frontend
kerboul 32becc12f9 feat: free-roam mode + fix multiplayer sync + remote player polish
Backend (ArenaRoom.js):
- Strip race state machine (lobby/countdown/playing/round/qualify). Persistent
  "playing" phase, no rounds, no checkpoints. Free-roam multi.
- Spawn lowered to y=1.5 (was 5) + MIN_DIST raised to 5 (was 3) to avoid
  ejecting overlapping players at connect.
- Schema kept intact (handshake-safe); deprecated fields default-valued.
- npm run schema:gen wired (anti-drift codegen).

Unity client:
- C# schema generated by schema-codegen into RolldSchema namespace
  (Generated/GameState.cs, Generated/Player.cs). NetworkSchema.cs removed —
  handshake no longer scans global namespace.
- NetworkManager: typed Room<GameState>, callbacks rebound, seeds players
  already in room on join.
- RemotePlayerController:
  * Post-spawn 1.5s grace window (BumpReady) — local PlayerController.HandleBump
    ignores remotes during grace.
  * Solid SphereCollider disabled during grace, re-enabled afterwards — fixes
    the kinematic-vs-dynamic eject when a new client spawns inside someone.
  * NPCBall prefab material switched from invisible-in-URP Default-Material to
    BallShader.shadergraph.
  * TrailRenderer added, tinted with player's chosen color.
  * Name label distance-scales (1x-8x) so pseudos remain readable far away.
- GameHUD: OnGUI emptied — race UI (rounds, mode, timer, playersAlive) gone.
- GameCanvas.jsx: BUILD_PREFIX/VERSION bumped for cache-bust.

Frontend WebGL build (pretty_build): final build with all the above.
2026-05-20 12:25:48 +02:00
..

ROLL'D — Frontend

Client web pour le jeu ROLL'D. Héberge le build Unity WebGL dans une interface moderne.

Stack

  • React 18 + Vite 5 — build rapide, HMR
  • Tailwind CSS 3 — styling utility-first
  • Unity WebGL Loader — intégration du build Unity

Quickstart

npm install
npm run dev      # http://localhost:5173
npm run build    # production build → dist/

Unity WebGL Build

Placer le build Unity dans public/unity-build/ :

public/unity-build/
├── Build/
│   ├── build.data.gz
│   ├── build.framework.js.gz
│   ├── build.loader.js
│   └── build.wasm.gz
└── TemplateData/  (optionnel)

Docker

docker build -t rolld-frontend .
docker run -p 80:80 rolld-frontend

Structure

├── public/
│   ├── unity-build/     # Build WebGL (non versionné)
│   └── favicon.svg
├── src/
│   ├── components/      # Composants React
│   ├── assets/          # Images, fonts
│   ├── App.jsx
│   └── main.jsx
├── index.html
├── tailwind.config.js
├── vite.config.js
└── Dockerfile