in reply to Tom Forsyth

We picked Team Fortress 2 as the game - the reason why is a whole different story I won't go into here. TF2 used the Source 1 engine, and as it happened two Valve games also using that same version of the engine were Half Life 2 and Portal 1. So as a side-effect they also got to work in VR.

Well, Portal 1 "worked" - but all the tricks with perspective when you went through a portal were of course a nauseating disaster - it was pretty unplayable.

in reply to Tom Forsyth

But HL2 did actually work pretty well. Joe spent a lot of time making the boat sequences work in a reasonable way.

There's a sequence of stacking boxes near the start that is somewhat infuriating in the original - the stack keeps falling over - but in VR it's really easy to place them well.

Also, whacking the manhacks with your crowbar goes from being a panicked flailing in flatscreen, to being an elegant one-swing home-run hit in VR.

in reply to Tom Forsyth

Of course we've played a bunch of HL2 by this point, testing all the VR stuff works. But we just skipped to the relevant chapters - we never actually played through from the start. And I hadn't played it through in a while, so I thought I'd do that in VR, start to finish. If I discovered anything that still didn't work, I could at least document it in the release notes.
in reply to Tom Forsyth

So I started it up, selected new game, played the intro section. It's a fairly well-known section - you arrive at the train station with a message from Breen, a guard makes you pick up a can, and then you have to go into a room and... uh... I got stuck. I wasn't dead, I just couldn't go anywhere. I was stuck in a corridor with a guard, and nowhere to go. Bizarre.
in reply to Tom Forsyth

What is meant to happen is a guard (spoiler alert - it's actually Barney in disguise) bangs on a door, the door opens, he says "get in", and then the game waits for you to enter the room before the script proceeds.

But in this case the door sort of rattled, but didn't open, and then locked shut again. So you can't get in the room, and the gate closed behind you, so you can't go do anything else. The guard waits forever, pointing at the locked door, and you're stuck.

in reply to Tom Forsyth

I checked a video online, wondering if my memory was faulty - nope, the door's meant to open automatically, and you walk in. youtube.com/watch?v=y_3vMUOayy… (at 3:40). But... now it doesn't!
in reply to Tom Forsyth

If you watch the video, when the door unlocks and then opens, there's a second guard standing inside the room to the left of the opening door. That guard is actually standing very slightly too close - the very corner of his bounding box intersects the door's path as it opens. So what's happening is the door starts to open, slightly nudges into the guard's toe, bounces back, closes, and then automatically locks. And because there's no script to deal with this and re-open the door, you're stuck.
in reply to Tom Forsyth

So this kicked off an even longer bug-hunt. The answer was (as with so many of my stories) good old floating point. Half Life 2 was originally shipped in 2004, and although the SSE instruction set existed, it wasn't yet ubiquitous, so most of HL2 was compiled to use the older 8087 or x87 maths instruction set. That has a wacky grab-bag of precisions - some things are 32-bit, some are 64-bit, some are 80-bit, and exactly which precision you get in which bits of code is somewhat arcane.
in reply to Tom Forsyth

But ten years later in 2013, SSE had been standard in all x86 CPUs for a while - the OS depended on it being there, so you could rely on it. So of course by default the compilers use it - in fact you have to go out of your way to make them emit the old (slightly slower) x87 code. SSE uses a much more well-defined precision of either 32 or 64 bit according to what the code asks for - it's much more predictable.
in reply to Tom Forsyth

So problem solved, right? 80 bits of precision means the collision didn't happen, but in 32 bits of precision it does, and that's your problem, more bits better, QED, right? Well not quite.

The guard's toe overlaps in both cases - a few millimeters is still significantly larger than ANY of the possible precisions. In both the SSE and x87 versions, the door hits the guard's toe. So far, both agree.

in reply to Tom Forsyth

And that's why the bug went "back in time" - because yes it's the old code, but we were using a newer compiler with new default settings. In the original build, the compiler defaulted to x87, but in the newer compilers the default is SSE. It's not that one is "better" - the fundamental bug is that the guard was too close to the door, and that had always been there. But in the original the problem "self corrected" and so was never spotted, whereas in the newer compile it became a showstopper.
in reply to Tom Forsyth

the difference b/w Half-Life, Fortress & Team Fortress “Unforeseen Consequences: A Half-Life Documentary” <youtube.com/watch?v=BQLEW1c-69…>