r/ClaudeGameDev • u/ForgotTheSnare • Oct 03 '26
Alpha 7 weeks, zero hand-written code, zero asset files: my underwater 3D engine in Rust and wgpu
So for the past few weeks I have been working on a custom 3D engine in Rust/wgpu.
Quick background
I'm a software engineer and I can use Blender, but I gave myself the challenge to not write a single line of code and to build an engine from scratch using Claude Code exclusively, just to see how far I could push it, and as a means to learn more about graphics pipelines and effects. What better training ground than underwater graphics!
The engine
The video was captured in realtime on a Mac mini M6, and the engine is also benchmarked on my Windows PC with an RTX 3070. I intend to support both Windows (Vulkan) and Mac (Metal) first, but who knows, maybe Linux too (it already ran headless on Linux during development).
One of the most interesting things about the approach I took, I think, is that everything is parameterised and exposed via a built-in MCP server. This opens up some potentially interesting emergent gameplay, or even a way for people to use Claude to populate and tune the look of an underwater scene. It's actually crazy how much control each subsystem's set of parameters gives over the look of a scene (the great white shark alone has 100+ parameters that can change its look and behaviour in realtime, but I've saving this one for a future video).
It is early stage, and yet so much has been achieved in that time, in just evenings and weekends. I'm pretty happy with the performance so far but always trying to find ways to optimise. My aim is 60fps at 1080p as a bare minimum.
What it can do today
Three render modes, switchable live: a rasteriser that runs on any GPU, a hybrid mode that adds hardware ray-traced sun shadows, and a full path tracer.
Path-traced stills and videos: pause the scene and the frame keeps accumulating samples and is denoised; the same path tracer renders videos offline (if you're patient), with a camera model that has aperture, blades and focus distance.
Fully procedural content: no model, texture or audio files in the repo. Meshes, textures, animation and ambient audio are all generated in Rust and WGSL.
An underwater look built from separate systems: caustics, god rays, the water surface seen from below, depth-dependent water colour and haze, marine snow, wakes, bloom, colour grading and sensor grain.
A living reef: schooling fish, rays, turtles, reef and tiger sharks, garden eels, anemones, seagrass and corals, plus a hero great white with animated jaws, gills and eyes.
Everything is a live dial: 439 parameters in 37 groups, editable in an in-game overlay while the scene runs, with presets you can save and load.
A built-in MCP server: 22 tools over stdio or HTTP, so Claude can take screenshots, add and remove creatures, change any parameter, move the camera and save or restore the scene.
Built-in capture: a guided camera tour and a free swim camera, one key to record a lap of the tour as a 1080p 60 fps video, and supersampled stills and videos from the command line.
Cross-platform and headless: Metal on Mac, Vulkan or DX12 on Windows, and it runs without a window for automated renders and tests.
Tested like software: roughly 4,300 tests, including golden-image comparisons and determinism checks.
Tech stack
Rust 1.95, wgpu 30, winit, egui and the official Rust MCP SDK. The project is a Cargo workspace of 23 engine crates and 4 game crates, about 480k lines of Rust (tests and comments included) and 48k lines of WGSL across 118 shaders. It started about seven weeks ago as two separate engines (a space one and an underwater one); the current consolidated repo has 1,564 commits over 27 days, alongside 91k lines of design notes, 83 builder briefs and 48 blind-critic reviews (each round of work gets reference pictures and a blind critic to iterate against).
I am so excited about the direction this project is taking. Every new model released by Anthropic also allows me to improve the engine and its subsystems.
I hope you find this interesting and inspiring, and I'm always happy to answer any questions.
5
u/Inner_University_848 Oct 07 '26 edited Oct 07 '26
This is incredible... bravo. Jesus Christ. Seven weeks of evenings and weekends, no hand-written code, and you've ended up with path tracing, a living reef and an MCP server. I'm genuinely impressed. It's almost too good to be true!!!
A few questions, if you're okay/ happy to answer:
Thanks for sharing this, and keep going. Can't wait to see the great white video dude!
4
u/janaxhell Oct 03 '26
Very cool, the only thing I feel a bit off is the jerky speed of movements. Underwater everything is fluid. If you smooth that, it's perfect.
3
u/3iverson Oct 03 '26
Wow, the underwater look and lighting is fantastic! Can’t wait to see where this goes-
2
u/ForgotTheSnare Oct 04 '26
There are tons of parameters and you can change the water profile see example
2
u/Briskfall Oct 03 '26
> 0 asset file
> all procedural
Woah, you got my attention...! 😳
Jesus, and cross-platform?! 🤯
(I have many, many questions but... this one's the one I'm the most curious about at the moment...)
How does it run on less powerful machines, if you don't mind me asking?
(Definitely gonna follow this thread... 👀)
2
u/anon999387 Oct 10 '26
Commenting so I remember to keep an eye on this cool project
8
u/vladoportos Oct 03 '26
Not gonna lie, looks quite good.
7
u/Playful_Eye_661 Oct 03 '26
Very nice. Impressive
5
u/Tycoon33 Oct 03 '26
Looks like subnautica
5
u/ElSupaToto Oct 03 '26
I was thinking last night... We need an Echo the Dolphin follow-up
1
u/DicmanCocktoasten 6d ago
Is it open source ?
1
u/Savings_Cloud5486 Oct 04 '26
cool, can we have demo of above the sea level ?
3
u/Psychological_Can_25 Oct 04 '26
Can't wait for it to go live so I can check it out myself!
2
u/Emotional_Opening364 Oct 09 '26
This is seriously impressive. An underwater engine in Rust+wgpu is already a lot, and doing it with zero asset files makes it even better. Everything being procedural is the part that gets me. Great work!
2
u/BecomingCoder Oct 10 '26
This looks great
2
u/Livid_Shallot5701 Oct 12 '26
i love it. eberything made with claude these days is just looking ridiculously good. 27 will be a heaven for gamers and scary for game devs. i predict the panic of big companies will skyrocket and the layoffs just lead to MORE indie devs. great to be alive and gaming
0
u/Excellent-Basket-825 Oct 03 '26
😍, Explain to me like the idiot i am why rust. Everybody keeps yapping about it.