LineRage is an old-school browser line-racing game. It includes PeerJS-based online multiplayer via join links.
Enter a reproducible shell with Python, Node.js, Chromium, and Nix formatting tools:
nix developServe the editable development tree from static/:
nix run .#serve-dev
# or choose a port
nix run .#serve-dev -- 8080Build the packaged site:
nix buildThe build output contains the static site at result/share/linerage/.
Serve the Nix-built package:
nix run .#serve-built
# or choose a port
nix run .#serve-built -- 8080Run flake checks, including the direct P2P multiplayer configuration test:
nix flake checkOnline games use STUN to discover a direct WebRTC route between players. TURN relays are intentionally not configured: if direct connectivity is blocked, LineRage reports the failure instead of falling back to a high-latency relay.
LineRage retries failed direct connections with fresh ICE mappings, reconnects transient PeerJS signaling failures while preserving the room, and displays the selected candidate types, transport protocol, and live round-trip time in the lobby. A failed connection after all retries means the network does not offer a usable direct WebRTC path.
Public and managed Wi-Fi commonly enables wireless client isolation or blocks UDP hole punching. In those environments, use a hotspot or another network. VPNs, host firewalls, symmetric NAT, and disabled NAT hairpinning can also block direct connections.
Generate repeatable browser evidence for visual PRs against the Nix-built site:
nix run .#browser-smoke
# or choose an artifact directory
nix run .#browser-smoke -- artifacts/my-changeThe smoke test opens the built game in Chromium at desktop and mobile viewports, fails on browser console errors, horizontal overflow, or missing touch controls, and writes:
artifacts/browser-smoke/
desktop.png
mobile.png
metrics.json
console.json
Include the screenshots in PRs that change visible UI.