Aakib Ansari.
Back to articles
Hands-on TestTested live

I Asked Meta Muse Spark 1.3 to Build a 3D Car Racing Game — One Broken Road Bug, Fixed on Prompt Two

Md Aakib Ansari
Md Aakib AnsariWeb Developer & AI Tools Reviewer
Updated •8 min read•Model: Meta Muse Spark 1.3•Company: Meta
I Asked Meta Muse Spark 1.3 to Build a 3D Car Racing Game — One Broken Road Bug, Fixed on Prompt Two

I gave Meta's flagship model Muse Spark 1.3 our standardized vehicle benchmark: build a complete, 3D closed-loop car racing game in Three.js inside a single self-contained HTML file, complete with elevation turns, realistic vehicle acceleration and steering feel, 12 anti-cheat checkpoints, a chase camera, and AI opponents.

Running in xhigh effort mode, the test hit a classic 3D geometry snag on its first pass: the game booted up, the cars spawned, and the red-and-white rumble barriers were floating in place, but the road surface itself was completely missing, leaving the cars driving across raw green grass. When given a single four-word correction—"no road fix it"—Muse Spark 1.3 immediately identified the spline vertex strip winding issue, rewrote the stripGeometry() generator with double-sided materials, and returned a fully playable 715-line (35.8 KB) arcade circuit racer dubbed Turbo GP 3D.

What I asked for

I ran the verbatim Test 3 prompt from our hands-on benchmark suite:

Raw Prompt (Unedited)
Skip to clean version ↓

You are an expert Three.js game developer.

Create a complete 3D car racing game in ONE SINGLE HTML FILE.

IMPORTANT:

  • Output ONLY one file: index.html
  • All HTML, CSS, and JavaScript in this single file, no external assets, no frameworks.
  • Use Three.js from CDN. You may use Cannon-es or a similar physics library from CDN if needed for realistic vehicle physics.
  • Must run by double-clicking index.html.

TRACK:

  • A closed-loop 3D race track with at least 2-3 turns and some elevation change (not a flat oval).
  • Clear visual track boundaries (barriers, rumble strips, or edge markers) so the player can tell where the track ends.
  • At least one checkpoint system so lap completion can be verified (not just "cross the start line" with no anti-cheat for skipping the track).

VEHICLE:

  • A drivable car with acceleration, braking, reverse, and steering that responds smoothly to input.
  • Steering sensitivity should scale with speed (less twitchy at high speed) rather than a fixed turn rate.
  • Third-person chase camera that smoothly follows the car and doesn't clip through the track/scenery.
  • Basic collision with track barriers that slows the car down realistically rather than stopping it dead or letting it pass through.

RACE LOGIC:

  • Lap counter (race ends after 3 laps).
  • A live timer showing current lap time and best lap time.
  • A "Race Finished" screen showing final time and a "Race Again" button.
  • Optional but nice: 1-2 AI opponent cars that follow the track using checkpoints as waypoints.

Report on how the car actually handles: does it feel like a car (weight, momentum, grip) or like a box sliding on ice? Does the checkpoint/lap system correctly prevent shortcutting the track?

Round one: missing road surface bug

On the initial one-shot generation, the scene rendered cleanly with full 60 FPS performance, functioning HUD elements, and responsive car controls. However, the custom parametric ribbon mesh connecting the left and right barrier curbs failed to render its fill polygons. The player car and two AI rivals spawned on the start line with floating barriers and lampposts, but only grass lay beneath the wheels.

The Round One Geometry Bug: Floating Barriers and Missing Road SurfaceThe Round One Geometry Bug: Floating Barriers and Missing Road Surface

Round two: the prompt fix

I supplied the exact feedback:

no road fix it

Muse Spark 1.3 analyzed the road geometry math. The model restructured the track generator around an extruded Catmull-Rom spline with side: THREE.DoubleSide, explicit UV attributes, and upward vertex normal computation. On the second pass, the asphalt surface rendered with crisp lane dashes, shaded red/white rumble strips, and banked elevation contours.

Total lines
715
File size
35.8 KB
Attempts
2 (1 prompt fix)
Engine
Three.js r160 (ES Modules)
Effort setting
xhigh
Framerate
Locked 60 FPS
Audio engine
Procedural Web Audio Synth
Opponents
2 Autonomous AI Rivals
Live Demo

Interactive Demo

W A S D  /  Arrow Keys to drive

This is Meta Muse Spark 1.3's post-fix output. Click inside the canvas, press START RACE, and drive using W/A/S/D or Arrow keys.

Circuit track
Catmull-Rom 3D closed loop with 12 control points & elevation shifts
AI racers
2 dynamic AI rivals (Red & Yellow) with spline waypoint pathfinding
Anti-cheat logic
12 sequential checkpoints with 'WRONG WAY' flashing alerts
Vehicle handling
Speed-scaled steering, drift handbrake, barrier rebound dampening
Audio synthesizer
Procedural Web Audio engine pitch oscillator & screech harmonics
HUD & Navigation
Live 2D canvas minimap, digital speedometer, and lap delta timer

Catmull-Rom 3D Circuit & Banked Curves

Rather than building a flat 2D plane, Muse Spark 1.3 defined the racing circuit using THREE.CatmullRomCurve3 mapped across 12 distinct 3D vector coordinates (ctrl). The track includes a long straightaway, an uphill S-curve section rising 8 units into the air, a tight hairpin bend, and banked elevation descents.

The road is constructed through a parametric stripGeometry() function that calculates perpendicular normal vectors (lefts) from the curve tangents across 600 interpolation segments (N = 600). It layers three distinct geometric strips:

  1. Dark Asphalt Roadway: 14 units wide (TRACK_HALF = 7) textured with rough standard materials.
  2. Alternating Rumble Strips: Red and white curbs on both track shoulders with vertex coloring.
  3. Outer Barrier Walls: Vertical 1.1-unit barriers that rebound the player car on contact.

