> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leverine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Project CARVE — VR surf game plan

> CARVE — a VR surf game, currently pre-release. This is its plan of record.

# Project CARVE — VR surf game plan

*Working codename only. Written 2026-12-03, Kev + BBv2. Physics targets from the Source-engine research report (\~/workspace/research\_notes/source-engine-surf-physics-20261204-0406/report.md).*

## The idea in one line

Counter-Strike-style surfing — sliding on steep tilted planes, building speed by strafing into the ramp — rebuilt natively for VR on the WebXR stack, with the Source movement *feel* reimplemented clean-room from the published math. Original name, art, theme, and courses. Sold direct through Leverine’s own stack (Paddle + Leverine Licensing), no store cut, no store review.

**This is an art project that happens to be a game** (Kev’s direction, 2026-12-03). The physics is the instrument; the work has to be beautiful and strange in its own right, the way the vertigo pieces are. Art direction and performance engineering are first-class sections of this plan, not polish phases.

## Why this can work

* The mechanic has a 20-year cult following and **no faithful standalone VR version exists**. The only VR surf today is VRChat worlds (one popular world: \~22,700 visits, \~2,100 favourites) — proof of demand inside VR, with no product serving it.
* The closest commercial VR title, Jet Island (frictionless hoverboard sliding, \$19.99, \~96% positive), proves frictionless speed sells in VR — but it has no air-strafe physics. The skill-based surf feel is unclaimed.
* The physics is small and fully understood (below). The moat is feel + courses + community, not engine size.

## The physics (the whole game — get this exactly right)

Simulation runs in Source-style units internally (1 unit = 1 inch at character scale) at a **fixed 100 Hz tick**, decoupled from rendering. All tuning constants are cvars (see Console).

Core loop, per tick (from the research report):

* **Accelerate / AirAccelerate** (shared shape): `currentspeed = velocity · wishdir`; `addspeed = wishspeed − currentspeed`; if `addspeed ≤ 0`, no gain; else `accelspeed = min(accel × wishspeed × dt × surfaceFriction, addspeed)`; `velocity += accelspeed × wishdir`. Only the *projection* along the wish direction is ever capped — total speed never is. That single fact is why surf speeds explode.
* **Air cap:** in air, the wish speed used for the *cap check* is `min(wishspeed, 30)` — the famous 30 u/s — while the acceleration term still uses the uncapped wish speed. Reproduce this quirk faithfully; it’s the feel.
* **Friction (ground only):** `control = max(speed, stopspeed)`; `drop = control × friction × dt`; velocity scaled by `(speed − drop) / speed`. Tick order matters: on ground, Friction then Accelerate; in air, half gravity → AirAccelerate → move → half gravity.
* **Why ramps surf:** a surface counts as ground only if its plane normal `z ≥ 0.7` (≈45.6°). Steeper than that, the player is *airborne* as far as the sim is concerned — friction never runs, air acceleration does, and ClipVelocity deletes only the into-plane velocity component (`v − n(v·n)`, overbounce 1.0), so gravity’s pull converts into along-ramp speed. Holding the strafe key *toward* the ramp applies the capped air push that keeps you on the face. Usable ramp window ≈46–68° at 66 tick, ≈75° at 100 tick — course design lives inside that window.
* **Reference values:** CS:GO defaults — gravity 800, friction 5.2, accelerate 5.5, airaccelerate 12, stopspeed 80. Surf-server canonical (SurfTimer) — airaccelerate 150, accelerate 10, maxvelocity 3500/axis, autobhop on, stamina off. Community airaccelerate range 100 (hard) → 1000 (extra easy) — that’s our difficulty dial.
* **Scale feel:** 250 u/s ≈ 22.9 km/h; 1,000 u/s ≈ 91 km/h; gravity 800 u/s² ≈ 2.07 g. Player hull 32×32×72 units, eye at 64.
* **Bhop:** re-jumping within one tick of landing dodges friction entirely — keep it, it’s part of the discipline. Autobhop available as an accessibility default (Kev’s call in settings, on for VR comfort).

