Quake 3's frame rate dependent physics

Поділитися
Вставка
  • Опубліковано 1 чер 2024
  • Version with fixed audio here: • Quake 3's frame rate d... (this video is right-channel only)
    An explanation of why setting `com_maxfps 125` in Quake 3 yields higher and longer jumps.
    The real code corresponding with the pseudo-code is here (lines 3 and 4):
    github.com/id-Software/Quake-...
    and here (line 5):
    github.com/id-Software/Quake-...
  • Ігри

КОМЕНТАРІ • 108

  • @scurity8698
    @scurity8698 3 роки тому +25

    >buy new headphones
    >plug them in
    >this is the first video I watch

  • @Ponasdomas
    @Ponasdomas 6 років тому +338

    I only get sound from the right side

    • @MattsRamblings
      @MattsRamblings  6 років тому +32

      My bad, uploading a fixed version now. Sorry!

    • @f0rgotteng0st
      @f0rgotteng0st 6 років тому +40

      You gotta adjust your framerate to get both sides :)

    • @ChristopherSpieler
      @ChristopherSpieler 6 років тому +13

      If you're using a 3.5 mm audio device with two bands for sound on the plug, you can unplug the cable half way so that sound is played on both speakers.

    • @gblargg
      @gblargg 3 роки тому +7

      It was panned to 0.5 but due to rounding it went to 1.0 (right channel). /s

    • @NonTwinBrothers
      @NonTwinBrothers 3 роки тому +8

      I dunno, it sounds right to me

  • @butterbee2384
    @butterbee2384 6 років тому +89

    My right ear enjoyed this video very much.
    Ah, and thanks for the fixed audio version.

  • @NonTwinBrothers
    @NonTwinBrothers 3 роки тому +40

    UA-cam suddenly recommending me code explanation videos at are ACTUALLY GOOD!
    How the hell do these not have way more views, lol

  • @FelixMarshFTW
    @FelixMarshFTW 6 років тому +30

    When an almost 20 year old game still gets WarOwl analysis-esque videos

  • @benjaminbray9135
    @benjaminbray9135 6 років тому +9

    This channel has great visualizations! Looking forward to more!

  • @q6manic
    @q6manic 3 роки тому +7

    Amazing video. I've been playing quake for over a decade and had no idea how this worked. A video on overbounce bugs would be interesting too.

  • @ctxz9580
    @ctxz9580 6 років тому +16

    Hah, we used to play on 125 & 333 fps in a game called SoF2 which is based on the q3 engine. I played it for 7 years religiously and have quit for some years now. And today i learn how the fps works... better late than never ;)

    • @fire460
      @fire460 5 років тому +4

      Same on COD4 ;) (125 and 250. 333 wasn't allowed on Promod)

  • @ironbard4901
    @ironbard4901 3 роки тому +1

    I wish all explanatory videos were made like this one, it's perfect! Insta sub!

  • @ghb323
    @ghb323 3 роки тому +25

    Why rounding errors are important.

  • @Epyo
    @Epyo 3 роки тому +14

    Even if the rounding didn't happen, seems like there would still be some framerates that would be better than others, for achieving higher jumps.
    For example, in the graph on the right, at 1:48, the highest orange dot is not at the very top of the "ideal" parabola. But surely at some framerates, the highest orange dot would be closer to the top. Therefore the player's max height would be higher.
    The truth is, if you want variable framerates, and perfect physics, then you have to perform physics on a fixed timestep, and make your renderer interpolate between the timesteps.
    (Another option is to intentionally add randomness to your physics. Make your jump have a slightly random initial velocity. That's a pretty big game design change though.)

  • @soldieroffortune2multiplay711
    @soldieroffortune2multiplay711 4 роки тому +1

    Excellent explanation, very informative, thank you.

  • @ZdrytchX
    @ZdrytchX 3 роки тому +5

    happens in tremulous too. Different physics numbers, but the medistation-armoury jump is a notable example of this too. In particular its only possible on 333 fps.
    Weird bugs also occur at 500fps where sound no longer works for the player and other players watching that player, and at 1000 fps client side physics prediction fails altogether but the player still can play, albeit not see what is going on.
    edit: You answered this bug in the last quarter regaring cl_maxpackets

  • @lilyrooney
    @lilyrooney 6 років тому +1

    Ohhh boy a 2nd vid?
    i think i've found a new quality channel

  • @aikenPL
    @aikenPL 3 роки тому +6

    It's worth adding than later there were mods used for competitive play like OSP which introduced server side command called pmove_fixed and with this turned on the physics were no longer fps depended (not entirely sure if this was OSP or one of Quake Point Release patch addition). The same was with CPMA mod which I think was working like that out of the box.

  • @user-ft1er1ql6n
    @user-ft1er1ql6n 3 місяці тому

    Just ran through RTCW at 144 (matching monitor). Started a new playthrough and remembered capping at 333 FPS from W:ET. The difference is so huge in game that I had to look it up. Interesting video!

  • @ajantis.ilvastarr
    @ajantis.ilvastarr 11 місяців тому

    Great explaination, thanks!

  • @zzxd7720
    @zzxd7720 3 роки тому +6

    Carmack should have put inside the code so the 666 FPS would give the maximum speed. It would have been perfect.

  • @minecraftermad
    @minecraftermad 3 роки тому +3

    you can temporarily turn audio to Mono from ease of access -> audio

    • @iwantagoodnameplease
      @iwantagoodnameplease 11 місяців тому

      Vital tip that applies to all those other videos! Thanks.

  • @lolish1234
    @lolish1234 3 роки тому +5

    This also applies to call of duty 1 and 2, and with 250fps you jumped even longer than with 125 (but not higher), and 333 was the best of both worlds

    • @kejtos5
      @kejtos5 3 роки тому

      250 gets u further than 333.

    • @lolish1234
      @lolish1234 3 роки тому +1

      @@kejtos5 yes, i forgot to say that

  • @carlosmspk
    @carlosmspk 3 роки тому +1

    1:08 - first time I ever hear someone say "per second per second" rather than "per second squared" and it sounds so off, but thinking about it, it actually makes more sense

    • @smoothbrained4channer976
      @smoothbrained4channer976 3 роки тому

      metre per second per second =
      (m/s)/s = m/s^2
      its a weird notation but it is what it is

  • @BlackMesaEmployee
    @BlackMesaEmployee Рік тому

    my right ear loved this

  • @Name_cannot_be_blank
    @Name_cannot_be_blank 2 роки тому

    My right ear really liked this video

  • @appa609
    @appa609 3 роки тому +2

    I feel like they could have just explicitly defined a parabola at the start of the jump

  • @LeoStaley
    @LeoStaley 3 роки тому +2

    You seriously need to record more stuff like this. I have been looking for the ideal voice to help me get to sleep. I found this interesting, but your soothing voice is the real star of the show here.

  • @andriitychenok8520
    @andriitychenok8520 3 роки тому

    My right ear liked this video.

  • @TheSoldierHun
    @TheSoldierHun 3 роки тому +2

    Do you know if CoD 4 uses the same engine or gravity/movement implementation as well?
    It has the same behaviour with strafing/jumping, fps (125, 250, 333, 500 are used for different porpuses) and even uses the same name for the config variables. Nice video!

  • @Budch
    @Budch 3 роки тому

    My right ear pleased

  • @MattsRamblings
    @MattsRamblings  6 років тому +5

    New version with fixed audio is here: ua-cam.com/video/P13KmJBNn1c/v-deo.html

  • @pooparse
    @pooparse 5 років тому

    quality video

  • @adamonline45
    @adamonline45 4 роки тому +3

    I was wondering why I've just recently been experiencing bad launch pad trajectories and being able to jump so high! I've been on 333 FPS.
    Does being able to jump higher impact bunny-hopped forward speed? I swear I feel much more dexterous with this change. I've also been jumping over weapons and stuff, hah!
    I just started to run my own source so maybe I can put a toggle in, where instead of running everyone at a standard fps on the server (as you mentioned with the existing toggle), it'll just not do the rounding...
    I was just looking for general nerding out vids on the quake 3 source, and boom, an answer to a curiosity! Very interesting, thank you!

  • @peterpan408
    @peterpan408 Рік тому

    This should be validated out of a competitive game.

  • @flare2000x
    @flare2000x 3 роки тому

    How did you do that zoom in effect on the matplotlib plots?

  • @bonkmaykr
    @bonkmaykr 2 роки тому

    Getting into Q3 and QL recently and learning movement still. Does QL suffer from this issue?

  • @ramlover33
    @ramlover33 3 роки тому

    my right ear enjoyed this video

  • @Wojas23033
    @Wojas23033 3 роки тому

    my right ear is pleased

  • @JohnDobak
    @JohnDobak 3 роки тому +2

    Wait so under current patch quake live does 125fps give any benefit?

  • @matthewIhorn
    @matthewIhorn 4 роки тому +3

    Is there any frame rates above 333 that would also cause this effect?

    • @viliml2763
      @viliml2763 3 роки тому

      533, then 1600
      and with 1601 and over, the rounding causes the velocity to snap right back to the original after decreasing, so you keep flying forever

  • @ishdx9374
    @ishdx9374 3 роки тому +2

    my left ear oof

  • @G0LDHDx
    @G0LDHDx 3 роки тому

    So does looking up/down
    On each curve matter?

  • @ThePaudiaz
    @ThePaudiaz 11 місяців тому

    So, would the results be something like 800/333=2.4, rounded down to 2, for example to modify the gravity to 666 (333x2=666)?

  • @Kuratius
    @Kuratius 3 роки тому +1

    Wouldn't it have been a better idea to multiply the floating point number by a multiple of its base (trivial), then round to an integer, send that value, and then have the server do the opposite to "unpack" the package?
    With a 32-bit integer that should work. Or are you saying quake only used smallints?
    Assuming there is a large advantage to sending integers, anyways.
    Also, a floating point number should ideally only require sending two integers and it could be reconstructed directly. I don't see why there is an inherent advantage to doing sending an int.

    • @kintrix007
      @kintrix007 Рік тому

      I believe it very likely does not send the integers directly. You can combine together the data you are sending, effevtively doinh very simple compression, to send it over the internet. Also, representing a 32-bit float with a 32-bit int instead would save no bandwidth. It's both 32 bits. It only matters if you send less bits. Thus you would cut off some of the less significant bits to save bandwidth.

  • @technicalmachine1671
    @technicalmachine1671 6 років тому +6

    My left ear did not enjoy this.

  • @djol00
    @djol00 4 роки тому

    Why other popular tweaks are 43, 76 and what are theirs impact?

    • @viliml2763
      @viliml2763 3 роки тому

      They do the same, just weaker.
      Maybe for computers that are too weak to run 125 fps.

  • @BorderKeeper
    @BorderKeeper Рік тому

    My left ear has sadly not learned anything from this video

  • @george_hopkins
    @george_hopkins Рік тому

    my left ear is lonely

  • @morky3673
    @morky3673 3 роки тому +1

    Could you confirm wether or not this also applies in quake live.

    • @VigilSerus
      @VigilSerus 3 роки тому +1

      Cannot imagine the devs would allow that kind of niche advantage at this point in the games lifespan. For the sake of competition, I assume it’s normalized across clients just like he said at the end.

    • @iconoclastsc2
      @iconoclastsc2 3 роки тому

      It depends on the server.
      On servers with pmove_bunnyhop 1, movement is fps dependent.
      On servers with pmove_bunnyhop 0, movement does not depend on fps.
      This is one of the side effects of the idiotic changes that were supposed to help beginners but instead just made a total mess of the physics and actually just harm the beginners in the long term.
      If you don't want to worry about such stuff then just play on classic servers.
      discord.io/houseofquake

  • @movax20h
    @movax20h 3 роки тому +3

    This is why you never use first order ODE solver, even for first order ODEs. They drift a lot. Euler method is basically something you should never use. 2nd order methods are easy to implement, and vastly superior. Just use Heun's method or Verlet method, as a better start. The rounding step is just stupid.

    • @SianaGearz
      @SianaGearz Рік тому +1

      You can do network layer rounding since these variables are transmitted for visual purposes, but simulation rounding is an ouchie. Looks like they put it in the wrong spot by mistake.

  • @numberonepun4126
    @numberonepun4126 Рік тому

    I saw a video once that explains how Quake 2 or maybe all Quake games are designed to pull the player towards the center of each map. Do any of you kno the video I'm referencing or have anything on this? I can't find it anywhere now.

  • @jojotoofor9eight766
    @jojotoofor9eight766 11 місяців тому

    the audio

  • @grahamesmith9139
    @grahamesmith9139 5 місяців тому

    You assume that we know what an iteration is 🎉😂😂❤

  • @F1mus
    @F1mus 6 років тому +4

    Also works with 43, 76, 125, and 333 fps

    • @toastBOMBable
      @toastBOMBable 6 років тому

      He explains this in the video

    • @F1mus
      @F1mus 6 років тому

      Just 333

    • @gergonguyenviet122
      @gergonguyenviet122 Рік тому

      ET trickjumper right? 😀 I remember using 43, but I should have used 125 I guess (333 was forbidden if Im correct)

  • @GreyTide
    @GreyTide 3 роки тому +1

    You need to mono your audio in post. I can only hear you in my right ear.

  • @igoreliseev9154
    @igoreliseev9154 3 роки тому +1

    After watching this video I want to come back to the past (2003), change my config, and kick my friend's ass who always beat me in q3

  • @buddhabrot
    @buddhabrot Рік тому +1

    1:00 i'm blind now :(

  • @shotgun3628
    @shotgun3628 3 роки тому +2

    the audio is fps dependent, i recommend upgrading your system

  • @oxyacetylene_
    @oxyacetylene_ Рік тому

    right ear

  • @360Fov
    @360Fov 3 роки тому +1

    You can get sound on both sides if right click the speaker icon on task bar, go to devices, disable your soundcard, go to a friends house, phone back to your house, have somebody re-enable your soundcard, go back home, play the video and record it on your phone, then playback the recording held up to your left ear, while playing the video on your computer - for added realism turn your head to the left, so you are staring at whatever is on your left, so that your right ear is soaking up the decliious sound from in front of you.

  • @Xerxes17
    @Xerxes17 Рік тому

    What about 'com_maxfps 666' ?

    • @ThePaudiaz
      @ThePaudiaz 11 місяців тому

      That doesn't work. You can only use numbers that use round integer numbers in milliseconds. Anything that doesn't scale down to a even number does not compute.

  • @tear728
    @tear728 3 роки тому

    Le derivative

  • @Proper_Time
    @Proper_Time 3 роки тому

    High framerate in Star Trek Elite Force yields super low gravity lol

  • @6infinity8
    @6infinity8 3 роки тому

    My left ear didn't understand the explanations

  • @satan2k
    @satan2k 3 роки тому

    My left ear didn't subscribe

  • @vitriolix
    @vitriolix 3 роки тому

    You have a very left brained approach

  • @emekc640
    @emekc640 3 роки тому

    my left ear did not like this video

  • @Krunklehorn
    @Krunklehorn 4 роки тому

    Bruh these graphics are on par with 3Blue1Brown. You could make a Patreon and start covering more topics like this (or at least a Ko-fi)

  • @mehmetdemir-lf2vm
    @mehmetdemir-lf2vm 3 роки тому

    rounding to integers or doing calculations with fixed point numbers in simulations and 3d vector graphics are not good ideas. experienced.

  • @hamsteerio
    @hamsteerio 3 роки тому

    Do one for gta 3d engine please

  • @thegavinjackson
    @thegavinjackson Рік тому

    python is pseudo code lol

  • @jdmaine51084
    @jdmaine51084 3 роки тому

    Jesus Christ.... guys... guys.... boys.... we all think we know how to program, but John Carmack is out here making frame-based physics and doing memory bit manipulation to make his lighting work. He's the greatest mind in videogame programming history, hands down. Don't at me.

    • @user-qt4uz7tn4k
      @user-qt4uz7tn4k 3 роки тому

      Carmack didn't invent himself half-float lighting. It was someone else's code.

  • @poopcatapult2623
    @poopcatapult2623 3 роки тому

    *framerate-dependent

  • @twrk139
    @twrk139 3 роки тому +2

    Your continuous use of vocal fry makes this video really unpleasant to listen to. I hope you don't speak like this in interviews.

  • @katalysis
    @katalysis 6 років тому +2

    This is old news. I knew this as a 9th grader back in 1998 and everyone used max fps 125 with our CRT monitors.

    • @kerembaydogan5543
      @kerembaydogan5543 6 років тому +30

      This not a gaming tips & tricks video you dumbass. This is an detailed explanation of the phenomenon, and the logic behind it.

    • @zankaizankai
      @zankaizankai 5 років тому +2

      katalysis Shut up nerd

    • @TheSmurfboard
      @TheSmurfboard 3 роки тому

      well not "everyone"