Bifrost
A competitive Breakout/Pong arena used to demonstrate rollback peer-to-peer sessions in a browser-friendly stack. Small scope on purpose: if netcode is wrong here, it will be wrong everywhere.
The improved Bifrost tree lives in this monorepo as web/bifrost: an independent Compose stack (not embedded in the Arathyll nexus). Production serves bifrost.arathyll.com; local preview uses http://127.0.0.1:1334.
Approach
- Deterministic simulation core (
bifrost_sim): fixed-point arena state, replay codes, checksums; separate from Bevy rendering. - GGRS rollback via
bevy_ggrs+ Matchbox WebRTC transport; inputs predicted locally, corrected when authoritative frames arrive. - Ephemeral private rooms: no accounts, no match database; host/guest tickets expire automatically.
- Live inspector: RTT, input delay, rollback depth, and checksum on the hosted demo.
Why it matters for clients
The same patterns apply to larger titles and to distributed systems that need agreed state under delay: deterministic simulation, input queues, snapshot diffing, and correction. Bifrost is the reference we can walk through in an interview or architecture review.
Try it
-
Play in Lab
Create room, play bot, or open the inspector (signals via
PUBLIC_BIFROST_ORIGIN). -
Source repository
Independent Compose stack for the Bifrost client and signal server.
-
Production host
bifrost.arathyll.comafter VPS cutover. -
Betwixt Engine
Where these ideas graduate to full-game scale.