Readit News logoReadit News
g7r · 3 months ago
Ah, nice story!

This reminds me of another story with FPU involved. I was a game developer once. We were making a game that consistently triggered assertion failures related to FPU calculations, but only on a single PC in the whole office. The game was explicitly setting FPU precision to 32 bits at the start to make all calculations more consistent. However, on that particular PC, there was a fancy hand writing input software that injected its DLL into every process. As you've probably already guessed, that DLL did FPU mode reset to the default in the event handling loop (i.e., main thread). I had to shift FPU mode setting code from process initialization to the event handling loop to be able to deal with the damage that third party DLLs could inflict.

djmips · 3 months ago
nice detective work. Global FPU state had sure caused a lot of headaches.
zokier · 3 months ago
I recall that D3D liked poking FPU state too, which of course had all sorts of fun results
stevefan1999 · 3 months ago
Reminds me of what G-Man said in the opening scene of HL2: "The right man in the wrong place can make all the differences in the world"
powerclue · 3 months ago
Indeed, that quote is deployed prominently in red text in the thread, in fact.
zX41ZdbW · 3 months ago
This reminds me of an old bug in simdjson - any usage of it breaks std::unordered_map in unrelated parts of the code due to an unintentional modification of FPU flags: https://github.com/simdjson/simdjson/issues/169
mattgreenrocks · 3 months ago
Beautiful, and by that, I mean completely and utterly horrific.
Wowfunhappy · 3 months ago
Wait, so is that "beta" of Half Life 2 VR a thing I can play? If it is, how did I not know about this, and if not... why not?

I'd also love to play Portal, actually. They say it makes you sick, but to my knowledge I'm immune from VR motion sickness, so worth a try...

Shekelphile · 3 months ago
It was publicly released in 2013 and you can enable it with -vr in args IIRC. Not sure if it would work with modern VR hardware since steamvr wasn't a thing back then.
account42 · 3 months ago
It did work with the Index at some point. Valve have been neglecting VR though (especially on Linux) so I wouldn't bet on it still working.
Wowfunhappy · 3 months ago
Ah, it predates SteamVR! Thanks, that explains why I didn't know about it.
aranelsurion · 3 months ago
I don’t know about the beta, but there’s an excellent HL2 VR conversion mod you can play today. It feels just right and got me to play HL2 again after all these years.
davepdotorg · 3 months ago
There’s a great VR mod for Portal 2. Played it all the way through. Surprisingly comfortable to play too.
patrickdavey · 3 months ago
I'm pretty sure I'd be vomiting everywhere! I'm amazed you found it comfortable!!
HelloUsername · 3 months ago
shellwizard · 3 months ago
HelloUsername · 3 months ago
As mentioned in the description :)
FrostKiwi · 3 months ago
A Valve employee using YouTube Playthroughs [1] to diagnose a bug is hilarious to me. Awesome story.

[1] https://mastodon.gamedev.place/@TomF/115589894339657055

lomase · 3 months ago
Is Valve porting HL2 to VR? A 2013, sorry.
why_at · 3 months ago
>a big innovation of HL2 was the extensive use of a real physics engine. The door and the guard are both physical objects, both have momentum, they impart an impulse on each other, and although the door hinge is frictionless, the guard's boots have some amount of friction with the floor.

It's been a while since I've played HL2 but this isn't exactly how I remember it. While a lot of things were physics objects I thought the doors would just smoothly rotate towards their target position without any physics at all. You can't bump them shut with another physics object for instance.

sigmoid10 · 3 months ago
You can't move them (apart from the opening and closing animation), but they can move other objects that are in their way. Both need to be physics objects for that to work, even though the door is just kinematic (i.e. it won't react to forces applied to it). Although if I remember correctly, they are not even fully kinematic. I think you could get them stuck halfway closed by cramming something in the door frame that would get the whole thing jammed.
Lammy · 3 months ago
> I think you could get them stuck halfway closed by cramming something in the door frame that would get the whole thing jammed.

This was a popular griefing tactic when TF2 first came out where you could trap everyone in spawn by crouch-jumping into the spawn door as Scout: https://youtu.be/JUPzN7tp7bQ?t=243

accrual · 3 months ago
Just did some quick testing - the doors definitely have physics and can get stuck on objects and can impart forces. But unimpeded yes, they smoothly open/close.

I stuck a tire in a door frame and tried to close it, the tire emitted a bunch of dust clouds as the two objects fought before the door finally ejected the tire at high speed.

matheusmoreira · 3 months ago
> ejected the tire at high speed

I wonder if speed runners have found ways to abuse this...

accrual · 3 months ago
> The door and the guard are both physical objects, both have momentum, they impart an impulse on each other

I wonder if the term "impulse" here has any connection to the various impulse commands available in the source engine. I remember using "impulse 101" and causing havok in the opening plaza area. Spawning zombies on the roofs, sending them after the combine, etc.

https://developer.valvesoftware.com/wiki/Impulse

WatchDog · 3 months ago
The impulse console command originates from Quake, the Half-Life 1 engine (GoldSrc[0]), was based on the Quake engine, and the Half-Life 2 engine (Source), was based on GoldSrc.

In quake, the impulse commands were used mostly to switch weapons[1]. I'm not really sure about the naming though, why choose the word "impulse".

[0]: https://en.wikipedia.org/wiki/GoldSrc.

[1]: https://github.com/id-Software/Quake/blob/0023db327bc1db0006...

wowczarek · 3 months ago
Noclip FTW
ThrowawayR2 · 3 months ago
accrual · 3 months ago
Right, I was just wondering if the developers repurposed the term impulse from the physics engine when creating console commands. "impulse 101" is a common cheat to give all weapons with ammo, but why not "give" or "player.addItem" or something? Just a curiosity.