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
02
Four Attempts at Water
Order-independent transparency, a per-fragment colour ramp, and the three approaches I had to throw away first
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.
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
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
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
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
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.
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