Commit Graph

53 Commits

Author SHA1 Message Date
tfrere 013fb39fe4 feat: gamepad haptics engine, roller-mode ghost rigs, sound re-enable
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 10:18:07 +02:00
tfrere 183f99a40b feat: title menu revamp, vendored deps, ghost relay fix
- Title menu: split layout with live 3D duck (vitrine-style materialize
  shader), variant-tinted accents, unified boot spinner (assets + font +
  game core), duck hidden on narrow touch screens
- Audio: new WebAudio sound system (sweeps synced to the tron shader,
  per-prop pitch scaling) - shipped disabled via SOUND_DISABLED until the
  sound design is finished; HUD mute toggle commented out accordingly
- Supply chain: MuJoCo, onnxruntime-web and trystero vendored from npm
  instead of jsDelivr/esm.run CDNs (wasm assets bundled locally)
- Ghosts: explicit healthy Nostr relay list; the appId-seeded default
  subset had rotted (dead/blocking/rate-limiting relays), silently
  breaking peer discovery in prod

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 11:41:41 +02:00
RemiFabre 1261013e7e Fix broken and redirected repo links 2026-08-28 14:56:48 +02:00
drenayaz 10c600e54e add sit policy 2026-08-27 12:17:38 +02:00
drenayaz 4f5f26107d update colors 2026-08-27 11:58:52 +02:00
Coralie Deplanne 2462c70587 Update app/src/ui/Hud.jsx 2026-08-27 09:21:51 +00:00
tfrere 2276340406 fix: align colourway palette with website (yellow soles, purple mouth, gray brackets)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 02:36:50 +02:00
tfrere 836975ab63 chore: swap in updated alpha walking/stand policy checkpoints
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 20:09:06 +02:00
tfrere 0b7ab61c33 fix: smooth ghost playback for throttled peers
Receiver: per-ghost adaptive playback delay tracking the measured
snapshot arrival cadence (fast attack / slow release), floored at the
current 150 ms for healthy 15 Hz peers and slew-limited so rate changes
glide without popping; arrival stamps are de-jittered so bursty channel
delivery replays as motion. Sender: broadcast + stale sweep moved to an
inline Web Worker clock, exempt from the >=1 s hidden-tab timer clamp, so
backgrounded tabs keep sending at the nominal rate. Wire format unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 20:09:06 +02:00
tfrere b1fb1e6622 feat: mouse grab-and-drag perturbation (MuJoCo-viewer spring)
Pointer-down on the duck (or the live ball) grabs it: a three.js raycast
picks the body and a spring-damper force toward the cursor - projected on
a camera-facing plane, so lifting works - is written to xfrc_applied
every physics substep. Formula and gains mirror the native viewer's
mjv_applyPerturbForce (stiffness 100, damping sqrt(stiffness), scaled by
subtree mass). Orbit is disabled for the drag and restored on release;
grabbing detaches the chase cam; touch overlay untouched.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 20:08:52 +02:00
tfrere d5db286b9d feat: playable wheee - pentatonic pressure notes, clean release, jaw sync
LT pressure now picks the wheee note on a major pentatonic octave anchored
below the sample's natural pitch (playbackRate glide, constant gain); the
ride plays the loop segment directly so pitch responds from the first
frame. Release cuts the ride like the robot runtime (no end-segment
retrigger). Both triggers open the beak analogically (visual only). Also
fixes LT/RT trigger cross-talk on pads that mirror a combined trigger
channel, and prefers standard-mapping gamepads.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 20:08:41 +02:00
tfrere 61550fb935 fix: bust stale edge-cached bundle URL with new content hash
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 18:26:36 +02:00
tfrere c7276f3891 chore: force space rebuild
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 17:47:18 +02:00
tfrere 89f539959e feat: comic-panel HUD, runtime-faithful pad mapping, props + wheee voices
- HUD chrome reworked as comic panels: cream keyline frames with 1px ink
  inset, caption cartouches (NAV / SHOP / COLOR / MODE), inner glass
  padding and square gapped colour swatches
- drop the T relief toggle and B ball-respawn keyboard bindings; gamepad
  Y becomes HEAD mode, A ground pick, LT rides the looping wheee
