The pivot
How losing a 50,000-line engine became the best thing that could have happened.
I spent nine months building an MMO engine in Rust. Signed-distance-field terrain, character customization, procedural audio, networking, the whole 282-test suite. It ran at 35 fps with dynamic terrain editing. It was real.
On a Friday, I was cleaning up a directory. I ran a command that was supposed to clear out a subdirectory. It cleared more than I intended. The Rust source was not in git — that repository was for the marketing website that happened to live in the same folder — and my Time Machine backup had stopped running weeks earlier without me noticing.
The compiled binary survived. That binary still runs. I could launch it and walk around, chop terrain, customize characters. But I couldn't change it. Nine months of code, frozen.
The recovery attempt
I spent several hours mining Claude Code session logs — every time an AI assistant had read a file over the previous year, the contents were sitting in a transcript on disk. I wrote a script that walked every session and rebuilt the most recent version of each file it had seen.
I got 113 files back. About 25–30% of the engine. Some of the biggest files came back intact — the world generator, the mob AI, the character creation system. But core subsystems were still missing, and none of the build files survived, which meant the recovered code couldn't compile even as a starting point for rebuilding.
I sat with it for about an hour. Then I decided not to rebuild.
Why not rebuild
Staring at 25% of the old engine, I could see something I hadn't seen clearly while I was writing the other 75%: the engine was fighting itself.
- The terrain renderer had its own picture of the world.
- The physics engine had its own collision model.
- The lighting pipeline had its own.
- The character system had its own.
- The network code had its own.
Each of these was describing the same world in its own way, on its own schedule, with its own failure modes. Every edit to the terrain meant updating all of them. Every frame had to keep them in sync. The 6-second stall when I built a dirt mound was exactly this: five separate copies of the world being rebuilt one after another.
That's what classical game engines are. Decades of accreted representations, each good at one thing, glued together with synchronization code. Unreal, Unity, Godot — they're all variations on this pattern. The engine I lost was a small, personal version of the same architecture.
The paper on my desk
I have another thing I work on, which is a physics paper. The paper is called Density Field Dynamics: A Complete Unified Theory. It postulates that the universe can be described by a single scalar field ψ on flat three-dimensional space, and that gravity, optics, and the passage of time all emerge from that one field. It's 208 pages. It passes every experimental test of gravity that has been performed to date — solar-system, binary pulsar, LIGO, EHT. It derives the fine-structure constant 1/137 from topology. It has zero free parameters once you measure the Hubble constant.
I'd been holding DFD and the game engine in separate mental compartments. The physics paper was abstract. The game engine was concrete. On that Friday, with a frozen binary and a partial recovery on my disk, those compartments dissolved.
If nature runs the universe on one scalar field — and passes every solar system test, every galactic rotation curve, every gravitational wave observation while doing so — then the best possible representation of a game world is that same field. Not an approximation of it. The actual thing.
Every pixel on my screen, every piece of terrain, every projectile, every character would come from one field. Light curves through it. Matter falls through it. Both follow from the same physics that makes the field exist in the first place. The consistency that classical engines spend massive engineering effort to approximate would be automatic.
The new engine
I started from scratch, in a new engine. No physics engine. No mesh system. No lighting probes. One field, and the physics of DFD running on the GPU.
The renderer, the physics and the clock all read the same field. Light bends around mass because the physics says it must, not because of a post-process effect. Things fall because the field slopes, not because a separate gravity system says so. Inertia isn't a separate system either. You can't forget to implement it.
Editing the world means changing the field and letting physics catch up. There is nothing else to update, because there is nothing else.
What I got back
Four days after the loss:
- The engine reproduces four independent predictions of general relativity — far-field decay, gravitational light deflection, Kepler's third law, gravitational time dilation — with errors of 1.7%, 7.4%, 3.3%, and 0.01% respectively.
- There's a playable planet. Earth-like biomes, a sun with a corona, a moon with phases, build and destroy with the physics catching up live, and a first-person player who falls at 9.8 m/s² and walks on the surface.
- The new engine is a small fraction of the size of the old one, which was roughly 50,000 lines of Rust. It is more capable along almost every dimension that matters — it does real gravitational optics, it can edit freely, and it has no synchronization bugs because there's nothing to synchronize.
The lesson
A classical game engine is a cathedral. Each subsystem is a finely-worked stone, and the whole thing stands because of the pressure of every other stone. If you lose some of the stones, the cathedral is incomplete; you either rebuild the missing ones or the whole thing falls down.
A physics-native engine is a single principle, instantiated on a GPU. You can't lose "some of it." Either the principle is right and the instantiation is correct, or it isn't. And when it is, everything — rendering, physics, time, inertia, optics — falls out of the same data. There's nothing to lose, because there's nothing separate to keep.
Losing the old engine forced me to notice that the cathedral was the wrong architecture for the problem. I couldn't have gotten here by refactoring. The steady-state of fighting classical complexity is so much work that you never have time to question whether the complexity was necessary.
It was never necessary. The universe proves that every day — it runs on one field and produces everything we see.
The new engine is the first time I've felt like the tool and the problem are made of the same stuff. Next post is about why that matters.