How a Single metro Cop's Toe Broke Half-Life 2 and Sent Valve Down a Math Rabbit Hole

Video game development is held together by duct tape and dreams. Sometimes, it is also held together by the specific friction coefficient of a police officer's boot.

We usually talk about the Source engine with reverence. The physics in Half-Life 2 were revolutionary for the time. They let us kill zombies with toilets and stack crates like we were working a minimum wage warehouse job.

But physics engines are fickle beasts. A former Valve developer named Tom Forsyth recently took to Mastodon to share a war story from 2013. It involves a VR port that never happened, a floating-point error, and the most stubborn toe in gaming history.

It turns out that porting a classic to VR isn't just about fixing the camera. It is about fighting the very math that holds the world together.

The VR Port That Died in the Lobby

Back in 2013, Valve was still figuring out what to do with VR. They looked at their back catalog for test subjects. Portal was out because the perspective tricks were a "nauseating disaster," so they settled on Half-Life 2.

It should have been an easy win. It was a recent enough game with solid mechanics.

The team booted it up. They got through the opening train ride. They walked into the station. Then they hit the first scripted sequence where a Metro Cop ushers you through a door.

The door refused to open. Gordon Freeman was softlocked five minutes into the game.

The Ghost in the Code

Forsyth grabbed some of the original developers to look at it. They assumed they broke a script or messed up a trigger.

They checked the code. Nothing had changed. Then things got weird. They went back and recompiled the original, non-VR version of the game using their current tools.

It was broken there too.

This was a "time-traveling" bug. The code was identical to the version that shipped in 2004, but suddenly, in 2013, the door was broken. The game had fundamentally changed without anyone touching a line of script.

The Toe of Doom

They eventually found the physical cause. There is a guard standing behind that specific door.

He was standing just a few pixels too close. When the door tried to swing open, the corner of its bounding box clipped the guard. Specifically, it hit his toe.

The physics engine did exactly what it was told to do. It detected a collision. The door hit an obstacle, bounced back, closed, and locked itself. The guard had effectively door-stopped the entire campaign with his foot.

When Math Changes, Physics Break

So why did it work in 2004? This is where it gets nerdy and terrifying.

The original game was compiled using the x87 instruction set for older CPUs. The 2013 build used the modern SSE instruction set.

These two systems calculate floating-point math with microscopic differences in precision. We are talking about fractions of a fraction of a degree.

In the x87 version, the door hit the guard. The friction calculation said the guard should slide just enough to clear the path. He rotated, the toe moved, and the door opened.

In the SSE version, the math was slightly more precise. The friction calculation said he shouldn't slide quite as far. He rotated, but not enough. The toe stayed put. The door bounced.

It is a sobering reminder of how fragile these digital worlds really are. A tiny change in how a processor rounds a number can turn a masterpiece into a broken mess. All because of one cop who refused to move his foot.

YOU MIGHT ALSO LIKE

Next
Next

Total Chaos Review: A Dirty, Janky, Masterpiece of Misery That I Can't Stop Playing