← Index
Source: docs/features/jayverse-game.md (auto-generated by scripts/generate-docs-html.mjs — edit the .md, not this file)

Jayverse — 3D market world: watch the payment agent (browser)

A walkable 3D street, rendered in the browser, whose protagonist is the autonomous payment agent. Each billboard is a Verex prediction market; on every tick the agent walks to a market and you watch it act — place a bet, or bounce off a barrier that names why it was refused. Two modes: synchronous (live) — watch the running agent in near-real-time — and replay — scrub a stored journal of what it already did.

Status: design draft for review, not built. Reframed (jay, 2026-09-07) from a player-trades-in-3D game to an agent visualization: the game renders the mandate console's journal in 3D. Supersedes the older Unity-first idea in game.md for the browser path. Service #5 in ../tasks/09-02-jayverse.md ("## 5. Unity"). Repo: jayverse-game; hosted inside the Rabbit portal — the real build is rendered in Rabbit's Game top-menu (/game) by importing this repo as a git submodule, and only after jay has tested it standalone first (jay, 2026-09-11). Rabbit imports, it doesn't contain.


Phases (build order)

Phase Focus What we implement
1 (MVP) Replay react-three-fiber street + market boards + agent character; bundled sample journal; timeline scrubber (play/pause/speed/step/drag-seek) + journal panel; buy pulses + labeled refusal barriers. Read-only, no backend.
2 Live (synchronous) useAgentJournal() delta-polling ?since=<cursor> of the running agent; enqueue + animate new ticks in near-real-time; poll-rate vs render-rate decoupling.
3 Polish (+ optional player-trading) six distinct refusal visuals; follow-cam; real low-poly city assets; optional player-trading layer wired through the wallet.

The settlement-flow visualization (§1b, added 2026-09-11) is a parallel track on the same engine — MVP as a stepped replay diagram, a live settlement feed later.


1. What we build (basic feature)

The game is a renderer of the agent's journal, not a new system. The mandate console already produces the data: a journal of ticks — most did nothing, six kinds of refusals, expiry, and cited evidence. The 3D street turns each journal row into something you can watch.

