Writing

Essays from the trenches

Long-form engineering writing from building a Unity-WebGL virtual physics lab — architecture decisions with the derivations left in. Interop, shaders, state machines, and the occasional defence of an anti-pattern.

01 Two Float Arrays and a Function Call How I replaced string-based interop with shared memory between a Unity WebAssembly build and the JavaScript driving it webassembly · unity · 14 min 02 Four Attempts at Water Order-independent transparency, a per-fragment colour ramp, and the three approaches I had to throw away first unity · shaders · 16 min 03 Eighty Lines Instead of a Container Our Unity WebGL build resolves its services through a static locator — the textbook anti-pattern. Here is the derivation that got us there, and why I think the derivation matters more than the answer. unity · architecture · 10 min 04 A Constraint Solver With No Equations How a scene written as intent becomes exact metres and degrees — sixteen pure functions, one priority ladder, and no simultaneous system anywhere javascript · architecture · 14 min 05 Undo When You Cannot Re-Simulate Stepping backwards through a physics-driven lab, where the authored state, the simulated state, and the state on screen are three different things unity · architecture · 8 min 06 Ordering Is the API Five load-bearing constraints in one wiring file, three different mechanisms, and not one of them expressible in a type system javascript · architecture · 7 min 07 A State Machine With a Border Running Through It Ten phases per step, split across a JavaScript orchestrator and a C# runtime, with three completely different ways of finishing javascript · unity · 8 min 08 An Engine Inside the Engine One Unity WebGL binary serves a lab player and a 3D scene editor. The trick was not unifying them — it was knowing which layer to share and which to leave alone. unity · webgl · 7 min 09 Your Designer Learned to Vibe-Code? Give Him a Playground Thirty-nine widgets and a design system, written by someone who is not an engineer, inside a boundary that makes it safe architecture · frontend · 8 min