### Testing the physics (standing discipline, Kev’s requirement)

“Sound” means *proven*, continuously — not “felt right once”:

* The sim is deterministic and headless-testable: same inputs + same cvars → same trajectory, bit for bit. Every build runs the sim test suite before it ships anywhere.
* **Golden trajectories:** scripted input sequences (held strafe on a reference ramp, flat bhop chain, free-fall) whose resulting speed/position curves are pinned. Any change to the movement code that moves a golden curve fails the build unless the change was deliberate and the goldens re-blessed with a note saying why.
* **Closed-form checks:** the research gives us predictions to test against — e.g. ideal-strafe speed growth `v ≈ √(v₀² + 900 × tickrate × t)` in the cap-limited regime, and the per-tick offer `airaccelerate × 250 / tickrate` in the accel-limited regime. The sim must match the math it claims to implement.
* **Feel checks on hardware:** numbers alone don’t ship it — each physics change also gets ridden in the headset by Kev before it becomes the reference build. Both gates, every time.

## Art direction: the limitation is the style

Kev’s reference is *Shadow of the Colossus* on the PS2: a machine far too weak for the game, and developers who turned that weakness into the look — fog that hides the draw distance becomes dreamlike emptiness; shell-rendered fur, staggered update rates, fake-HDR bloom, and vast scale carried by light and silence instead of polygon counts. The Quest is our PS2: a phone GPU in a hot plastic shell. Same discipline:

* **Design the world out of what the hardware does well:** enormous simple geometry, sculptural ramps, one strong light, fog and height haze as composition tools — not as apologies. Emptiness and scale are the aesthetic; density is the enemy anyway at 300 km/h, where nobody can read detail.
* **Performance budget is a design document, not an afterthought:** a fixed frame budget (target the headset’s native rate and hold it), a per-course triangle/draw-call ceiling, and a rule that any visual feature that costs the frame must argue its way in. A dropped frame at surf speed isn’t a stutter, it’s a stomach event — frame rate *is* game feel here.
* **Stagger everything that can be staggered:** remote players’ animation, cosmetic particles, and world dressing update at divided rates (the SotC trick); the local player’s sim never shares a budget with anything.
* **Sound carries what polygons can’t:** wind as the speedometer your ears read, exactly as Threshold’s audio carries its dread. Procedural wind tied to true airspeed is both art and instrument.
* This is **ongoing**, not a phase: every chunk of work states its frame cost, and the budget is re-argued as the game grows.

## Controls — two full schemes (Kev’s requirement)

**A. Body controls (VR-native, default):** - Lean left/right (head + torso) = strafe into the ramp. Lean gain is a cvar. - Gaze = the mouse: where you look is the wish direction. - Crouch = tuck (lowers hull, small speed bonus on flats); stand tall = scrub speed. - No buttons required. Playable with zero controllers.

**B. Original controls (classic surf inputs):** - Left thumbstick X = A/D strafe; head = mouse, exactly like the original. - Trigger or A button = jump (bhop timing preserved); stick sensitivity and deadzone are cvars. - Fully playable with ONE (left) controller — a hard requirement, not a stretch goal, since that’s the controller Kev has.

Both schemes feed the *same* wishdir/wishspeed inputs into the same sim. Nothing about the physics changes between them; leaderboards don’t separate them (the surf community never separated mouse models either — revisit if it becomes a fairness argument).

## Combat — melee only (Kev’s requirement)

No guns. Players carry a **knife or a stick**, and combat happens at surf speed, which makes it a *timing* discipline:

