Build me a cel-shaded downhill BMX racing game in Three.js — four riders tearing down a mountain, point to point, at a level of craft above what a AAA studio would ship. Not a demo, not a prototype. A finished game that looks like a piece of published anime-styled game art in every single frame.
The bar for this project is not "good for a browser game." The bar is that someone watching a clip of it cannot tell it was made in a browser, and someone playing it forgets to ask.
Non-negotiable constraints
Stack: Vite + Three.js (latest r1xx), TypeScript, ES modules. I run npm install, then npm run dev, and I'm playing. Nothing else to configure.
Zero external assets. No downloaded models, textures, HDRIs, fonts, or audio. Every mesh is built in code, every texture generated in-code (canvas 2D or noise in a shader), every sound synthesized with the Web Audio API. If your own code didn't generate it, it doesn't ship.
Target hardware: MacBook M5 Pro, Chrome. A locked 60fps at retina resolution, no exceptions, no frame spikes on jumps or crashes. Use instancing, a terrain clipmap, frustum culling, and adaptive pixel ratio. A beautiful game that hitches is a failed game.
Art direction — NPR, and I want it pushed further than anyone pushes it in a browser
The whole game is non-photorealistic rendering, anime cel-shaded. Guilty Gear Xrd's ink discipline, Lonely Mountains' terrain readability, the color energy of a Studio Ghibli mountainside. Zero PBR realism. If any surface in the final build reads as physically based, the art direction has failed.
Build a real, unified NPR pipeline — not a shader stuck on a few meshes:
Ramp / step lighting as the foundation. Custom ShaderMaterial with 3–4 band gradient ramps, NearestFilter, no interpolation. Per-material control over band thresholds and band colors, so rock, dirt, foliage, skin, and metal each get their own tuned response instead of one global look. Tune by eye against captured frames.
Two cooperating line systems. Inverted-hull outlines on riders, bikes, rocks, and trees — vertices pushed along smoothed normals, BackSide, width scaled with view distance so screen-space thickness stays constant. Plus a screen-space Sobel edge detect over an MRT normal+depth prepass for interior lines the hull can't produce. Tune them so they never double up into muddy black.
Variable line weight. Modulate outline thickness by surface curvature and by distance so lines taper and thicken like a hand-drawn stroke. This one detail is the difference between "toon shader" and "drawn."
Stylized shadow interior. In shadow bands, blend in a screen-aligned hatch or halftone pattern at low opacity rather than flat darkness — the way a cel background painter fills a shadow. Subtle. It should read as texture, not as a filter.
Fresnel rim light on riders and bikes so silhouettes cut cleanly against terrain at every camera angle.
Banded specular with hard-edged highlight shapes on frames, helmets, and wet rock. Fake reflections with a matcap or ramp — never a cubemap probe.
Quantized atmospheric depth. Distance fog stepped into discrete bands so far ridges read as flat paper layers stacking into the haze — the classic anime mountain composition. This is what will make your wide shots look painted.
Sky and light: gradient sky dome shader, hard-edged cel clouds drifting at two parallax depths, geometric sun shafts through the tree line, a hard-threshold bloom that stays graphic rather than photographic. Generate a color-grading LUT in code and apply it as a final pass. Pick one committed palette — dawn-gold, or overcast-teal, or high-noon alpine — and drive every material through it.
Speed and impact — the anime layer
A racing game lives or dies on whether speed feels like speed. Build these as real systems:
Radial speed lines that ramp in with velocity, drawn as a screen-space post effect, anime-style — subtle at pace, aggressive on boost.
Motion smear on the rider and wheels at high speed, and on limbs during trick rotations.
Cel-shaded dust and dirt — hard-edged puff shapes kicked up by tires, not soft particle sprites. Puffs on skids, sprays on landings, a trailing plume through scree.
Impact frames. On a hard landing or crash, hold for one or two frames with a high-contrast flash — the anime impact convention. Used sparingly it will make hits feel enormous.
Camera language: spring-damped chase cam that whips through corners, FOV kick with speed, screenshake scaled to landing force, an automatic swing-around during big air, and a brief slow-mo on the biggest jumps.
Terrain — its own AAA-sized problem
Give the mountain a dedicated sub-agent and more iterations than anything else. It's most of every frame.
Procedural mountain built from layered noise, then run a hydraulic erosion simulation over the heightmap so ridgelines, gullies, and alluvial fans form naturally. Raw noise reads as lumpy and fake; eroded terrain reads as a real mountain. Do the erosion.
Altitude and slope banding into ma…
Build me a cel-shaded arcade boat racing game in Three.js, running on an infinite open ocean, at a level of visual and mechanical quality that a AAA studio would ship. Not a demo, not a prototype — a finished, beautiful, playable game.
Non-negotiable constraints
Stack: Vite + Three.js (latest r1xx), TypeScript, ES modules. I must be able to run npm install then npm run dev and play it in the browser immediately. Nothing else. No frameworks I have to configure, no build steps I have to debug.
Zero external assets. No downloaded models, textures, HDRIs, or audio. Every mesh is built in code (procedural geometry / BufferGeometry), every texture is generated in-code (canvas 2D or noise in a shader), every sound is synthesized with the Web Audio API. If it isn't generated by your own code, it doesn't ship.
Target hardware: MacBook M5 Pro, Chrome. Lock a solid 60fps at retina resolution. Use instancing, frustum culling, adaptive pixel ratio, and a proper LOD scheme. Performance is a quality requirement, not an afterthought — a beautiful game that stutters is a failed game.
Art direction — this is the heart of the project
The entire game is NPR (non-photorealistic rendering), anime cel-shaded. Think Guilty Gear Xrd's ink work and Wave Race 64's stylized water energy, rendered with modern shader technique. Zero PBR realism. If any surface in the final game reads as "physically based," you have failed the art direction.
Implement, properly, all of the following:
Ramp / step lighting. Custom ShaderMaterial (or a heavily extended MeshToonMaterial) with a 3–4 band gradient ramp texture, NearestFilter, no interpolation. Quantized diffuse is the single most important part of the look — tune the band thresholds by eye, not by default values.
Inverted-hull outlines on boats, riders, buoys, and gates. Duplicate mesh, push vertices along smoothed normals, side: BackSide, black or deep-toned ink. Scale the push with view distance so line width stays constant in screen space — no fat lines up close, no vanishing lines far away.
Screen-space edge detection as a post pass for interior lines the hull trick can't produce. EffectComposer + a normal/depth prepass (MRT) + Sobel filter. Two line systems working together, tuned so they don't double up.
Fresnel rim light on every character and boat, so silhouettes pop against the water.
Banded specular. Hard-edged highlight shapes, no smooth falloff. Fake environment reflection with a matcap or ramp, never a real cubemap probe.
Sky and atmosphere: gradient sky dome shader, stylized cel clouds (flat shapes with hard rim edges, drifting), a sun with a bloom-ish stylized flare that stays graphic rather than photographic. Limited, high-saturation, deliberately chosen palette — pick one and commit to it across water, sky, hulls, and UI.
The water — treat this as its own AAA-sized problem
The ocean is the star of the game and most of the screen. Give it a dedicated sub-agent and more iterations than anything else.
Displacement: sum of 4–6 Gerstner waves in the vertex shader, with a low-frequency swell and higher-frequency chop layered on top. Real wave motion, real crest sharpening — not a sine ripple.
Infinite ocean: projected grid or tiled/recentred mesh that follows the camera so the player can drive forever with no visible seam, no visible tiling repetition, and no LOD popping.
Cel-shaded water color: banded by wave height and by depth, hard transitions between bands, no smooth gradient. Deep tone, mid tone, crest tone.
Stylized foam, done properly: hard-edged white foam that appears on wave crests above a threshold; a foam ring around every hull driven by a depth-difference mask; a persistent wake ribbon behind each boat that scrolls, spreads, and dissipates over time; spray particles on hard landings and hard turns. Foam is what sells stylized water — it should be a real system, not a decal.
Quantized sparkle highlights on the surface, animated, reading as anime light-glitter rather than specular noise.
The game
Format: 4 boats — me plus 3 AI opponents. 3 laps. Countdown start, finish line, results screen with times and placement.
Course: a closed circuit marked on open water by a glowing green racing line — a CatmullRomCurve3 spline rendered as a ribbon that sits on the water surface and rides the waves with it, so it rises and falls with the swell instead of clipping through. Plus floating checkpoint gates along the route, wrong-way detection, and a corner-preview indicator. Design an actual interesting circuit: fast straights, a hairpin, a wide sweeper, a chicane, one section that runs across the swell so the boats get airtime.
Boat handling: arcade, weighty, satisfying. Buoyancy sampled from real Gerstner wave height at 5–6 hull points so the boat genuinely pitches, rolls, and slams into troughs. Throttle, steering that tightens with speed, a drift/powerslide with a boost payoff, airtime off crests with a landing impact. It should feel like the boat is fighting water, not s…