17 ms·
Quake's lightning gun bug explained [video]
- driggs 3y agoI parsed this title as "lightning bug gun" and wondered why I didn't recall a bioluminescent insect powered weapon in that game.
- NotYourLawyer 3y agoPretty interesting. Was this code just never tested at all?
- jcl 3y agoSo, it seems that the intent of the code is to add two parallel, invisible kill beams to augment the main beam. The nature of the bugs are such that the added beams are positioned in roughly the right place, for a certain axis-aligned view. I’d guess that the feature was tested manually in such a view, and seemed to work OK. And that the feature was subtle enough of a behavior tweak that no one noticed that it didn’t work correctly in most other situations, since the main, visible beam worked correctly, and no one could see it killing enemies behind walls.
- dmead 3y agoi just used to set r_picmip to 15 or whatever an the LG beam fills the entire space.
- fabiensanglard 3y agoI wish someone wrote a book about Quake with cool interesting stuff like that.
- rgovostes 3y agoSome guy wrote one about DOOM, but no one knows if he’s going to follow up with one about Quake. https://fabiensanglard.net/gebbdoom/ https://fabiensanglard.net/gebbdoom/
- tmikaeld 3y agoSuddenly, a wild John Carmack appears and explains the real reason for the bug ;-)
- coolspot 3y agoReal reason: he ran out of diet Coke.
- UberFly 3y agoJohn was eaten by a Grue.
- tleilaxu 3y agoArmed with a lightning gun.
- NovaDudely 3y agoProbably to busy off doing new things to worry about this. ;)
- viraptor 3y agoPossible, but not necessarily. I've just seen Romero playing a Doom mod this week for example: https://youtu.be/gIl_TqFJNO8 https://youtu.be/gIl_TqFJNO8
- lgl 3y agoJust FYI, John Romero also streams occasionally on Twitch at https://www.twitch.tv/theromero https://www.twitch.tv/theromero
- kvark 3y agoThey missed the 3rd(!) bug in those few lines of code? The normalization was done before zeroing out the Z component, so the resulting vector isn’t actually normalized.
- tomxor 3y agoYeah that's the first thing that drew my attention, if you normalise and then remove a component... now you know for sure length whatever you are doing is dependent on the direction of the input vector. I still find vector programming hard though, so if I was writing anything like this I'd always visualise it as part of my testing. i.e temporarily render out the other beams and possibly the intermediate vector as necessary (pretty much what they did in this video). That makes testing easier to verify and debugging way more intuitive.
- shadowgovt 3y agoIt turns out you can do a lot of work with non-normalized normal vectors as long as you don't trip over the math that actually cares whether they're normalized.
- deleted 3y ago[deleted]
- jcl 3y agoTo be fair, bug #1 was that the normalization call had no effect, so the fact that it’s also being done in the wrong sequence doesn’t actually have a further effect on gameplay.
- isoprophlex 3y agoNot saying I never conjure the spaghetti but whoever coded that really was deep into the tail end of a caffeine, coding and sleep deprivation binge ;)
- deleted 3y ago[deleted]
- ChuckNorris89 3y ago
- mock-possum 3y agoThat’s crazy. I’ve played a bunch of quake and never knew about that.
- eps 3y agoI 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?
- mewse-hn 3y agoIt's QuakeC - quake's proprietary scripting language that compiled down to a file called progs.dat
- nottorp 3y agoI 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.
- vkazanov 3y agoQuakeC 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).
- poglet 3y agoHe mentioned QuakeC. Maybe this part of the game was coded in that. https://en.m.wikipedia.org/wiki/QuakeC https://en.m.wikipedia.org/wiki/QuakeC
- vkazanov 3y agoAlmost 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!
- kubb 3y ago
- drawkbox 3y agoLots of hacks like this in games. It could have been solved by limiting the two side vectors lengths to less distance (maybe even tuned by speed) and fixed it enough if the reason was for side damage. If it was to fix some other issue like maybe floats losing precision far out that would not be a good idea.
- cammikebrown 3y agoQuake was the first PC game I played and still in my top 10 favorite games of all time. The movement STILL feels fresh!
- miramba 3y agoI bought the recently released dusted up version, it’s still fun to play against the bot in DM4.
- newqer 3y agoYou never forget your first.
- beebeepka 3y agoThe movement? It was just dull but they fixed it with QuakeWorld. Bunny hopping is fun until you encounter stairs. They fixed that mechanic in Quake 2 but then everything else about this game is crap. Q3 was OMG, simply amazing Movement wise, CPM/CQ3 or QuakeLive is where things became fun again
- drzel 3y agoModern QuakeWorld has the option of enabling ‘air step’ which allows surfing up stairs. I don’t think the deathmatch purists use it, but it’s become standard in FortressOne (modern QWTF fork).
- fatline 3y agoThe amazing thing about QuakeLive is that it initially ran in a browser window. I'm not sure how it was implemented, but it was amazing and it supported Mac and Linux as well. I wonder why they then decided to make it into a Windows only desktop app.. :-(
- George83728 3y ago> The amazing thing about QuakeLive is that it initially ran in a browser window. The performance was complete dogshit. Just simply awful. I had modern hardware at the time which ran both the original Q3A and ioquake3 at hundreds of fps if uncapped but QuakeLive in browser burned my computer up for sub-60 fps even with the graphics turned down. Unplayable. Not to mention they dropped Linux support. QuakeLive made me quit playing Quake. If I sound bitter about it now, you should have heard me then.
- idiomaticrust 3y agoDid anyone had a situation after entering the portal that it didn't teleport you, but you were in some different space with purple color and you had to move forward to be teleported? I had this once on the DM2 map. I tried to repeat this, but I never succeeded.
- lgl 3y agoThat should be a known bug on a specific teleport that exists on the DM2 map. Not sure if it's also present on "regular" Quake but it's been on QuakeWorld for as long as I can remember. On the backroom (where there is Red Armor and Mega Health) there is a teleport that goes to the main (BIG) room of the map. If you jump just before the teleport and "aim" your jump so you go in the top left corner of the teleport, you'll get stuck inside the teleport but not go through until you move a bit. Also, staying stuck for too long on that teleport during a game, will drown your player, which should definitely confuse your opponent as there is no water deep enough to drown players on DM2. Good times! Long live QuakeWorld!
- idiomaticrust 3y agoYes, IIRC it was exactly that teleport. I'll try to repeat this using hint from you :) I was really confused when I hit that.
- idiomaticrust 3y agoI tried on Q1 from steam and the original and I can not repeat. I'll have to check how to run QW these days :)
- lgl 3y agoYeah it's probably qw only. It's pretty easy to get it running these days with the recent clients. You can just download a qw client (ezquake recommended [0]) and extract the executable to your quake folder. Alternatively you can download nQuake [1], a full pack with most things included except for the non-shareware maps. You can then just place the pak1.pak file inside the id1 folder and make it complete. Good luck ;) [0] https://ezquake.com/ https://ezquake.com/ [1] https://nquake.com/ https://nquake.com/
- jamesu 3y agoI would love an explanation of Tribes' skiing bug presented in the style of this video. There have been so many differing explanations of it in blog posts over the years which haven't completely sat right with me.
- deleted 3y ago[deleted]
- grandpoobah 3y agoDoes it work in quakeworld (multiplayer) ?
- sjm 3y agoI was curious about this too. The QW code is different and I believe has fixed this. Example source for W_FireLightning in KTX: https://github.com/QW-Group/ktx/blob/6b8a50833d0ef738182cf7ac2030a43e81781050/src/weapons.c#L1156 https://github.com/QW-Group/ktx/blob/6b8a50833d0ef738182cf7a...
- kzrdude 3y agoWhat does he mean by "enemy blocking"?
- dharmab 3y agoThe enemies within the player's field of view but to the side of the single beam are physically blocking the player model from moving. This is a jarring gameplay experience.
- bakugo 3y agoI love finding explanations for weird bugs and inconsistencies like this in games by looking at their code. Here's one I personally found myself: https://www.youtube.com/watch?v=ljl1jBEY3_A https://www.youtube.com/watch?v=ljl1jBEY3_A