* At 500–1,500 u/s, two riders crossing get a contact window measured in tens of milliseconds. A hit is a joust: one swing per pass, and the skill is reading closing speed and swinging *early* — the same read-and-commit skill as the ramps themselves. Missing means carrying your speed past and setting up another pass.
* **Knife vs stick is the one equipment choice:** knife = short reach, fast swing, quick recovery; stick = long reach, slow committed swing, a whiff leaves you open for the return pass. Nothing else differs — no damage stats, no upgrades. Timing is the whole game.
* In Body controls, the swing is a real arm motion (controller or hand-tracked arc); in Original controls, it’s a button with the same timing window. Same window either way — the input differs, the discipline doesn’t.
* Hits are judged by the server in online play (it re-simulates the pass), so a kill is a witnessed fact, not a client’s claim.

## Game modes (Kev’s requirement)

* **Race** — the classic formats: linear courses (start to finish, one run) and staged courses (checkpoints, per-stage splits). Times stamped with cvar set + tick rate.
* **Challenge** — curated skill tests: speed gates (cross this line above 1,200 u/s), no-touch runs, knife-only target passes, the vertigo set (courses built over drops for the brace response).
* **FFA** — open arena surfing with melee: a bowl of ramps, everyone sliding, jousting passes, first to N tags or timed most-tags. Respawn keeps your entry speed low — speed is earned, never given, even here.
* **Free ride** — no clock, no score; the art piece mode. Ride the world at dusk, wind and geometry. (Every art game needs a room where nothing is asked of you.)
* Later, if the community asks: team FFA, course-of-the-week, ghost racing against friends’ recorded runs.

## Console + cvars (Kev’s requirement)

A Source-style drop-down console (summoned as a panel in VR, `~` on flat screen) with a real cvar system:

* **Player cvars:** `sensitivity`, `lean_gain`, `stick_deadzone`, `vignette_strength`, `autobhop`, `speedometer` (off/HUD/wrist), `fov_kick`, `swing_window` (practice only).
* **Physics cvars (local play / own server):** `sv_gravity`, `sv_airaccelerate`, `sv_accelerate`, `sv_friction`, `sv_maxvelocity`, `sv_stopspeed`, `tickrate` (display-only once a run starts).
* **Server cvars** are set by the server in online play and locked client-side — same trust model as CS. Runs are stamped with the cvar set + tick rate so times stay comparable.
* Config files persist per player (`carve.cfg` style), because surfers live in their configs.

## Online (Kev’s requirement — planned from day one, built in phase 2)

* The sim is a **pure, deterministic, fixed-tick module** shared verbatim by client and server (TypeScript, no rendering dependencies). This is the single most important architecture decision in the project — it’s what makes the Source model possible here, and it’s what makes the golden-trajectory tests possible at all.
* Dedicated servers, CS-style: a small Node process runs the authoritative sim; clients predict locally with the same module and reconcile against server snapshots. Server browser + direct connect by address; a Leverine-run lobby server later.
* Transport: WebSocket for the prototype era; WebTransport/UDP-style datagrams evaluated at phase 2 (browser support on Quest is the constraint, checked then).
* Anti-cheat posture: server validates inputs and re-simulates; times (and melee hits) signed by the server that witnessed them. Keep it proportionate — this is a skill toy, not an esport.

## Staying legal (from the research)

* The Source SDK license allows its code to be used **only** for free mods of Valve games — a commercial standalone game **cannot ship Valve movement code**. We reimplement from the published *math* (formulas and constants above), which is what this plan does. No Valve code, assets, maps, names, or branding anywhere near the project.
* Game mechanics and methods of play are not protected by copyright (US Copyright Office, §102(b) line of cases) — the *feel* is free to chase; the *expression* must be ours. Patents were not searched; flag for a proper look before any commercial launch.

## Theme — Kev’s open decision

The physics doesn’t care what it looks like. Candidates:

1. **Abstract sky** (BBv2’s recommendation for the prototype): floating ramps in impossible skies — the classic surf-map aesthetic, cheapest to build, instantly readable as “surf,” and legally the cleanest. Speed and geometry are the art.
2. **Alpine snowboard**: the mainstream-friendly skin; same physics, board under your feet as a comfort anchor. A reskin, not a rebuild — can come after the feel is proven.
3. **Neon void**: synthwave data-stream world; cheap, pretty, very Quest-friendly performance.