Spectator-first (decided at my discretion, jay's standing "decide at will", 2026-09-07): v1 the player is a spectator of the agent — watch live, or scrub replay. The player does not trade in v1. Player-trading (the old design) becomes a later optional layer, because letting the player trade dilutes the one thing this makes legible: watching autonomy operate inside its guardrails. This also keeps v1 read-only — no wallet, no signing, no way for the game to move money — which is a real safety and simplicity win.

Scope for v1: one straight street, ~6–12 boards, one agent character, both modes, a replay timeline + journal panel. No multiplayer, no player trading, no physics beyond walk-and-collide.


1b. Second feature — settlement visualized, entity by entity (jay, 2026-09-11)

Beyond watching the agent decide, a second visualization: how a payment actually settles, one entity at a time — the card-network flow (Visa / Mastercard) laid next to the on-chain flow, so you can see who does what between a user tapping "pay" and value landing on the blockchain.

Scope + look (jay, 2026-09-11): game style, not a flowchart. The view is a space scene — each entity is a planet, and a spaceship flies planet to planet as the payment settles, step by step (read-only, like the agent replay). A steps list up top shows what the user feels, with the step being done highlighted; click a planet for its trust + failure. The demo is a concrete PoCMina buys a $20 hoodie from an online store (the merchant) — with an EN / KO toggle (bilingual, like the rest of Rabbit). A live feed from a real Verex settlement is a later step.

How it's reached — a warp gate, and a host (jay, 2026-09-11). Not a separate page: the agent street doubles as the gate page. A human host named Jay (a proper walking figure — head, torso, waving arm, legs) stands at the entrance, bobbing and waving; his dialogue shows on a fixed board at the bottom of the street UI (large, readable), while the balloon over his head only shows "blah blah blah" chatter — so the words never get tiny in 3D. The street has two figures, Jay and the agent. A glowing gate at the far end plays a short "space jump" into the settlement space; to return, the settlement space has a wormhole tunnel back to the street (and a ← Back button). A standalone /settlement route exists for isolated testing.

Status — built standalone, awaiting review. Implemented in jayverse-game (pnpm dev :3050): components/{SettlementFlow,Gate,SpaceJump,Jay}.tsx + lib/settlement.ts, wired into the street via Scene/GameClient (SettlementFlow is the space/planets/spaceship scene with the return tunnel). Type-checks and builds. Not yet imported into Rabbit's Game menu — that happens as a git submodule only after jay tests and approves it. Cooperates with the Verex risk/settlement split, x402 facilitator cards, stablecoin-visa-card, and two-currencies-one-ledger.


2. User scenario (prose)

Replay (the demo-safe path). Mina opens the portal and clicks "Watch the agent." A 3D street fades in with a timeline scrubber at the bottom. She presses Play. The agent character walks to the first board — "Will ETH close above $4k this week?" — glances at it, and walks on: the journal panel on the right reads "tick 14 — no action (no fresh evidence)." At the next board it stops and buys; an action animation plays, the board's spread widens, and the panel shows "tick 15 — bought 24 YES @ 0.44, evidence: 'ETF inflow' (Reuters)." Further down, the agent walks up to a market and hits a red barrier stamped "budget exhausted"; the panel shows the same refusal with the enforcer's reason. Mina drags the scrubber back to re-watch that moment, then speeds the replay to 4× to reach the expiry tick — where the agent is refused after the mandate expired, nobody having revoked anything.

Synchronous (live). With the backend up, she flips to Live. Now the street shows the agent acting in near-real-time: as each tick fires on the server, the character walks and acts within a second or two. It's the same scene, driven by the running agent instead of a recording.

She never signs anything. She's watching an autonomous agent spend within a mandate — and seeing, spatially, how often it doesn't.


3. The two modes

Mode Data source What you see Best for
Synchronous (live) poll the running agent's journal API for new ticks (delta polling, §5) the agent acting in near-real-time as ticks fire on the server "it's really autonomous, right now"
Replay load a stored journal once, scrub locally play / pause / speed / step a timeline; a side panel shows the journal row (evidence + refusal reason) for the current moment demos, teaching, always works (no live backend)

Why replay is the default demo mode: it reads a stored journal, so it is deterministic and has zero live dependency — no anvil, no verex API, no scheduler. This directly answers the Cloud Run limit we hit on the live console (CPU sleeps between requests, the scheduler can stall). Live mode is the impressive version when the backend is up; replay is the one that never breaks in front of an audience.


4. User journey (ordered steps)

  1. Portal link — Rabbit /game card: "Watch the payment agent."
  2. Load — Next.js page mounts the R3F canvas; a loading screen while assets + the journal (or first live snapshot) stream in.
  3. Pick modeReplay (choose a saved run) or Live (if a backend is configured).
  4. Watch — the agent character walks the street tick by tick; boards render live/last bid/ask.
  5. Read — the journal panel tracks the current tick: action or refusal, the cited evidence, the enforcer's reason. In replay, this is synced to the scrubber.
  6. Scrub / speed (replay) — drag the timeline, step tick-by-tick, change speed to reach a moment of interest (a refusal, the expiry tick).
  7. Switch modes — flip Live↔Replay without leaving the scene.
  8. Leave — back to the portal. Nothing is signed; no state is written by the game.

5. How to implement it (the core ask)

Renderer: react-three-fiber / three.js in a Next.js page

Recommended primary path — it is the browser, and it lives in the portal we already ship.

Alternative: Unity → WebGL export

Keep as a fallback / "if we want richer game feel later."

Decision: start with react-three-fiber for the MVP; revisit Unity only if the game ambition outgrows what three.js comfortably renders.

Data flow — read-only, two modes

The game only reads the agent's journal; it never drives the agent and never signs anything.


6. Cooperate with existing services


7. Implementation sketch + open questions

Sketch

Performance

Weekend MVP vs later

Open questions

  1. Camera — follow-cam on the agent vs free spectator orbit for v1? (Leaning: follow-cam with optional free-look.)
  2. Journal API shape — do the existing agent endpoints already support ?since= (delta) and ?run= (a stored run), or do those need adding? This is the one real dependency to confirm.
  3. Where replays come from — are journals persisted per run already (DB), or does replay need a save-a-run step first?
  4. Board quotes in live mode — poll Verex for a few in-view boards, or just render the journal's recorded quote to stay fully read-only?
  5. Asset licensing — buy a low-poly city kit vs build; size budget (target a few MB).
  6. Repo boundary — R3F scene as an npm package Rabbit imports, a submodule, or a proxied route?
  7. Player-trading later — if/when added, is it a distinct mode or a toggle within the live view?

Chainlink's oracle stack is settlement-rail infrastructure this build would consume, not reimplement — see the umbrella map in README.md.

Deliberate non-use — the world state. The game is a read-only visualization of real chain state (both modes), so most of it needs no oracle at all — it reads what already happened; it doesn't price or resolve anything.

Every feed is a dependency with a failure mode — keep the "if wrong / late" guard in code, not only here.