NEONGRID
a serverless p2p light-cycle arena — this page is also the git repo.
Clone
This site serves the repository over git's dumb-HTTP protocol as plain static files (it's hosted on IPFS — there is no git server here, or any server at all):
git clone https://git-game1.ardegazu.ro/neon-grid.git
cd neon-grid
What it is
Tron-style multiplayer for up to 16 riders. Everyone rides a light cycle on a shared 128×96 grid, leaves a solid trail, and the last rider alive wins the round; first to 5 rounds takes the match. Installable PWA — works saved to an iOS home screen, safe-area aware, tap-to-steer on phones.
How it works
- No game server. Browsers meet through a blind WebSocket
relay and form a full WebRTC mesh. The room secret lives in the URL fragment
(
#…); the relay only ever sees a one-way HKDF room id. - Everything is end-to-end encrypted. Signaling payloads and
every game frame ride the sueta
p2p core (
client/src/lib/, copied unchanged): per-sender AES-256-GCM keys, structurally nonce-safe sealing, perfect negotiation, ICE-restart recovery, TURN with ephemeral credentials. - One peer is the referee. The lowest peer id runs a fixed-rate authoritative grid simulation and broadcasts ~40-byte tick deltas; everyone else renders from them. Host loss mid-round voids the round and the next lowest id takes over; late joiners get a run-length-encoded snapshot and spectate until the next round.
- Hosting without an origin server. The client is a static Vite build pinned to IPFS, served through an HTTPS tunnel that is deliberately never connected — its "offline page" is the game. This page you're reading works the same way.
What's in the repo
client/src/game/ — the game
TypeScript, no framework: typed wire protocol, host simulation, canvas renderer (neon trails, derez, particles), WebAudio bleeps, lobby UI.
client/src/lib/ — the p2p core
sueta's reusable app-agnostic stack, vendored unchanged. If you want to
build your own p2p app, start from its README.md.
deploy/ — the publish pipeline
publish-repo.sh builds this very site: landing page + bare
mirror exploded to loose objects (IPFS gateways and git's dumb-HTTP protocol
agree on "every path must exist"), with an anonymity gate that refuses to
publish identity-bearing bytes.
Run it yourself
cd client && npm install && npm run dev # :4173
# open two tabs on the same #room URL and play yourself
Deploy: npm run build, then publish client/dist/ as
static files anywhere — IPFS, a CDN, a folder behind nginx. It needs nothing but
a signaling relay it's allowed to talk to (see src/game/config.ts).
Guarantees & limits, honestly
- The relay operator sees connection metadata, opaque room ids, and frame sizes/timing. Not content, not nicknames, not who won.
- Anyone with the room link can join and play — capability model. The room cap is 16 riders.
- The host referee is one of the players; a cheating host could lie about the simulation. Between friends that's the same trust as hosting a LAN party. Inputs from non-host players can't forge anyone else's moves.
- MIT licensed. Built on WebRTC, WebCrypto, canvas, and IPFS.