Recommendation: prototype in abstract sky, decide the shipping theme after the first course *feels* right. Note the art-direction section above constrains whichever theme wins: fog, scale, one strong light, emptiness over density.

## Roadmap

* **P0 — Prototype (next):** one valley course (3–4 ramps inside the 46–68° window), fixed-100 Hz sim, both control schemes, speedometer + timer, console with the player cvars and the physics cvars live-tweakable, sim test suite with the first golden trajectories. Success = Kev stands in the headset and says the slide feels like surf.
* **P1 — Feel pass + content:** tune against reference numbers with Kev riding; second course (a “stages” course and a linear course — the two classic surf formats); landing/reset polish; comfort options pass; frame-budget audit on real hardware.
* **P2 — Combat + FFA:** knife and stick, jousting passes, one arena bowl, FFA scoring — local bots or splitscreen-style targets first if online isn’t ready.
* **P3 — Online:** dedicated server + prediction, 2–4 riders, server browser, witnessed times and hits.
* **P4 — Community:** course editor, ghost replays, leaderboards per cvar-set, challenge mode content.
* **P5 — Sell it:** Leverine Licensing keys + Paddle checkout on leverine.com; price in the Jet Island neighbourhood (\~\$14.99–19.99) once content justifies it.

## Theme brief — the data-stream world (Kev’s pick to explore, 2026-12-03)

Kev’s reaction to the first concept image settled the exploration order: the data-stream world leads, the other themes stay as fallbacks. His own reference points, named: **NiGHTS into Dreams** (Sega Saturn — flying flowing courses through dream space) and **Rez** (Sega Dreamcast/PS2 — flying through the inside of a computer system; *Rez Infinite* later became a VR classic, which is direct evidence this aesthetic works in a headset and sells).

**What the world is:** you surf the inside of a vast machine. Courses are channels of flowing light — data streams rendered as rivers and rapids. Some courses run across open “motherboard plains” (chip towers, capacitor pillars, trace-lines as terrain); some dive through the machine’s innards (bus canyons, memory-stack towers, cooling dark). The void between structures is true black with haze — the Colossus emptiness, recoloured.

**Visual rules (these double as the performance budget):** - Geometry is huge and simple: ramps, slabs, towers. Nothing small exists, because at speed nothing small can be read. - Light is information: the stream’s flow direction shows the course line; brightness and particle speed show *your* speed before the speedometer does. A stream that runs uphill is a warning; a confluence means a junction. - Two accent colours only (cyan for the course, magenta for danger/other riders) over indigo-black. Restraint is the brand. - Fog is depth, not cover-up: courses are composed so the next ramp *emerges* from haze — discovery at speed is the core visual pleasure, straight out of the Colossus playbook.

**What a run feels like:** drop in at the top of a stream, carve its banks as the flow quickens, the wind rising with true airspeed, chip towers leaning over the channel, other riders as magenta streaks crossing your line — and in FFA, a stick swinging out of the light as someone takes the inside pass.

**The honest fidelity split (shown to Kev as images, 2026-12-03):** concept art is the *target feeling* — painterly haze, dense particles, cinematic scale. The actual Quest render will be visibly simpler: flat-shaded low-poly ramps, plain dark background, fog close-in, a board tip and a speed number. The design rule that follows: **the game must look good at the honest fidelity, not at the concept fidelity** — if a course only works with dense particles and soft light, it doesn’t work. The concept art is for the store page and the loading screen; the flat-shaded look is the game, and it’s designed to be beautiful on its own terms (Rez shipped wireframe-flat and is considered gorgeous).

## Open decisions for Kev

1. Theme for the shipping game (prototype proceeds in abstract sky regardless).
2. A real name (CARVE is a codename; “Carve” itself is likely too generic/taken to ship under — name hunt is a P1 task).
3. Autobhop default in Body controls: on (comfort) or off (purity)?

***

*Source: Leverine/Leverine-Carve\@99bba88 — `PLAN.md`.*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.