Turbo GP 3D Starting Grid with Checkered Line, Gantries, and AI CompetitorsTurbo GP 3D Starting Grid with Checkered Line, Gantries, and AI Competitors

Vehicle Handling, Grip & Speed-Scaled Steering

Vehicle physics in single-file LLM benchmarks often feel like a frictionless box sliding across ice. Muse Spark 1.3 tackled this by implementing customized arcade physics calculations:

  • Speed-Dependent Steering: Turn sensitivity inversely scales with forward velocity (clamp(1 - speed / 70, 0.35, 1.0)). At low speeds, steering is responsive for hairpins; at top speed (up to 72+ km/h), the steering deadens to prevent abrupt spin-outs.
  • Off-Track Drag Penalty: Leaving the asphalt reduces speed significantly and triggers an on-screen warning: OFF TRACK — SLOW GRASS.
  • Handbrake Drifting: Pressing Space cuts forward drive, increases lateral slip, and tilts the car chassis with subtle body roll (body.rotation.z).
  • Barrier Collision: Impacting outer barriers dampens forward velocity by 40% and pushes the car inward toward the track center rather than clipping through the boundary.

High-Speed Banked Curve with Real-Time HUD and Checkpoint TriggerHigh-Speed Banked Curve with Real-Time HUD and Checkpoint Trigger

12-Gate Checkpoint Anti-Cheat & Real-Time Minimap

The checkpoint architecture is rigorous:

  • 12 Sequential Checkpoints: The track places 12 collision gates along the spline. The player cannot simply turn around 180 degrees at the starting line to register a lap.
  • Wrong-Way Detection: If the player faces the wrong direction along the spline tangent vector, a flashing red warning appears: ⚠ WRONG WAY ⚠.
  • Live Canvas Minimap: In the top-right corner, an HTML5 2D canvas renders the full circuit outline, checkpoint dots, and real-time tracked blips for the player (blue), AI Rival 1 (red), and AI Rival 2 (yellow).

Procedural Web Audio Engine

Without being explicitly requested in the prompt, Muse Spark 1.3 constructed an entire procedural audio engine using browser AudioContext:

  • Engine Pitch Dynamics: An active sine/sawtooth oscillator (engOsc) modulates its frequency dynamically based on vehicle speed:
    engOsc.frequency.value = 60 + Math.abs(player.fwdSpeed) * 4.2 + (inp.up ? 15 : 0);
    
  • Tire Drift Screech: Handbrake activation or sharp cornering synthesizes high-frequency noise bursts.
  • Checkpoint & Lap Chimes: Hitting each sequential gate plays an audio confirmation. Pressing M mutes or unmutes the audio at any time.

What Impressed Me

  1. One-Turn Bug Resolution: When the initial road geometry failed to render, the model didn't panic or replace the whole file with a simplified flat box. It correctly diagnosed the winding-order and material visibility flaw and fixed it on a four-word prompt.
  2. Unprompted Procedural Audio & Minimap: Adding an interactive HTML5 canvas minimap and Web Audio engine synthesis showed the model going well beyond bare-minimum requirements.
  3. Competent AI Rivals: The two AI opponent cars actually race. They follow the Catmull-Rom spline with natural speed variance, pass the player on corners when the player spins out, and record valid lap times.

What Needs Work

  • First-Pass Geometry Consistency: Strip geometry generation without verified normals was a clear round-one blind spot. Models should verify material two-sidedness by default when constructing parametric ribbon meshes.
  • AI Collision: The player car collides with barriers, but passing directly through an AI car does not trigger a rigid-body chassis collision.

Honest Assessment

Try It Yourself

Try It Yourself

You are an expert Three.js game developer.

Create a complete 3D car racing game in ONE SINGLE HTML FILE.

IMPORTANT:

  • Output ONLY one file: index.html
  • All HTML, CSS, and JavaScript in this single file, no external assets, no frameworks.
  • Use Three.js from CDN (https://unpkg.com/three@0.160.0/build/three.module.js).
  • Must run by double-clicking index.html.

TRACK:

  • A closed-loop 3D race track with Catmull-Rom spline curves and elevation changes.
  • Red/white rumble curbs and perimeter safety barriers.
  • 12 sequential anti-cheat checkpoints with wrong-way alerts.

VEHICLE & PHYSICS:

  • Player-drivable car with acceleration, reverse, braking, and handbrake drift.
  • Speed-scaled steering sensitivity (wider turning radius at high speeds).
  • Barrier collision that slows the car down and deflects inward.

RACE LOGIC & AI:

  • 3-lap race with live lap timer, split times, and race finished leaderboard.
  • 2 AI opponent cars that follow the track waypoints.
  • Real-time 2D canvas minimap showing car positions.
  • Procedural Web Audio engine sound effects.

FAQ

Frequently Asked Questions

What model and settings were used for this test?
The benchmark was conducted using Meta Superintelligence Labs' Muse Spark 1.3 under xhigh reasoning effort.
Why was the road missing in the first pass?
The initial spline strip geometry generated ribbon triangles whose normals or winding order did not render with default single-sided Three.js materials. A single follow-up prompt corrected the mesh generator with double-sided materials and explicit normals.
Do the AI cars follow the player or race independently?
The two AI rivals (Red and Yellow) follow their own parametric paths along the Catmull-Rom spline with independent acceleration curves and checkpoint progress tracking.
Can the game be played on mobile devices?
Yes. Muse Spark 1.3 included a touch-pointer detection query that renders an on-screen D-pad controller when viewed on mobile screens.

Related Articles