- decor props row + CRT distortion pass, per-duck wheee voice sets,
  ground-pick and stand policies, updated robot meshes, title menu
  refresh; README controls updated

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 14:38:12 +02:00
tfrere fdc3820099 feat: real-size arcade cabinets + size-adaptive wireframe scan
Cabinets at their real-world 1.73 m height tower over the 0.25 m duck.
The materialization fx now scales with its target: band widths and
stripe wavelength grow linearly with the object's height, the timeline
by sqrt of it (capped), so big props scan as the same effect instead of
a fast flash with hairline bands. Duck and ball sizes are unaffected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 08:57:46 +02:00
tfrere 0a350b6b4f feat: relief as gentle slopes baked into the level itself
Replace the plateau boxes with a MuJoCo heightfield over the arena and
vertex displacement of the grid floor shader, both driven by the same
analytic cosine-bump function so physics and visuals are the same
surface. Raising/sinking ramps one scalar (hfield z-size + uTopoScale
uniform). Trigger still uncommitted: T key or rl.setRelief().

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 00:44:50 +02:00
tfrere f04c3a019e feat: arcade row moved to the front wall + toggleable relief terraces (prototype)
The three cabinets now face the player from the +X wall. New prototype:
four grid cells (two mirrored terraces) rise into plateaus on demand -
kinematically driven slide joints, contacts with the world excluded so
the buried boxes don't fight the floor, animated rise/sink at 0.25 m/s.
Trigger is deliberately uncommitted for now: T key or rl.setRelief().

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 00:27:33 +02:00
tfrere 5a6547cc18 feat: replace jukebox with a row of 3 arcade cabinets
New arcade.glb (from the user's FBX, texture downscaled to 1024, plus a
500-tri wire stand-in for the hologram pass). Three clones line up
against the back wall facing the arena, staggered in the ceremony, with
one static collision box covering the row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 23:50:43 +02:00
tfrere d202596c4c chore: final cutover to the Vite app
Move assets/, policies/ and robot/ into app/public/ (replacing the dev
symlinks), drop the legacy root sources (rl.js, index.html, modules) now
fully ported to app/src/, and switch the Space to the docker SDK serving
the built bundle on port 8080.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 17:13:53 +02:00
tfrere cf68a77fcd feat: static collision box for the jukebox prop
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 17:13:52 +02:00
tfrere 3570fe8425 feat: Vite+React+MUI+R3F app shell in app/ (framework-agnostic game core, zustand bridge)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 16:59:30 +02:00
tfrere 3ff9fc18a7 feat: jukebox corner prop materializing with the ceremony
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 16:09:21 +02:00
tfrere 0110fa1f33 feat: latch touch mode on first real touch, add ?touch=1 test hook
(pointer: coarse) misses DevTools device modes and hybrid laptops, so any
real touchstart now arms the thumbs permanently (title page hands the
proof to controls/touch.js via __microduckTouched). ?touch=1 forces the
overlay on any device for desktop testing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 15:55:53 +02:00
tfrere 55c1238fd0 feat: floating-stick mobile controls, always-on ball, lighter ball scan
- controls/touch.js: touch input source - floating analog stick (lower-left
  zone, base anchors under the finger), A = alternate kick, B = quack with
  held-beak jaw; shown on coarse-pointer devices only
- touch mode strips the HUD to Back + thumbs (no quickbar/mode/telemetry)
  and the title menu shows a stick/A/B tutorial variant (gamepad still wins)
- a ball is always in play: auto-spawned when the entrance or any respawn
  ceremony unlocks input; B now re-pops a fresh one
- ball scan FX reads a coarse geodesic stand-in (fxWireGeometry override)
  instead of the dense render sphere, and plays a touch slower

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 15:39:22 +02:00
tfrere 86cf11d975 feat: staggered reading-order entrance for the title page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 13:29:06 +02:00
tfrere 971176fc4f feat: single-page title menu, in-game quickbar and smooth ghosts
- welcome: one-page menu (vitrine brand lockup, landing-size h1,
  controls grid with pad variant), pre-boot spinner veil
- in-game: live colour + legs/rollers quickbar bottom-left, back
  button, big mode readout top-right, telemetry stack bottom-right
  (peers, speed, odometer, fps, ctrl rate)
- ghosts: snapshot interpolation at 15 Hz replaces the exponential
  chase (no more micro-stutter, background tabs degrade gracefully)
- modules landed with this batch: ceremony (entrance/respawn), fx
  (wireframe/glitch), controls stack, ball actor, comic stickers

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-21 13:27:38 +02:00
tfrere 2470ca0b6d feat: legs <-> rollers locomotion switch (M key / DpadUp hold)
Add the Microduck's wheeled skating variant alongside the walking legs:
- robot_allcollisions_rollers.xml + 5 new meshes (decimated to match the
  existing set) + kinematics_rollers.json for the render rig
- BEST_roller.onnx (Drive: velocity-tracking skating, 0.6 m/s) and
  BEST_roller_crouch.onnx (one-shot phase-driven crouch-glide on R/X);
  both share the legs policies' exact 61D obs / 14-action interface
- M (or gamepad DpadUp held ~1 s) toggles variants: swaps the compiled
  MuJoCo model+data, ONNX sessions and three.js rig wholesale; roller
  assets lazy-load on first switch (BIOS-style LOADING ROLLERS OSD) so
  the default boot is untouched, then stay resident
