Live data from Hacker News

A time-travelling door bug in Half Life 2

mastodon.gamedev.place

41–50 of 88 posts

Re: A time-travelling door bug in Half Life 2

#42
post #30

> 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

Impulse is change in momentum: https://en.wikipedia.org/wiki/Impulse_(physics)

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.

Re: A time-travelling door bug in Half Life 2

#44
post #22

>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 thou…

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…

> 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

Re: A time-travelling door bug in Half Life 2

#46

I wonder how on earth stuff like x86->ARM translation works so well if games break even after switching from x87 registers to SSE preserving all the logic otherwise...

It's probably because you have to have weird precision issues where the numbers are calculated ever so slightly differently, and some other effect like a guard being slightly too close and getting clipped by a door where that difference matters. I debugged some software synthesizer code a while back (like 20 years or so now I think of it) where a build of it on one platform failed because of a precision bug. I can't…

Is funny because the only code I have read that flushed denormals was in synth code.

Re: A time-travelling door bug in Half Life 2

#47
post #29
post #28

Earlier quoted context omitted.

https://store.steampowered.com/app/658920/HalfLife_2_VR_Mod/

Fantastic! If HL3 releases on VR, maybe I'll do HL2 in VR (refresher), then Alyx, then HL3. :)

HL3 exclusively in VR is likely the only thing that’d get me to increase my “time spent in VR” from the current about-ten-minutes to about six hours.

Re: A time-travelling door bug in Half Life 2

#48

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...

There’s a great VR mod for Portal 2. Played it all the way through. Surprisingly comfortable to play too.

I'm pretty sure I'd be vomiting everywhere! I'm amazed you found it comfortable!!

Re: A time-travelling door bug in Half Life 2

#49
post #30

> 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

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...

Re: A time-travelling door bug in Half Life 2

#50

It's a goal of mine to get Valve using Nix. (I hope our in-progress Windows support would make this especially compelling.) One advantage of this is that it will become very easy to not only build the original source of the game, but also build it with the original toolchain and dependencies, the toolchains for those dependencies, etc. etc., all the way down. Hopefully something like that at your finger trips would h…

> I hope our in-progress Windows support would make this especially compelling.

What is the current story for using Nix to build Windows binaries?

Post reply on HN