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

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 1,4 тыс.

  • @LucyTheBox
    @LucyTheBox 2 года назад +4057

    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 2 года назад +3005

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

    • @sythrus
      @sythrus 2 года назад +128

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

    • @Spacebugg
      @Spacebugg 2 года назад +48

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

    • @sythrus
      @sythrus 2 года назад +60

      @@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 2 года назад +20

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

    • @Spacebugg
      @Spacebugg 2 года назад +12

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

  • @sweetiecandy4885
    @sweetiecandy4885 2 года назад +4408

    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 2 года назад +81

      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 2 года назад +166

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

    • @kingding9542
      @kingding9542 2 года назад +8

      Sleep well

    • @misterk7_-
      @misterk7_- 2 года назад +2

      I felt that last sentence bro

    • @NicknineTheEagle
      @NicknineTheEagle 2 года назад +55

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

  • @Jmcgee1125
    @Jmcgee1125 2 года назад +3831

    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 2 года назад +190

      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 2 года назад

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

    • @Ashpool37
      @Ashpool37 2 года назад +86

      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 2 года назад +80

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

    • @lnmr
      @lnmr 2 года назад +5

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

  • @milesmacmahon6001
    @milesmacmahon6001 2 года назад +8634

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

    • @uis246
      @uis246 2 года назад +92

      It is server logic, not client

    • @Nikkibuh
      @Nikkibuh 2 года назад +629

      issa joke

    • @waffles4670
      @waffles4670 2 года назад +565

      "hey consumers, if you buy our product you get a whole extra bullet in your ammo packs!" switch now!

    • @purpleguy_009sexy_meme_boi2
      @purpleguy_009sexy_meme_boi2 2 года назад

      @@uis246 retarb moment

    • @akurasubject9617
      @akurasubject9617 2 года назад +24

      @@waffles4670 windows is free lol

  • @greenlemon9155
    @greenlemon9155 2 года назад +1269

    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 2 года назад +70

      I mean valve servers always ran Linux afaik

    • @ketchup901
      @ketchup901 2 года назад +33

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

    • @marioman1242
      @marioman1242 2 года назад +85

      @@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 2 года назад +92

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

    • @marioman1242
      @marioman1242 2 года назад +11

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

  • @KarolOfGutovo
    @KarolOfGutovo 2 года назад +216

    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.

  • @GuyFromCanada
    @GuyFromCanada 2 года назад +1087

    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!

    • @miner_fabs
      @miner_fabs 2 года назад +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 2 года назад +3

      Yeah the editing is phenomenal.

    • @FightingMario54321
      @FightingMario54321 2 года назад +3

      agreed

    • @puro7706
      @puro7706 2 года назад

      no

    • @fady4755
      @fady4755 11 месяцев назад

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

  • @adamdapatsfan
    @adamdapatsfan 2 года назад +464

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

  • @krakkywakky863
    @krakkywakky863 2 года назад +297

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

    • @Jojo_clowning
      @Jojo_clowning 2 года назад +10

      Thanks for the idea

    • @nataliaborys1554
      @nataliaborys1554 Месяц назад

      You can then run statistics and find out what percentage of tf2 community server hosters run Windows vs Linux, like a scientific study

  • @JouvaMoufette
    @JouvaMoufette 2 года назад +325

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

    • @thekilla1234
      @thekilla1234 2 года назад +33

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

    • @lnterro_bang
      @lnterro_bang 7 месяцев назад

      you forgot SSSSSSSSS

  • @Mikusch_
    @Mikusch_ 2 года назад +1722

    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 2 года назад +34

      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 2 года назад +388

      @@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 2 года назад +9

      They also could have used fixed values

    • @GreenScrapBot
      @GreenScrapBot 2 года назад +108

      @@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 2 года назад +16

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

  • @VerticalCalzone
    @VerticalCalzone 2 года назад +75

    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

  • @ldctv944
    @ldctv944 2 года назад +447

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

    • @seronymus
      @seronymus 2 года назад

      Uncletopia is a Reddity suck fest anyways

    • @ducky1681
      @ducky1681 2 года назад +73

      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 2 года назад +4

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

    • @frozenturbo8623
      @frozenturbo8623 2 года назад +6

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

  • @LiveseyKnight
    @LiveseyKnight 2 года назад +1129

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

    • @kur0nezumi315
      @kur0nezumi315 2 года назад +178

      I mean bots love metal. Makes sense

    • @chirnosans
      @chirnosans 2 года назад +4

      I am :rage:

    • @purblegurblegirl
      @purblegurblegirl 2 года назад

      what?

    • @uis246
      @uis246 2 года назад +3

      REALLY upset

    • @unfa00
      @unfa00 2 года назад +33

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

  • @carlington2989
    @carlington2989 2 года назад +1093

    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 2 года назад +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 2 года назад +51

      What, again that annoying "sPaGhEtTi" forced meme?

    • @carlington2989
      @carlington2989 2 года назад +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.

    • @Pumpkincolonthree
      @Pumpkincolonthree 2 года назад +9

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

    • @somerand0mpers0n
      @somerand0mpers0n 2 года назад +8

      @@SU76M what are you

  • @rumpus5633
    @rumpus5633 2 года назад +29

    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 2 года назад +3

      that bug was in since 2007

  • @tubebrocoli
    @tubebrocoli 2 года назад +59

    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.

  • @AzzieEquinox
    @AzzieEquinox 2 года назад +585

    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 2 года назад +56

      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 2 года назад +59

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

    • @daedliy963
      @daedliy963 2 года назад +17

      @@Commrade-DOGE Mac..

    • @AzzieEquinox
      @AzzieEquinox 2 года назад +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 2 года назад +35

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

  • @XFanmarX
    @XFanmarX 2 года назад +65

    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 2 года назад +2

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

  • @bugjams
    @bugjams 2 года назад +51

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

    • @ChillerDragon
      @ChillerDragon 11 месяцев назад

      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 11 месяцев назад

      @@ChillerDragon It was source leaked a few years back

    • @ChillerDragon
      @ChillerDragon 11 месяцев назад

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

  • @rowrow_
    @rowrow_ 2 года назад +32

    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.

  • @JetSetDman
    @JetSetDman 2 года назад +26

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

  • @unholy_person
    @unholy_person 2 года назад +12

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

  • @OkamioftheRinnegan
    @OkamioftheRinnegan 2 года назад +59

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

  • @D0Samp
    @D0Samp 2 года назад +78

    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 2 года назад +4

      x87?

    • @matthewrease2376
      @matthewrease2376 2 года назад +17

      @@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 2 года назад +15

      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 2 года назад

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

    • @D0Samp
      @D0Samp 2 года назад +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.

  • @Lemon_Inspector
    @Lemon_Inspector 2 года назад +60

    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 2 года назад +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 2 года назад +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 2 года назад +1

      @@TheToomykins Which function is that?

    • @metarmask
      @metarmask 2 года назад +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 2 года назад +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.

  • @BonziBUDDY
    @BonziBUDDY 2 года назад +49

    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

  • @pandakekok7319
    @pandakekok7319 2 года назад +14

    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

  • @thetuerk
    @thetuerk 2 года назад +11

    "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!

  • @lychy645
    @lychy645 2 года назад +68

    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 2 года назад +1

      x87?

    • @lychy645
      @lychy645 2 года назад +9

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

    • @mars5train601
      @mars5train601 2 года назад +7

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

    • @Selicre
      @Selicre 2 года назад +3

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

    • @lychy645
      @lychy645 2 года назад

      @@Selicre nope

  • @lilthreegame7991
    @lilthreegame7991 2 года назад +3

    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.

  • @NintenGunner
    @NintenGunner 2 года назад +8

    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.

  • @kalerug
    @kalerug 2 года назад +573

    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 2 года назад +43

      This is also microsoft's spaghetti

    • @godslayer9000
      @godslayer9000 2 года назад +22

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

    • @wojtekpolska1013
      @wojtekpolska1013 2 года назад +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 2 года назад +1

      Source Spaghetti is slowly turning into a Source Pile of Snakes

    • @2b2useful
      @2b2useful 2 года назад +9

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

  • @OliverWolf621
    @OliverWolf621 8 месяцев назад +6

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

  • @incoherentbabbler4636
    @incoherentbabbler4636 2 года назад +42

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

  • @leoneldiaz78
    @leoneldiaz78 2 года назад +7

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

  • @Joheskiller_
    @Joheskiller_ 2 года назад +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!

  • @normalusername5223
    @normalusername5223 2 года назад +16

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

    • @jomo_sh
      @jomo_sh 2 года назад +4

      not float multiply?
      and multiply single scalar?

    • @SquooshyShark1000
      @SquooshyShark1000 7 месяцев назад

      @@jomo_sh hes just joking

  • @jacobwoodman4488
    @jacobwoodman4488 2 года назад +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 ♥

  • @-Raylight
    @-Raylight 2 года назад +130

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

    • @ducky1681
      @ducky1681 2 года назад +4

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

    • @iliakatster
      @iliakatster 2 года назад +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 2 года назад +2

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

    • @МиколайДроздов-т6ю
      @МиколайДроздов-т6ю 2 года назад

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

  • @Takyodor2
    @Takyodor2 7 месяцев назад +2

    Instructions unclear. Windows is a spy?

  • @wrednax8594
    @wrednax8594 2 года назад +13

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

    • @tauon_
      @tauon_ 2 года назад

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

  • @nickybakes
    @nickybakes 2 года назад +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!

  • @unfa00
    @unfa00 2 года назад +29

    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 2 года назад +6

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

    • @itsjustaburningname3685
      @itsjustaburningname3685 2 года назад +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 2 года назад

      Держись

  • @IgorFerreira69
    @IgorFerreira69 2 года назад +1

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

  • @iliakatster
    @iliakatster 2 года назад +42

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

    • @nbhjbhyvgbhyuvbhuynnjbhu
      @nbhjbhyvgbhyuvbhuynnjbhu Год назад +1

      this is a compiler problem

    • @lucass8119
      @lucass8119 Год назад

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

    • @cewla3348
      @cewla3348 11 месяцев назад

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

    • @zbelios1623
      @zbelios1623 11 месяцев назад

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

    • @ItsCOMMANDer_
      @ItsCOMMANDer_ 11 месяцев назад

      ​@@cewla3348no, its a program for windows

  • @ohio2440
    @ohio2440 2 года назад +1

    Very good job on the video shounic!

  • @j4ff4c3ks1
    @j4ff4c3ks1 2 года назад +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

  • @JonathanDavidsonn
    @JonathanDavidsonn 2 года назад

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

  • @SpiritedSpy
    @SpiritedSpy 2 года назад +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.

  • @Lagggerengineering
    @Lagggerengineering 2 года назад +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!

  • @NymphieJP
    @NymphieJP 2 года назад +22

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

    • @LonelySpaceDetective
      @LonelySpaceDetective 2 года назад +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!

  • @ErisEntropy
    @ErisEntropy 11 месяцев назад +2

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

  • @StarLink149
    @StarLink149 2 года назад +10

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

    • @matthewrease2376
      @matthewrease2376 2 года назад +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 2 года назад

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

    • @devihcra
      @devihcra 2 года назад +1

      @@SliceJosiah apple is pulling all the strings

    • @SliceJosiah
      @SliceJosiah 2 года назад

      @@devihcra 😳 That too...

    • @JouvaMoufette
      @JouvaMoufette 2 года назад +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

  • @LucarioredLR
    @LucarioredLR 2 года назад +2

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

  • @Kaelygon
    @Kaelygon 2 года назад +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

  • @PassTheSnails
    @PassTheSnails 2 года назад +1

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

  • @dovahkat9635
    @dovahkat9635 2 года назад +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 Год назад +1

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

    • @shinobuoshino5066
      @shinobuoshino5066 11 месяцев назад

      @@krowta2062 not relevant whatsoever.

  • @BalefireBombshell
    @BalefireBombshell 2 года назад +2

    Actually, I just thought of something you could cover for a brief little video. A lot of custom models no longer work in TF2 anymore, mainly because at some point Valve made the game stop looking in models/weapons/c_models and instead made wholly new folders in models/workshop/weapons/c_models and models/workshop_partner/weapons/c_models. which means that to get the old models to work again, you not only have to change their folder structure, but you have to hex edit the .mdl file and change the file path at the top near the header to reflect the proper file path. Maybe some digging as to why Valve chose to basically duplicate the entirety of the weapon models (because the old models and texture paths are still there and still contain their various vmt, vtf, and .mdl related files despite no longer actually being used.)

  • @robinrai4973
    @robinrai4973 2 года назад +3

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

  • @PoppinPeelz
    @PoppinPeelz 2 года назад

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

  • @foxeye245
    @foxeye245 2 года назад +4

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

  • @626Link
    @626Link 2 года назад

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

  • @mfaizsyahmi
    @mfaizsyahmi 2 года назад +4

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

  • @chenmarisa7879
    @chenmarisa7879 2 года назад +1

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

  • @MeowieGamer
    @MeowieGamer 2 года назад +3

    4:31 I can agree, windows is terrifying

  • @purplehaze2358
    @purplehaze2358 2 года назад +1

    Wow, even computers take a look at the absolute spaghetti that is TF2 code and say “Nope, this is too complicated and confusing for me”.

  • @robbie1528
    @robbie1528 2 года назад +4

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

  • @-Three-
    @-Three- 2 года назад +1

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

  • @qineth
    @qineth 2 года назад +60

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

    • @WalleBot
      @WalleBot 2 года назад +23

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

    • @matthewrease2376
      @matthewrease2376 2 года назад +6

      Nah bother, you ain't the only one ✊

    • @Rickmonas90
      @Rickmonas90 2 года назад

      L

    • @Ali.F
      @Ali.F 11 месяцев назад

      Hello homie

  • @felixfelix9062
    @felixfelix9062 2 года назад

    This channel doesn’t clickbait - It catches your attention with a ridiculous-sounding titles, but then explains it

  • @NeoNuc2
    @NeoNuc2 2 года назад +5

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

    • @ambreiaju
      @ambreiaju 2 года назад +3

      because Valve obviously...

    • @armageddoncatfish4154
      @armageddoncatfish4154 2 года назад +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 2 года назад +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 2 года назад

      @@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 2 года назад

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

  • @Jofoyo
    @Jofoyo 7 месяцев назад

    It's crazy how this immediately brought my brain back to an almost decade old memory of picking up a weapon from 0 ammo on 2Fort balcony and thinking "huh that's weird why does it give 41 ammo it should be rounded"

  • @KalinGames
    @KalinGames 2 года назад +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 2 года назад +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 2 года назад +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 2 года назад +1

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

  • @L1Q
    @L1Q 2 года назад

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

  • @JTCF
    @JTCF 2 года назад +8

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

  • @bluvsred9266
    @bluvsred9266 2 года назад +1

    So this is why i get 41 metal when i play Engineer on my own local server with RC2Bots alone!
    Thanks Chief, the mystery case solved!

  • @Kylemsguy
    @Kylemsguy 2 года назад +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 2 года назад +2

      skill issue

    • @aro2866
      @aro2866 2 года назад +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 2 года назад

      @@aro2866 yeah like your inability to take a joke

  • @mcintoshpc
    @mcintoshpc 2 года назад

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

  • @JoHn-gi1lb
    @JoHn-gi1lb 2 года назад +9

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

  • @wckiid
    @wckiid 11 месяцев назад

    Thank you for releasing the best of information

  • @avivagmon9315
    @avivagmon9315 2 года назад +12

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

    • @Kuratius
      @Kuratius 2 года назад

      He should take over after the last tf2 developer dies.

  • @DaxMarko
    @DaxMarko 2 года назад +1

    One extra metal or ammo in most weapons isn't anything special, but one extra hp and rocket can be a game changer, and its crazy to imagine that something like this scored someone a kill or a survived death.

  • @dclc
    @dclc 2 года назад +26

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

    • @kodicraft
      @kodicraft 2 года назад +14

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

    • @pog2824
      @pog2824 2 года назад +1

      @@kodicraft yes we need to do it

  • @verticalpug2026
    @verticalpug2026 2 года назад +1

    I wonder if this might also be the reason why R6 gives 1 more bullet in reserves at the beginning of the round, rather than a multiple of the ammo count in your weapon.

  • @mr.slappii513
    @mr.slappii513 2 года назад +4

    Windows is a direct upgrade to Linux confirmed.

    • @BoneMareOh
      @BoneMareOh 2 года назад

      no it is not

    • @UberSpah
      @UberSpah Год назад

      @@BoneMareOh In games, it is.

    • @BoneMareOh
      @BoneMareOh Год назад

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

    • @Norim_
      @Norim_ Год назад +1

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

    • @glorpri
      @glorpri 7 месяцев назад

      @@Norim_ thats a lie. you become a femboy (or trans) and then install linux

  • @KK-mo9df
    @KK-mo9df 2 года назад +1

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

  • @DrKira1812
    @DrKira1812 2 года назад +3

    Can we get the 2hr version?

  • @aquarius8242
    @aquarius8242 2 года назад +1

    I genuinely burst out laughing when I was recommended this because of the sheer order of magnitude of spaghetti.

  • @HowToMolly
    @HowToMolly 2 года назад +5

    mulsssssssssssssss

  • @philipsmemes2291
    @philipsmemes2291 2 года назад +2

    I don’t care about anything else I’m just scared that engineer touched a bat saber with his bare hands.

  • @JTCF
    @JTCF 2 года назад +23

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

    • @Wryyyong
      @Wryyyong 2 года назад

      "That's what I get for working at Microsoft..."

    • @arandomcommenter412
      @arandomcommenter412 2 года назад

      /s means /serious I thought?

    • @Wryyyong
      @Wryyyong 2 года назад

      @@arandomcommenter412 'Sarcasm', not 'serious'

    • @wojtekpolska1013
      @wojtekpolska1013 2 года назад +1

      unfunny joke

    • @dariokillsaman2111
      @dariokillsaman2111 2 года назад

      Tone indicators in 2022 funny moments comp

  • @michellet6557
    @michellet6557 2 года назад

    Always enjoy your videos. Good job!

  • @RokeJulianLockhart.s13ouq
    @RokeJulianLockhart.s13ouq 2 года назад +3

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

  • @leumasme
    @leumasme 11 месяцев назад +1

    The "0.2 cant be represented"-issue might make no sense at first, but its very similar to how we can't fully represent fractions like 1/3 in decimal: We have to approximate it as 0.333333..., eventually cutting it off. In binary, a similar effect happens at different fractions like 0.2: (1/5) in binary is "0.001100110011001100110011001100110011001100110..."; it goes on infinitely long until you cut it off and loose accuracy.

    • @godlyvex5543
      @godlyvex5543 11 месяцев назад +1

      0.2 is 1/5th, not 2/5ths

    • @leumasme
      @leumasme 11 месяцев назад

      @@godlyvex5543 what a blunder

    • @godlyvex5543
      @godlyvex5543 11 месяцев назад +1

      @@leumasme make sure you add an extra zero at the start of the fractional expansion, the way you have it written is still 2/5ths

  • @Maaar10Avali
    @Maaar10Avali 2 года назад +6

    Im literally gay rn

  • @quennnpfeufa7978
    @quennnpfeufa7978 2 года назад +1

    Great video, as always! :)

  • @wojtekpolska1013
    @wojtekpolska1013 2 года назад +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 2 года назад +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 2 года назад +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 2 года назад

      Woosh

    • @Lemon_Inspector
      @Lemon_Inspector 2 года назад +1

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

  • @turingsghost
    @turingsghost 2 года назад +1

    Linus Torvalds spotted openly weeping at this development