if server = windows, you get 41 metal instead of 40???

Sdílet
Vložit
  • čas přidán 12. 04. 2022
  • Music: BananaSlug - Summer Rain & Gloomy ( / summer-rain )
    channel discord --- / discord
    channel patreon --- / shounic
    channel tracker --- trello.com/b/L3B65jUX
    [ todo list / current progress on upcoming videos / channel roadmap ]
    feedback --- forms.gle/bkuGF6attQrRPc6o9
    custom files --- pastebin.com/raw/e32aG4nP
    [ hud / crosshairs / hitsound / killsound / gfx cfg ]
    big thanks to:
    ILDPRUT, Doomy, Trigger_Hurt, & Hoste for their contributions in research
    Gold for scripting help
    old title:
    "if the tf2 server runs on windows, you get more metal from small ammo packs (and less on linux)"
    FAQ:
    Q: How did you make that? What editing software do you use?
    A: I use Adobe Photoshop, Premiere Pro & After Effects. Photoshop for image editing and thumbnails. Premiere Pro for compositing and After Effects for motion graphics (the fancy animations).
  • Hry

Komentáře • 1,4K

  • @milesmacmahon6001
    @milesmacmahon6001 Před 2 lety +8290

    This pay to win deal with Microsoft is DISGUSTING. Valve should be ashamed.

  • @bobthebox2993
    @bobthebox2993 Před 2 lety +3855

    Just imagine, instead of using your flamethrower to spy check, you instead follow the person around and wait for them to pick up a health pack and then calculate to see if they got 1 HP too many.

  • @Spacebugg
    @Spacebugg Před 2 lety +2763

    Every conversation ends with spy getting another bug at this point.

    • @sythrus
      @sythrus Před 2 lety +120

      YOU FOOL! YOU JUST GAVE HIM ANOTHER BUG BY POINTING IT OUT!

    • @Spacebugg
      @Spacebugg Před 2 lety +47

      @@sythrus good. Very good.
      -a pyro main

    • @sythrus
      @sythrus Před 2 lety +59

      @@Spacebugg eventually hes going to get a bug that makes him completely immune to both airblast and afterburn, while also making it so he looks like hes not on fire. You know this right?

    • @juango500
      @juango500 Před 2 lety +20

      @@sythrus uhh... dead ringer and spycicle?

    • @Spacebugg
      @Spacebugg Před 2 lety +12

      @@sythrus yes but just like some wise guy said
      *I HAVE. A SHOTGUN.*

  • @sweetiecandy4885
    @sweetiecandy4885 Před 2 lety +4291

    You have no idea how the health from a small health pack being listed as "20.5%" "wrongfully" on the TF2 wiki has driven me mad with questions as to how a random .5 was added seemingly out of nowhere, holy shit thank you for this explanation now I can finally rest in peace somewhat I guess.

    • @Solid_Hank
      @Solid_Hank Před 2 lety +77

      But isn't it 20% though? I calculated it and 20.5 gives different results. Oh wait that must've been on a linux server

    • @Archimedes.5000
      @Archimedes.5000 Před 2 lety +159

      Nah that doesn't explain it at all
      This video only applies to ammo packs, health only works on disguised spies

    • @kingding9542
      @kingding9542 Před 2 lety +8

      Sleep well

    • @misterk7_-
      @misterk7_- Před 2 lety +2

      I felt that last sentence bro

    • @NicknineTheEagle
      @NicknineTheEagle Před 2 lety +54

      @@Archimedes.5000 The video talked about health packs, too. TF2 Wiki probably just copied value from ammo pack page.

  • @Jmcgee1125
    @Jmcgee1125 Před 2 lety +3699

    So, basically, I need to put my Linux-based server into a Windows VM? Sorry for the lag everyone, I need 1 extra metal.

    • @Ashpool37
      @Ashpool37 Před 2 lety +182

      That's clever, but I think the emulated CPU of the VM will still use the instruction the compiler told it to use, which is mulss for a GNU/Linux executable. So you will get the same result as if you were running GNU/Linux natively.
      And yes, I will call it GNU/Linux rather than Linux because the GCC compiler written by GNU is actually relevant here.

    • @ahmed4363
      @ahmed4363 Před 2 lety

      *L E T S D O T H I S T E X A S S T Y L E*

    • @Ashpool37
      @Ashpool37 Před 2 lety +83

      Unless I completely missed the point and you actually meant to run a Windows server executable inside a Windows VM on a Linux-based hypervisor. Then it could work.

    • @Jmcgee1125
      @Jmcgee1125 Před 2 lety +78

      @@Ashpool37 There is no "point" lol this is just a stupid idea. But anyway, I meant the latter.

    • @lnmr
      @lnmr Před 2 lety +5

      Running server under Wine doesn't do the same job without hurting the performance?

  • @greenlemon9155
    @greenlemon9155 Před 2 lety +1210

    and i thought some year ago that they changed it from 41 to 40 intentionally ... but now knowing they "fixed" it by changing the server OS is marvelous

    • @solsane5217
      @solsane5217 Před 2 lety +69

      I mean valve servers always ran Linux afaik

    • @ketchup901
      @ketchup901 Před 2 lety +31

      @@solsane5217 The Linux version was released in 2012 so I don't think so unless there was only the server software before.

    • @marioman1242
      @marioman1242 Před 2 lety +81

      @@ketchup901 There were no Valve servers in 2012. Valve servers only became a thing when they introduced Casual mode in 2016.

    • @Cat_in_The-Box
      @Cat_in_The-Box Před 2 lety +91

      @@ketchup901 game client yes, but server binaries for linux were available always iirc

    • @marioman1242
      @marioman1242 Před 2 lety +11

      @@jeeBisOkay After searching, you do seem to be correct. They weren't in my country ¯\_(ツ)_/¯

  • @GuyFromCanada
    @GuyFromCanada Před 2 lety +1082

    Your editing doesn’t get as much love as it should; it’s so clean, and it helps with understanding a lot. Thank you for putting lots of effort into editing!

    • @dat_fast_boi
      @dat_fast_boi Před 2 lety +15

      the reason I know of this channel at all is because of the KILLER thumbnail / title combo of the "weird hitboxes lets you shoot through dudes sometimes" (paraphrased) video
      I kinda wish more of his thumbnails captured the same energy as that one, but nevertheless I'm more than content with the editing and content within the videos themselves.

    • @Local_Lad
      @Local_Lad Před 2 lety +3

      Yeah the editing is phenomenal.

    • @FightingMario54321
      @FightingMario54321 Před 2 lety +3

      agreed

    • @puro7706
      @puro7706 Před rokem

      no

    • @fady4755
      @fady4755 Před 3 měsíci

      It reminds me of Marblr videos on overwatch explaining bugs, his editing kinda similar

  • @Mikusch_
    @Mikusch_ Před 2 lety +1689

    Important to note that float->int conversions will always truncate the extra precision. Valve made the deliberate choice to round up here, when they should have used a round-to-nearest algorithm instead.

    • @DragonBallZKaifan2
      @DragonBallZKaifan2 Před 2 lety +33

      Would doing that use more processing power or time or something? Obviously nowadays the difference is probably microscopic on a newer processor, so I am thinking more about the impact it would have had on a processor built between 2003-2008. (I choose that large of a range because TF2 uses a variant if the HL2 engine, which came out in 2004.)

    • @tfwmemedumpster
      @tfwmemedumpster Před 2 lety +385

      @@DragonBallZKaifan2 no, they did it because damage should be rounded up (else chip damage would be rounded to zero at far range) and they recycled the function

    • @shigekax
      @shigekax Před 2 lety +8

      They also could have used fixed values

    • @GreenScrapBot
      @GreenScrapBot Před 2 lety +106

      @@shigekax Fixed values would mean, they need to define the values for each possible combination of max-amount of resource and type of resource. With dozens of weapons that change max-health or max-ammo for each class, this would be near impossible to manage.

    • @Henrix1998
      @Henrix1998 Před 2 lety +16

      @@GreenScrapBot and that's where we get to fixed point numbers

  • @adamdapatsfan
    @adamdapatsfan Před 2 lety +459

    As a compsci guy, I appreciated just how well you condensed the entire compiler/machine code segment. Very approachable!

  • @JouvaMoufette
    @JouvaMoufette Před 2 lety +287

    For those wondering, MULSSSSSSSSSSS means Multiply Single Scalar. Single as in single precision. Precision being number of decimal points to the right.

    • @thekilla1234
      @thekilla1234 Před 2 lety +33

      And "scalar" is basically just fancy math speak for "number".

  • @KarolOfGutovo
    @KarolOfGutovo Před 2 lety +202

    The way that TF2 seemingly conspires with the very fabric of computing to create ridiculous spychecks has me in love with the game. I don't play it, more like, adore how it has all that wackiness in both code and lore.

  • @krakkywakky863
    @krakkywakky863 Před 2 lety +246

    Alternate title: how to find whether the server owner has windows or linux

  • @ldctv944
    @ldctv944 Před 2 lety +430

    Looks like Dane's going to have to update Uncletopia to Windows. Can't be missing that 1 metal.

    • @seronymus
      @seronymus Před 2 lety

      Uncletopia is a Reddity suck fest anyways

    • @ducky1681
      @ducky1681 Před 2 lety +71

      Wouldn't call it an update, because running servers on Windows is just hell on earth. (In my opinion, running desktops also is)
      *But definitely worth it for the 1 extra ammo*

    • @matthewrease2376
      @matthewrease2376 Před 2 lety +4

      @unsubtract even if the performance improved it would be a step backwards lol

    • @frozenturbo8623
      @frozenturbo8623 Před 2 lety +4

      @unsubtract But it's worth it for 1 more metal

  • @carlington2989
    @carlington2989 Před 2 lety +1076

    That’s not spaghetti code anymore, it’s more like a hydra that you have been trying to kill for the past decade and it has grown so many heads, they started to intertwine with each other and make the creature unable to do anything.
    You still can’t kill it tho

    • @RustyNova
      @RustyNova Před 2 lety +101

      Nah. It's just that's just a very unlucky case. The dev isn't to blame here. Easy to fix too

    • @SU76M
      @SU76M Před 2 lety +51

      What, again that annoying "sPaGhEtTi" forced meme?

    • @carlington2989
      @carlington2989 Před 2 lety +15

      @@RustyNova yeah for me it’s just the fact that it’s been so long since the game release and people still discover new bugs and exploits every now and then. It’s kinda funny.

    • @Thebooooy
      @Thebooooy Před 2 lety +10

      This is the best analogy for tf2's code I've ever heard

    • @somerand0mpers0n
      @somerand0mpers0n Před 2 lety +8

      @@SU76M what are you

  • @LiveseyKnight
    @LiveseyKnight Před 2 lety +1111

    so this is why we're infested with bots, linux users are upset over the less metal

    • @kur0nezumi315
      @kur0nezumi315 Před 2 lety +176

      I mean bots love metal. Makes sense

    • @chirnosans
      @chirnosans Před 2 lety +4

      I am :rage:

    • @k4t13s
      @k4t13s Před 2 lety

      what?

    • @uis246
      @uis246 Před 2 lety +3

      REALLY upset

    • @unfa00
      @unfa00 Před 2 lety +33

      Everyone knows we, the Linux users are METAL AF.
      (Just joking, I'm more of an EDM guy)

  • @AzureWoof
    @AzureWoof Před 2 lety +578

    well, you see, the extra bullet is supposed to be used for ending the windows user's life in case they get surrounded by bots (who all run on linux)

    • @Alkaris
      @Alkaris Před 2 lety +55

      Actually these bots you find on TF2 today are actually all running Windows machines. You can pull up a statistics page of users on TF2 and OS Statistics and shows that 99% of these bots are running off Windows machines.

    • @Commrade-DOGE
      @Commrade-DOGE Před 2 lety +57

      @@Alkaris what are the 1% on?
      Temple OS?

    • @daedliy963
      @daedliy963 Před 2 lety +17

      @@Commrade-DOGE Mac..

    • @AzureWoof
      @AzureWoof Před 2 lety +11

      @@Alkaris The cheat software they use only runs on Linux. Unless they made a windows version that I don't know about.

    • @gtPacheko
      @gtPacheko Před 2 lety +34

      @@AzureWoof The software has always been on Windows. Things are ported.
      It's easier on Linux, but most people run Windows and cheat on Windows. I play TF2 on Linux, play. I'm not a bot.

  • @bugjams
    @bugjams Před 2 lety +43

    "This is TF2's code."
    _Dear god..._
    "There's more."
    *_NO._*

    • @ChillerDragon
      @ChillerDragon Před 3 měsíci

      As someone who has nothing todo with the game I find it a bit misleading that this is mentioned in the video without any note. Gives the impression that tf2 has been decompiled or source leaked.

    • @fus132
      @fus132 Před 3 měsíci

      @@ChillerDragon It was source leaked a few years back

    • @ChillerDragon
      @ChillerDragon Před 3 měsíci

      @@fus132 ah I see thanks. But I assume that’s not the code shown in the video is it?

  • @XFanmarX
    @XFanmarX Před 2 lety +64

    MULSSSS
    I have no idea how you manage to keep finding things, AND make it entertaining for us to watch. You're becoming kind of legend! Thanks!

    • @collection6062
      @collection6062 Před 2 lety +2

      mulhissssssss.... mulhissssssss....mulhissssssss....mulhissssssss....

  • @VerticalCalzone
    @VerticalCalzone Před 2 lety +69

    Words cannot describe how impressed I am that you found this. The "41 metal" problem has been bugging me for years, and I had just assumed it was caused by a million different parts of the spaghetti code working together in exactly the wrong way

  • @JetSetDman
    @JetSetDman Před 2 lety +24

    “This is TF2’s code, basically the recipe for TF2.”
    Nah man, that’s the recipe for spaghetti

  • @Lemon_Inspector
    @Lemon_Inspector Před 2 lety +58

    FMUL (Floating MULtiply) operates on the venerable extended-precision (80-bit) x87 FPU registers. MULSS (MULtiply Scalar Single-precision) is a single-precision (32-bit) instruction that's a part of the more recent (1999) SSE instruction set.
    In either case, the result is getting passed to the ceil() function to round it up, when perhaps it should be rounded to the nearest integer instead.
    The ceil function takes a double-precision (64-bit) argument, so the extended-precision value gets truncated, but it's still enough precision to foul up the calculation.
    So the real bug here is Valve rounding UP instead of just ROUNDING, but it could have been avoided if they checked the box in Microsoft Visual Studio that says the game doesn't have to run on a Pentium II from 1997.

    • @TheToomykins
      @TheToomykins Před 2 lety +9

      they used ceil because the same function is used for damage, and as such chip damage could do 0 damage if not ceiled.

    • @Lemon_Inspector
      @Lemon_Inspector Před 2 lety +3

      ​@@TheToomykins Which function? You mean the ceiling function? Because that's nonsense. That's like saying hair stylists should wear welding masks because welders also wear welding masks, because if they didn't they'd burn out their retinas.

    • @Lemon_Inspector
      @Lemon_Inspector Před 2 lety +1

      @@TheToomykins Which function is that?

    • @metarmask
      @metarmask Před 2 lety +3

      Just like with damage there are debuffs (metal_pickup_decreased) which decrease the amount you receive. It doesn't make sense to receive nothing, to play a sound and display +/- when you aren't actually receiving anything. And if you picked up 3 ammo packs which each should give you 43 ⅓ metal based on all your current buffs/debuffs, you would expect to have enough for a sentry, but if you rounded to the nearest you would only have 129. A bit contrived, but still, as a player I would rather have more of something than less of it.

    • @Lemon_Inspector
      @Lemon_Inspector Před 2 lety +1

      @D M My guess is that they used the default options and didn't bother with compiler optimization, which in itself is a bit strange.

  • @OkamioftheRinnegan
    @OkamioftheRinnegan Před 2 lety +56

    To quote the infinite wisdom of Valve programmers: use an EPSILON damnit!!

  • @tubebrocoli
    @tubebrocoli Před 2 lety +53

    Someone might argue this means Valve only tested their game on Linux. While not technically incorrect, it's more likely they just didn't test it at all.

  • @rumpus5633
    @rumpus5633 Před 2 lety +16

    Tf2 tech in 2009: you can use your rocket launcher to get up on high places
    Tf2 tech in 2022: you can identify a disguised spy on a windows server by a computing irregularity which seems to add another point of health to the spy whenever he picks up a small hp kit

    • @lychy645
      @lychy645 Před 2 lety +2

      that bug was in since 2007

  • @D0Samp
    @D0Samp Před 2 lety +76

    I know that TF2 is still a 32-bit binary on Windows, but I wouldn't have expected that Visual Studio 2015 (guessing from the linker version 14.00 for all binaries in the TF2 directory) still makes such heavy use of x87 instructions for that target by default.

    • @juango500
      @juango500 Před 2 lety +4

      x87?

    • @matthewrease2376
      @matthewrease2376 Před 2 lety +16

      @@juango500 I believe that refers to special floating point or other arithmetic instructions that used to be on their own chip. The 8087 math coprocessor. Now they're part of any regular x86 processor if I had to guess.

    • @D0Samp
      @D0Samp Před 2 lety +14

      Yes, FMUL is the original instruction for floating-point multiplication that has existed since Intel's first math coprocessor. Those instructions use an intermediate format that has more precision than the output, which can give slightly different results.
      MULSS on the other hand uses the SSE vector registers, which strictly compute according to the requested format (single-precision in this case, what the second S stands for).

    • @lychy645
      @lychy645 Před 2 lety

      I dont understand, /arch:SSE makes use of fmul but /arch:SSE2 makes use of mulss

    • @D0Samp
      @D0Samp Před 2 lety +4

      @@lychy645 Both 32-bit MSVC and GCC are pretty reluctant to use just SSE1 on scalar values unless you enable maximum optimizations (-Ofast for the latter). Maybe it's because the original processors only could crunch both halves of XMM registers in succession.
      Clang on the other hand emits MULSS for -march=pentium3 and higher even without an optimization level.

  • @rowrow_
    @rowrow_ Před 2 lety +31

    Oh my goodness, I *always* noticed this and never knew why sometimes it was 41 instead of 40. Your videos have been such a treat as a veteran TF2 player for almost a decade now.

  • @lychy645
    @lychy645 Před 2 lety +65

    This is like when one of the devs responsible for porting HL2 to VR, had some door stay closed rather than opening because a function returned something slightly different because of the switchover from x87 to SSE

    • @nuclearbomb9483
      @nuclearbomb9483 Před 2 lety +1

      x87?

    • @lychy645
      @lychy645 Před 2 lety +9

      @@nuclearbomb9483 the new instructions that were added in the 8087 processor

    • @mars5train601
      @mars5train601 Před 2 lety +7

      The 87th instructions is to make your computer restart and install updates

    • @Selicre
      @Selicre Před 2 lety +3

      @@nuclearbomb9483 The old, 32-bit way to work with floating point numbers. SSE is used in 64-bit mode.

    • @lychy645
      @lychy645 Před rokem

      @@Selicre nope

  • @kalerug
    @kalerug Před 2 lety +572

    Yet another game oddity I noticed but never gave a deeper thought to. Love how even when it isn't Source's fault TF2 manages to have spaghetti code
    Edit: Okay I'm just going to change the comment entirely

    • @uis246
      @uis246 Před 2 lety +43

      This is also microsoft's spaghetti

    • @godslayer9000
      @godslayer9000 Před 2 lety +22

      Source Spaghetti is slowly getting more and more closer to being classified as an actual SCP

    • @wojtekpolska1013
      @wojtekpolska1013 Před 2 lety +48

      ​@@uis246 its not microsoft's or windows's or valve's fault. it's fault is entirely of the compiler using the wrong instruction.

    • @KyleBrownIsALoser
      @KyleBrownIsALoser Před 2 lety +1

      Source Spaghetti is slowly turning into a Source Pile of Snakes

    • @2b2useful
      @2b2useful Před 2 lety +9

      it's the fault of the way how computer computes numbers, this is way to deeper than you expect

  • @BonziBUDDY
    @BonziBUDDY Před 2 lety +47

    I remember at one point in time you could get 1 more health from small health kits as well, but I don't know when that was patched

  • @unholy_person
    @unholy_person Před rokem +8

    "HOW DID YOU KNOW I WAS A SPY?!"
    "you got one too much hp from the small health pack"

  • @pandakekok7319
    @pandakekok7319 Před 2 lety +13

    Imagine being a Spy and getting confused how the fuck the enemy team knew you're a Spy despite not doing something suspicious at all. And it turns out it's due to a freaking health pack

  • @incoherentbabbler4636
    @incoherentbabbler4636 Před 2 lety +39

    I swear, if I get rumbled as spy on a windows server just because someone used the health bar trick...

  • @normalusername5223
    @normalusername5223 Před 2 lety +15

    For those who are curious: fmul is shorthand for "function multiply" and mulss is shorthand for "multiply some shit"

    • @jomo_sh
      @jomo_sh Před 2 lety +3

      not float multiply?
      and multiply single scalar?

  • @-Raylight
    @-Raylight Před 2 lety +129

    This is completely broken, will totally change the engineer meta. Need Heavy Update ASAP 😂😂
    *"Windows, that's scary"* -Gaben

    • @ducky1681
      @ducky1681 Před 2 lety +4

      My thoughts exactly, Gabe... *My thoughts exactly*

    • @iliakatster
      @iliakatster Před 2 lety +2

      Gaben was part of the team that coded the first version of windows, so if he can't figure it out, no one can.

    • @matthewrease2376
      @matthewrease2376 Před 2 lety +2

      @@iliakatster I'm pretty sure even Windows engineers get frustrated at Windows tbh

    • @user-ed1yt5zl5j
      @user-ed1yt5zl5j Před 2 lety

      And that`s the real reason why SteamOS is linux based

  • @jacobwoodman4488
    @jacobwoodman4488 Před 2 lety +1

    I've always wondered this! Thankyou for sharing, It's a great breakdown of the differences between compilers and unintended consequences of them. I also like all the quality visual editing making things really clear, even the small detail of making the linux and windows code compiler images have slightly different lights from each other. Excellent video as always ♥

  • @IgorFerreira69
    @IgorFerreira69 Před 2 lety +1

    Just a great video, great explanation, great editing. Easy to understand with the comparison of both compilers. Thank you and congrats! ^.^

  • @damsen978
    @damsen978 Před 2 lety +4

    I love these kinds of videos, thanks for making them shounic.

  • @NintenGunner
    @NintenGunner Před 2 lety +7

    I only just now noticed that I got 1 extra metal/ammo whenever I played via private. That is so weird, thank you Shoe-Nick for blessing us.

  • @Joheskiller_
    @Joheskiller_ Před rokem +2

    This is absolutely interesting, I wanted to listen the video in background while doing other things, but without even notice, I watched everything with fascination. As worker in the video-game industry, I'm really passionate and curious about those really tiny details, I will truly look for the rest of this channel!

  • @NymphieJP
    @NymphieJP Před 2 lety +22

    Really holding out for dx8 and crit glow bug and why it happens :( Love this vid as always!

    • @LonelySpaceDetective
      @LonelySpaceDetective Před 2 lety +10

      IIRC it's not really a bug so much as the DX8 renderer not supporting what makes the crit glow possible. I could be wrong though!

  • @thetuerk
    @thetuerk Před 2 lety +9

    "We're going to be here for 2 hours if I explain everything"
    *video is only 4 minutes long*
    Hello operator, I would like to report a ROBERY!

  • @iliakatster
    @iliakatster Před 2 lety +40

    Gaben helped code windows, only he knows the true horrors that lie beneath its surface

    • @nbhjbhyvgbhyuvbhuynnjbhu
      @nbhjbhyvgbhyuvbhuynnjbhu Před rokem +1

      this is a compiler problem

    • @lucass8119
      @lucass8119 Před 6 měsíci

      @@nbhjbhyvgbhyuvbhuynnjbhu MSVC is a Microsoft product too. No wonder its wonky

    • @cewla3348
      @cewla3348 Před 4 měsíci

      @@nbhjbhyvgbhyuvbhuynnjbhu
      'code windows' and the compiler isn't part of windows?

    • @zbelios1623
      @zbelios1623 Před 4 měsíci

      @@cewla3348 no? compilers are just programs like any other. it's not a 'part of windows'

    • @ItsCOMMANDer_
      @ItsCOMMANDer_ Před 3 měsíci

      ​@@cewla3348no, its a program for windows

  • @lilthreegame7991
    @lilthreegame7991 Před rokem +2

    My favorite part of this channel is how you go into depth about WHY specifically things work the way they do, not just that it happens.
    It's by far my favorite stuff to learn about.

  • @ohio2440
    @ohio2440 Před 2 lety +1

    Very good job on the video shounic!

  • @Kaelygon
    @Kaelygon Před 2 lety +6

    I had similar problem with a custom shader that I wrote for Unity.
    People with Nvidia cards didn't have any issues, but people who were using AMD cards, float to integer casting would result a different value which caused one crucial function to break on AMD cards.
    This was likely because I had done the casting in a weird way and debugging it without owning an AMD card was a nightmare

  • @wrednax8594
    @wrednax8594 Před 2 lety +13

    Goddamn linux, that 1 metal could have helped win the match

    • @tauon_
      @tauon_ Před rokem

      it’s msvc’s fault
      (but really it’s valve’s fault)

  • @jonathandavidson2468
    @jonathandavidson2468 Před 2 lety

    Man I love the way you create your videos, your title already answers the exact topic for people who are experienced in programming. I'm currently a games programming student at university and when I read that title I was thinking "yep there's a floating point precision error somewhere cause I know for sure the health is a float cause I've had 0 HP before.", even though it's not the right term to use, I still think it's right, as one floating point result is different than the other on a different OS.
    Your titles, your editing and your explanation to the design of the game's programming leading to the problem is insane, and I envy you so much on how you write these. I wish I could do this..!
    Great content, loving it. :)

  • @PoppinPeelz
    @PoppinPeelz Před 2 lety

    The ending clip is always so funny. Loved the vid!

  • @StarLink149
    @StarLink149 Před 2 lety +9

    Now imagine this wasn't just a game but a nuclear missile launch system.

    • @matthewrease2376
      @matthewrease2376 Před 2 lety +8

      Oh man, now I'm imagining all of the world's nukes are running on Windows machines... I feel so much less safe now...

    • @SliceJosiah
      @SliceJosiah Před 2 lety

      @@matthewrease2376 You better be glad they aren't. Now we just need to make sure it isn't running on anything else.

    • @devihcra
      @devihcra Před 2 lety +1

      @@SliceJosiah apple is pulling all the strings

    • @SliceJosiah
      @SliceJosiah Před 2 lety

      @@devihcra 😳 That too...

    • @JouvaMoufette
      @JouvaMoufette Před rokem +9

      If I recall, Microsoft actually has or had language in their license agreement that says it's not for use on things such as life support systems or missile systems

  • @unfa00
    @unfa00 Před 2 lety +28

    Being a Linux user I found this video to be a really interesting look into the technical challenges of multiplying two numbers.
    It's ironic that the Windows compiler produced code that tried to be more precise during these calculations, but it actually made it worse.

    • @AmaroqStarwind
      @AmaroqStarwind Před 2 lety +6

      Because it always rounds up instead of rounding to the nearest. *headshaking*

    • @itsjustaburningname3685
      @itsjustaburningname3685 Před 2 lety +1

      It feels like you could almost make it work by specifying when to round up or to the nearest depending on the situation, but knowing how much of a monster the spaghetti code for TF2 is, that would probably introduce more problems...

    • @uis246
      @uis246 Před 2 lety

      Держись

  • @PassTheSnails
    @PassTheSnails Před 2 lety +1

    A moment of appreciation for you shounic, your thumbnails are in my opinion some of the best on the site.

  • @michellet6557
    @michellet6557 Před 2 lety

    Always enjoy your videos. Good job!

  • @j4ff4c3ks1
    @j4ff4c3ks1 Před 2 lety +4

    As an engineer main, i remember that weird non-round number, 41, and i always wondered where that +1 metal went. Never woulda guessed it would be operating system dependent

  • @leoneldiaz78
    @leoneldiaz78 Před 2 lety +7

    One day Shounic is going to go rogue and use his intimate knowledge to shape tf2 to whatever he wills it to be.

  • @quennnpfeufa7978
    @quennnpfeufa7978 Před 2 lety +1

    Great video, as always! :)

  • @nickybakes
    @nickybakes Před 2 lety +1

    I had a map from a couple years ago, pd_meme_machine, that never crashed until it was ran on a specific server. I looked at every possibility for what could be causing it to just randomly crash the server. Closest I got to figuring it out is that it always worked on a Windows server, and crashed the Linux servers (or vise versa, I can’t remember lol). Possibly due to some weird number or rounding issue that was different on each OS, screwing with the game logic or physics. Cool video shounic!

  • @SpiritedSpy
    @SpiritedSpy Před 2 lety +9

    just want to say this right now, genuinely in love with this channel (for multiple reasons) but maybe the biggest is the fact that you are far more immune to the clickbait sin that plauges most of this platform nowadays. i can see this video in my recommended, read the title, then instantly know the answer for the most part, and if im interested to know more i can watch the short and to the point video that will explain it for me. anyone else could have easily called it "THIS WEIRD BUG GIVES YOU (41) METAL?!" and i would never - ever - care to click on it because nothing about that interests me really. but nope, far better title here.

  • @mfaizsyahmi
    @mfaizsyahmi Před 2 lety +4

    The Gaben closer is somewhat relevant in this case. Gaben _did_ worked on the first 3 versions of Windows.

  • @Lagggerengineering
    @Lagggerengineering Před 2 lety +1

    Oh my god, I KNEW IT! I knew I wasn't crazy!
    I distinctly remember getting 41 ammo from small packs but never being able to replicate it, thought an update fixed it.
    Thank you for the explanation!

  • @wckiid
    @wckiid Před 4 měsíci

    Thank you for releasing the best of information

  • @robinrai4973
    @robinrai4973 Před 2 lety +3

    Flipping awesome, I'm guessing this is why level 3 sentries sometimes get 217 health

  • @foxeye245
    @foxeye245 Před 2 lety +4

    I always thought it was weird that I would get 41 metal when playing offline. Now I understand why.

  • @mcintoshpc
    @mcintoshpc Před 2 lety

    THANK YOU for finally explaining this
    Also sick they released batsaber for engi

  • @-Three-
    @-Three- Před rokem +1

    love the fact you used differing teams to differ between linux and windows examples, small touch but very helpful

  • @OliverWolf621
    @OliverWolf621 Před měsícem +4

    AS OF THE 64 BIT UPDATE, THIS HAS BEEN PATCHED!
    Small med and ammo kits now give exactly 20% on windows servers!

  • @dovahkat9635
    @dovahkat9635 Před rokem +3

    When you think about it, the only reason it would need to run a calculation instead of just dictating a set value is because MvM exists. So thank MvM for your extra metal engies.

    • @shinobuoshino5066
      @shinobuoshino5066 Před 4 měsíci +1

      which is completely ridiculous given that MvM gamecode doesn't belong in base game.

    • @shinobuoshino5066
      @shinobuoshino5066 Před 4 měsíci

      @@krowta2062 not relevant whatsoever.

  • @fantasticoproduction
    @fantasticoproduction Před 2 lety

    i literally had to fix a bug like this at work this week lol funny you are discussing it :D

  • @KK-mo9df
    @KK-mo9df Před 2 lety +1

    Tbh, I wouldn't mind being here for 2 hours listening to you explain everything

  • @qineth
    @qineth Před 2 lety +60

    As the only person who plays everything on Linux, this is a personal attack.

    • @WalleBot
      @WalleBot Před 2 lety +23

      this is serverside, not client, so unless you're running the game locally it shouldn't affect you

    • @matthewrease2376
      @matthewrease2376 Před 2 lety +5

      Nah bother, you ain't the only one ✊

    • @Rickmonas90
      @Rickmonas90 Před rokem

      L

    • @Ali.F
      @Ali.F Před 3 měsíci

      Hello homie

  • @NeoNuc2
    @NeoNuc2 Před 2 lety +5

    So true quesion is; why valve selected x0.2 instead of /5.
    Latter one should give much accurate number.

    • @ambreiaju
      @ambreiaju Před 2 lety +3

      because Valve obviously...

    • @armageddoncatfish4154
      @armageddoncatfish4154 Před 2 lety +9

      At a machine level, addition and subtraction are equally as complex, multiplication is much more complex than both, and division is mountains above multiplication. Not only would dividing by 5 be technically a harder computational operation for the machine with no greater accuracy, I wouldn't be surprised if the compiler would try and convert it into multiplication anyway.

    • @wojtekpolska1013
      @wojtekpolska1013 Před 2 lety +1

      its the multiplier of the ammo pack.
      Small ammo pack has 0.2 multiplier, medium has 0.5, big has 1.0 multiplier.
      It would simply be harder in the code to implement the division instead, they couldn't use the formula x=multiplier*max_ammo anymore. and besides, they simply didnt know that would happen.

    • @HaartieeTRUE
      @HaartieeTRUE Před 2 lety

      @@wojtekpolska1013 what i really don't understand is where the 0.20000000(29.....) comes from. If i define float n = 0.2, shouldn't it be an exact 0.2 ?

    • @lubieplacki2772
      @lubieplacki2772 Před 2 lety

      @@HaartieeTRUE It won't be because computers use binary, they cannot have 0.2, cannot comprehend it. It must be some combination of ones and zeroes at the bottom of it all. 0.2 is 1/5th, in binary it is similar to decimal 1/3rd.

  • @figboot
    @figboot Před rokem +1

    thank you MSVC, very cool

  • @626Link
    @626Link Před 2 lety

    I will never not be fascinated by your random, very strange tf2 trivia.

  • @JTCF
    @JTCF Před 2 lety +8

    I'm using Linux as my daily driver, so when I host a server, it's the same as valve server :P

  • @KalinGames
    @KalinGames Před 2 lety +8

    Cool video, i think i've never seen the 41 metal thing, i'm pretty sure i'd notice such an ocd inducing thing
    Quick question, do you know what's the deal with the reloading and touching the resupply cabinet, when you do you end up with 1 fewer round in reserve.
    Stay safe m'man

    • @shieldlesscap6124
      @shieldlesscap6124 Před 2 lety +9

      You start the reload animation, you’re going to fill your clip, then you touch a resupply cabinet. Your reserve and your clip are both full, but the reload animation continues, so it subtracts 1 from your reserves and adds it to your clip. Since the clip size is capped, it doesn’t actually change, but the ammo from your reserves still got subtracted.

    • @louizeandrei
      @louizeandrei Před 2 lety +2

      I hate it when that happens, I'm pretty sure 1 less ammo is fine and I can just pick an enemy's ammopack but I can't stand seeing it almost full

    • @NicknineTheEagle
      @NicknineTheEagle Před 2 lety +1

      @@shieldlesscap6124 is correct. I've fixed that in TF2 Classic for what it's worth.

  • @calebhisel1109
    @calebhisel1109 Před rokem

    I've actually experienced this, and I'm glad I finally have an explination!

  • @MeowieGamer
    @MeowieGamer Před rokem +1

    4:31 I can agree, windows is terrifying

  • @JoHn-gi1lb
    @JoHn-gi1lb Před 2 lety +9

    these animations are really good. does anyone have tutorials for this kind of stuff?

  • @dclc
    @dclc Před 2 lety +27

    we can't let windows be better than linux in any way tho

    • @kodicraft
      @kodicraft Před 2 lety +14

      Someone should make a mod which increases the metal gain to 42 only if you're on Linux

    • @pog2824
      @pog2824 Před 2 lety +1

      @@kodicraft yes we need to do it

  • @LucarioredLR
    @LucarioredLR Před 2 lety +2

    can't wait to see the TF2 wiki now show about this
    also 4:04 poor spy mains can't catch a break

  • @a224kkk
    @a224kkk Před 3 měsíci

    Nice technical explanation

  • @robbie1528
    @robbie1528 Před 2 lety +4

    "This is what I get for working at Microsoft."
    -GabeN a.k.a God himself

  • @HowToMolly
    @HowToMolly Před 2 lety +5

    mulsssssssssssssss

  • @ErisEntropy
    @ErisEntropy Před 4 měsíci +1

    0:58 the screen going red I thought for a second I was about to actually be here for two hours

  • @chenmarisa7879
    @chenmarisa7879 Před rokem +1

    no please do stay here for hours and explain everything, i love these videos

  • @JTCF
    @JTCF Před 2 lety +23

    All this big talk about how Valve loves Linux and then this gets discovered...
    /s just to make sure everyone gets the joke.

  • @Kylemsguy
    @Kylemsguy Před 2 lety +6

    Just a note: the fmul text at 2:15 was really hard to read for me. If you could use a combination with different brightnesses it would help a lot. Thanks!

    • @jomo_sh
      @jomo_sh Před 2 lety +2

      skill issue

    • @aro2866
      @aro2866 Před 2 lety +1

      @@jomo_sh This reply is actually pretty valuable, since with it we know have a perfect textbook example to use when explaining what ableism is.

    • @JohnSmith-me4ik
      @JohnSmith-me4ik Před 2 lety

      @@aro2866 yeah like your inability to take a joke

  • @TheDolphinTuna
    @TheDolphinTuna Před 2 lety +1

    This is pretty wild.

  • @BrigadierKetchup
    @BrigadierKetchup Před 2 lety

    thanks shounic! i was looking for a reason to switch back to our corporate overlord's dystopian operating system

  • @avivagmon9315
    @avivagmon9315 Před 2 lety +12

    i think shounic knows tf2's spaghetti code better then the developers at this point

    • @Kuratius
      @Kuratius Před 2 lety

      He should take over after the last tf2 developer dies.

  • @Maaar10Avali
    @Maaar10Avali Před 2 lety +6

    Im literally gay rn

  • @decline6561
    @decline6561 Před 2 lety

    Fantastic explanation

  • @CoolJosh3k
    @CoolJosh3k Před 2 lety +1

    I’ve come across compiler differences before like this and it is so easy to miss.

  • @jeffystreet
    @jeffystreet Před 2 lety +5

    I'm only 15 and I fucking airboat

  • @mr.slappii513
    @mr.slappii513 Před rokem +3

    Windows is a direct upgrade to Linux confirmed.

    • @BoneMareOh
      @BoneMareOh Před rokem

      no it is not

    • @UberSpah
      @UberSpah Před 11 měsíci

      @@BoneMareOh In games, it is.

    • @BoneMareOh
      @BoneMareOh Před 11 měsíci

      @@UberSpah tf you on about. most games run better on linux

    • @Norim_
      @Norim_ Před 9 měsíci +1

      ​@@BoneMareOhsure it runs better but the very second you install Linux you become a femboy

  • @mtxn
    @mtxn Před 2 lety

    that explains why my code is buggy on Windows. thanks for the solution. and a nice example of a cross-platform glitch. even in tf2 videos there may be something about low-level / computer-science stuff

  • @L1Q
    @L1Q Před 2 lety

    THE CLARITY! The clarity of your explanation is unchallengeable by anything I've seen before. And I don't say that lightly.

  • @RokeJulianLockhart.s13ouq

    By "Linux compiler" and "Windows compiler", do you mean GCC and MSVC respectively?

  • @wojtekpolska1013
    @wojtekpolska1013 Před 2 lety +9

    Seems that ppl in the comments still dont understand the video:
    1. It is *not* Microsoft's nor Windows's nor Valve's fault. the fault is entirely of the compiler using the wrong instruction when interpreting the game code.
    2. It does *not* give Windows users an advantage, nor a disadvantage to Linux users. Almost all TF2 servers are hosted on Linux (Valve official servers, and most online services that allow you to pay for a server to host a game). Within one server, the players all will get the same ammo & metal, no matter their OS. So on Linux server, *BOTH* Windows and Linux users will get 40 metal from small ammo pack, and on Windows server, both will get 41.
    It provides no advantage to anyone, the bug only comes in effect, when a Windows user hosts a server on their own PC (Windows Server is much less popular than Linux), and then everyone no matter their OS gets 41 metal.

    • @the_alexbrock
      @the_alexbrock Před 2 lety +3

      It is Valve's fault, though. The issue is that the code that handles this is told to round up decimal numbers. Nothing to do with the compiler.

    • @megaing1322
      @megaing1322 Před 2 lety +3

      It's also not the fault of the compiler (after all, not like the compiler knows which result you want). If you want to blame anyone, blame Valve for not thinking about floating point weirdness and just rounding manually.

    • @hademvids
      @hademvids Před 2 lety

      Woosh

    • @Lemon_Inspector
      @Lemon_Inspector Před 2 lety +1

      saying that it's Microsoft Visual C++'s fault and not Microsoft's fault is... a curious distinction.

  • @lychy645
    @lychy645 Před 2 lety

    superb!

  • @aaclovern9804
    @aaclovern9804 Před 2 lety

    Shounic's channel is like to-do list for tf2 devs to go through