News for hackers. Stuff that matters.
Re:Quake's lightning gun bug explained by eps on Thursday June 15, 2023 @02:50AM (#36337230)
I don't follow.

This code is not C or C++, so it's not actually from Quake. So what's with "this is how this was coded" and "here are the bugs, but it's only my guess"? The code is avaialble, why guess at all?

Re:Quake's lightning gun bug explained by kipi on Thursday June 15, 2023 @03:07AM (#36337338)
Hello, video creator here. This is indeed the actual code, and it is written in QuakeC, a language created specifically for the game logic in Quake. The part I'm not sure about is why the creators wanted to add in extra side beams at all.
Re:Quake's lightning gun bug explained by eps on Thursday June 15, 2023 @03:33AM (#36337470)
Oh, didn't know about QuakeC. Shame on me.

So both the "normalize" and the improper swap are the part of the original source?

Re:Quake's lightning gun bug explained by tecleandor on Thursday June 15, 2023 @04:52AM (#36337925)
Re:Quake's lightning gun bug explained by klaussilveira on Thursday June 15, 2023 @10:05AM (#36340685)
Re:Quake's lightning gun bug explained by 2c2c2c on Thursday June 15, 2023 @03:31AM (#36337461)
in the era of arrow keys and ball mice, lg probably felt like trash. who knew it would end up so iconically broken :-)
Re:Quake's lightning gun bug explained by somedude895 on Thursday June 15, 2023 @03:18AM (#36337402)
Probably just to make the gun more powerful, so you get some area of effect damage and not just hit the target right under your crosshair.
Re:Quake's lightning gun bug explained by Sakos on Thursday June 15, 2023 @05:15AM (#36338053)
Btw, I love this type of video where you breakdown and explain code like this and I've subscribed. Looking forward to seeing more of your videos.

Especially with games, I think the video format lends itself well to demonstrating the effects of the code organically.

Re:Quake's lightning gun bug explained by simias on Thursday June 15, 2023 @08:58AM (#36339805)
I think your guess seems plausible, although maybe it was simply an effort to widen the beam to better match the graphics? The lightning effect is rather wide and it may have been surprising for the player if the hitbox ended up too narrow.

I haven't played Quake in the better part of 20 years so I can't comment from first hand experience, but judging by your top-down view at around 41 seconds, the single beam visually seems to intersect with a bunch of enemies while not dealing any damage (probably as a combination of narrow hitboxes on both the beam and the enemies).

Re:Quake's lightning gun bug explained by squeek502 on Thursday June 15, 2023 @06:51PM (#36347866)
I wrote a breakdown of a different Quake engine quirk (rampsliding) that might be a fun topic for a video if you're looking for new topics:

https://www.ryanliptak.com/blog/rampsliding-quake-engine-qui...

Re:Quake's lightning gun bug explained by mewse-hn on Thursday June 15, 2023 @02:53AM (#36337250)
It's QuakeC - quake's proprietary scripting language that compiled down to a file called progs.dat
Re:Quake's lightning gun bug explained by nottorp on Thursday June 15, 2023 @04:05AM (#36337669)
I remember Carmack announcing that the scripting language for Quake will be "interpreted ANSI C". Never checked how standard he made it though.

That was back when he posted dev updates in his .plan file.

Re:Quake's lightning gun bug explained by vkazanov on Thursday June 15, 2023 @05:25AM (#36338119)
QuakeC looks like C on the surface but is a much, much simpler language. Modern dialects are quite a bit more advanced (while still targeting the same vm).
Re:Quake's lightning gun bug explained by poglet on Thursday June 15, 2023 @02:53AM (#36337253)
He mentioned QuakeC. Maybe this part of the game was coded in that.

https://en.m.wikipedia.org/wiki/QuakeC

Re:Quake's lightning gun bug explained by vkazanov on Thursday June 15, 2023 @05:23AM (#36338112)
Almost all of Q1 gameplay is in quakec, which is a a simple c-like language targeting a little VM. Eventually they've opersourced all of the code making the community possible.

I recently started playing Q1 again and it's amazing: the community still supports a number of derivative engines, as well as numerous amazing mods and maps. Arcane Dimensions are insane!

Re:Quake's lightning gun bug explained by kubb on Thursday June 15, 2023 @02:58AM (#36337288)
Your reasoning skills aren't fully developed, or you didn't apply them. You're like my coworkers :D

Your assumption that Quake is written only in C or C++ is wrong. This is QuakeC.

The code, even if available, doesn't necessarily convey the intention of the person who wrote it. That's why we need to guess.