- passive wheel hinges synced to the rig so the wheels visibly spin
- roller command limits from the robot runtime (0.6/-0.5 m/s, +-1 rad/s);
  kicks/sit disabled in roller mode (hints fade), ball played by driving
- ghosts broadcast an optional locomotion flag; roller peers render with
  the roller rig when this tab has it, leg rig fallback otherwise

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 18:12:04 +02:00
tfrere a370543271 feat: sci-fi entrance - Tron grid draw-in and duck dissolve on entry
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:47:18 +02:00
tfrere edc4acec8d feat: BIOS boot replay on entry, VHS camcorder OSD telemetry
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 17:11:01 +02:00
tfrere ebd235f807 feat: trigger-only jaw, tactile leather ball material
- The jaw no longer flaps on mode changes, rolls, kicks or colour
  swaps: it is driven only by the analog gamepad triggers and the
  RT-edge quack (which keeps its flap). Ghost jaw sync is untouched
  since it broadcasts the same jawOpenNow value.
- The soccer ball gains a bump map derived from the same Voronoi panel
  construction (seams as soft recessed grooves plus a fine leather
  grain) and moves to MeshPhysicalMaterial with a touch of clearcoat
  for a waxed vintage look.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:51:49 +02:00
tfrere 2d0c5588ed feat: right-stick camera orbit with inertia, subtle Tron glow on grid
- Gamepad right stick orbits the camera around the duck through a
  smoothed angular velocity (exponential ramp in, ~0.3 s coast out), so
  motion eases instead of stopping dead. Vertical is flight-style
  inverted. Any deflection detaches the chase cam; R3 toggles it back,
  mirroring the C key. New RS/R3 HUD hints, README gamepad section
  updated.
- Grid lines (floor and arena walls) get a thicker antialiased core and
  a faint wide halo for a restrained Tron look, plus slightly brighter
  line color and opacity.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:46:11 +02:00
tfrere 96f54dea82 feat: redesign welcome modal with keycap control grid
Rebuild the welcome card for at-a-glance clarity: typographic identity
under the duck-head mark, a one-line value proposition, six keycap
tiles on an aligned grid (move cluster, kick A/E, roll, ball, camera,
reset), and a compact gamepad/ghosts row. Refined entry animation with
a gentle row stagger (reduced-motion aware), layered depth, and a
compact two-column layout on narrow screens; the card scrolls only as
a last resort on very short viewports.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:28:44 +02:00
tfrere 6cc4cc6f20 feat: simpler controls, post-kick grace, arena walls, true soccer texture
- Remap controls: left stick / A-D turn (strafe removed), Q/E kick
  left/right, R rolls, Space resets; HUD, welcome modal and README
  updated to match.
- Hold commands at zero for 20 control steps after a kick ends so the
  duck finishes the strike cleanly instead of instantly sprinting.
- Rebuild the ball texture per pixel as a spherical Voronoi over the 32
  truncated-icosahedron panel centers: large flat-edged black pentagons
  with thin seams and no pole special case.
- Enclose the play area in a 3x3 m arena of static box walls rendered
  with the floor's grid shader; the respawn watchdog now only fires if
  the ball somehow escapes the arena.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 16:15:10 +02:00
tfrere 6b3d5da93a fix: freeze chase-cam heading during rolls and kicks
The trunk tumbles through a roll (and shakes during kicks), so the yaw
extracted from its quaternion spins wildly and whipped the chase camera
around. The chase now lazily latches the last healthy yaw and holds it
for the whole one-shot; position/target easing still follows the trunk.
No timers: both one-shots deterministically hand back to walk, where
live yaw tracking resumes and the position lerp absorbs the small
heading correction. Measured over a full roll: 180 deg trunk-yaw
excursion, 0.2 deg camera azimuth swing.

Cache-buster bumped to 28.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:46:57 +02:00
tfrere 7b7c537426 feat: soccer-ball look for the kickable ball
Replace the beach-ball CanvasTexture with an equirectangular soccer
pattern: off-white base, a black cap at each texture pole (full-width
strips, dodging the equirect pinch) and two staggered rings of five
pentagons with 1/cos(lat) horizontal stretch compensation. Sphere
segments bumped to 48x32 and max anisotropy enabled so the pole caps
stay round up close.

Also set condim=6 on the ball geom: with the default condim 3 the
rolling/torsional friction coefficients were silently ignored and a
rolling ball never decelerated (verified: now 0.27 -> 0.001 m/s in 6 s).

Cache-buster bumped to 27.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:44:11 +02:00
tfrere bbe381e114 feat: kickable ball (B / pad Y) and detachable chase camera (C)
Ball: a light free sphere injected into the MJCF after the robot body
(keyframe qpos grown 21 -> 28, ball parked 50 m away by default). B or
gamepad Y pops/respawns it ~0.35 m in front of the duck with a small
jitter; a watchdog teleports it back when it rolls past the grid fade
(3 m); R re-parks it. Rendered as a procedural beach ball, local-only
(not shared with multiplayer ghosts).

Camera: chase mode on by default eases the camera behind the duck's
heading at the current orbit distance (wheel zoom preserved); dragging
detaches back to free orbit-follow, C toggles chase back on. HUD keycaps,
welcome modal and README updated; cache-buster bumped to 26.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:29:07 +02:00
tfrere ef74255166 feat: one-shot kick moves from the runtime's ball-kick policies
ball_kick_left/right.onnx (same 61-dim obs interface) run for a fixed
0.5 s window with zeroed commands, then hand back to walking - same
mechanics as the robot runtime. F on the keyboard alternates feet,
RB / LB on the gamepad pick explicitly. Kicks only launch from a
standing walk and are mutually locked with the roll.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:07:29 +02:00
tfrere 14440e0fbe fix: harden mode state machine + per-duck randomized chirps
State machine:
- sit/stand hand-over timers are now cancellable and cleared by every
  transition entry point (setMode, triggerRoll, resetSim); a stale 2 s
  stand-up timer could previously flip a sitting or rolling duck to the
  walking policy mid-motion
- resetSim cancels any roll in flight and pending timers, always lands
  on walk (R mid-roll no longer replays the roll on the reset duck)
- rolls only launch from a standing walk, not from a sit
- RT quack uses a Schmitt trigger (fire at 0.35, re-arm below 0.2):
  analog jitter around a single threshold caused multiple quacks

Sound:
- ship the runtime's four chirp voice banks (12 takes each); each
  colourway has its own duck voice and every quack picks a random take

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 14:02:45 +02:00
tfrere 201c372933 feat: duck-head modal logo, input lockout mid-roll, quieter quack
- welcome modal uses the site's duck-head mark (open variant on hover)
  instead of the wordmark sticker
- all movement/mode inputs are ignored while a roll is in flight; the
  existing deterministic completion check (tipped then upright, 3 s cap)
  releases the lock, no arbitrary timer
- quack.wav only plays on the gamepad right trigger; mode/colour changes
  keep the silent jaw flap

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:55:16 +02:00
tfrere ee2d470a87 feat: ZQSD turn keys + wordmark-only welcome modal
- physical A/D keys (Q/D on AZERTY) now turn instead of strafing;
  strafe moves to the physical Q/E row (A/E on AZERTY)
- welcome modal drops the floating duck sticker, keeps the wordmark

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:48:26 +02:00
tfrere ab9dec213e feat: modal logo artwork + sync colour variants from pollen site
- welcome modal now uses the Microduck sticker + wordmark press assets
  (LFS-tracked PNGs, signed like every other private-Space subresource)
- variants.js replaced with the site's 3d-module version: dedicated
  tongue/hips/sideShells slots, black leg motors, uniform yellow/orange
  shoe, and orange lower beak on the blue scheme
- swatches honour the per-variant swatch override (purple dot is purple)
- duck.js/variants.js dynamic imports reuse rl.js's ?v= cache-buster

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:40:59 +02:00
tfrere 3e94349c2c feat: show welcome modal on every load
Drop the localStorage first-visit gate: the modal now opens on each
startup and stays reopenable from the top-left brand.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 13:22:11 +02:00
tfrere 16963004d2 feat: welcome modal explaining the playground
Blurred-backdrop dialog shown on first visit: what runs in the browser
(MuJoCo WASM + ONNX policies), controls, gamepad and multiplayer ghosts.
Dismiss via button, Escape or backdrop click; stored in localStorage,
reopenable by clicking the top-left brand.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:36:45 +02:00
tfrere a8ad7ec412 feat: live multiplayer ghosts over WebRTC (Trystero/Nostr)
Every open tab broadcasts its duck pose (trunk + joints + jaw + colour)
at 10 Hz over WebRTC data channels with serverless Nostr signaling, and
renders other visitors as translucent ducks (capped at 3). Peers online
count shows in the telemetry line.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 12:11:30 +02:00
tfrere 2a64b171ba feat: per-key hint highlighting, no default forward command, rename roulade to roll in UI and internals
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 11:22:47 +02:00
tfrere a67f56b984 feat: HUD UX pass - state label with slot-machine roll, keycap hints, per-device highlighting, quack sound from the runtime
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 11:15:19 +02:00
tfrere 65860b2623 feat: gamepad support mirroring the robot runtime mapping
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:37:29 +02:00
tfrere ee81e70ae5 feat: one-shot roulade on Space with auto-return to walk, drop reset button
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:30:47 +02:00
tfrere 5937cda5be fix: propagate private-space __sign JWT to all same-origin requests
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:12:58 +02:00
tfrere 073d6283e9 feat: infinite shader grid, edge-anchored UI, drop hero title
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 10:06:57 +02:00