Ads skipped

Serious Sam's Most Notorious Bug Analysed

494K views · May 14, 2022 · Gaming

Comments · 1.3K

  • @fleckens · 4 years ago

    I never knew about this bug but just hearing the laser gun firing at the start I could clearly tell I had experienced it as I recall the sounds of the two different rates of fires.

    2.8K

  • @TheRealGooberMan · 4 years ago

    19+ year gamedev here. The way we did this in the PS2 era was to treat every timer as a countdown. Our games also used variable tick rates, so the epsilon method would not have worked for us.

    2.3K

  • @ninjacat230 · 2 years ago

    THEY MADE THE TIMER A FLOATING POINT NUMBER?!

    101

  • @miaouew · 4 years ago

    I really hope Agonizing Rectal Pain never unsubscribes so you have to keep reading his name at the end of each video

    927

  • @porteal8986 · 4 years ago

    the moral of the story: just because it has a decimal, doesn't mean you should make it a float

    348

  • @mallardtheduck1 · 4 years ago

    It seems to be a really bad decision to use a floating point value to store the game tic like that. An integer completely avoids this issue; even a 32-bit integer has enough range for over 6 years of playtime at 20 tics per second. About the only advantage a float might have is that time values are written by developers in terms of seconds rather than tics, making it easier to change the tic rate during development, but even then, converting those values to integer tics at the first opportunity in the code is probably a better solution.

    1.7K

  • @OldMovieRob · 4 years ago

    Weird how I remember playing this game years ago, and being vaguely aware of this happening, but just dismissing it in the back of my head as the weapons overheating or something, haha

    723

  • @klazzera · 1 year ago

    <a href="https://www.youtube.com/watch?v=PpfpfDNFdvQ&amp;t=60">1:00</a> sounds a lot like a signed variable going negative by overflow at 4096 seconds then crossing zero again to become positive another 4096 seconds later

    13

  • @VS___VerruckterSchakal · 4 years ago

    This variable math is also why Minecraft gets super jittery and whatnot the further away you get from 0.x.0 (spawn)

    45

  • @Keldor314 · 4 years ago (edited)

    There&apos;s more to the bug than this - if it was just a matter of floating point error in the time tick, you would have one shot fire one tick late, and then all subsequent shots would be at the regular rate, but one tick late relative to the beginning of the game.<br><br>The other part of the bug is that the target times are not calculated correctly. &nbsp;Instead of adding the time delay to the previous time target to get the next shot, it adds it to the time at which the weapon was actually fired, resulting in each subsequent target time being almost a full tick late relative to the last one (because the actual time of firing was late). &nbsp;This is why the bug doesn&apos;t appear to &quot;fix itself&quot; after one shot being delayed by a single tick, but rather has a additional delay for every single shot.

    470

  • @PeterLawrenceYT · 4 years ago

    Surprised how interesting I found this one! Looks like finding the issue was more difficult than fixing it.

    584

  • @AviansEnthusiast · 4 years ago

    Unlike the floating points, we were precise in finding the reason for the bug.

    235

Up next

LIVE

How Quake II's BFG10K Works

decino · 389K views

LIVE

Broken Kill Counts in Classic Serious Sam (Part 1)

decino · 583K views

LIVE

Doom's RNG

decino · 1.5M views

LIVE

The Ultimate Serious Sam Iceberg

Seriously Questionable · 96K views

LIVE

Duke Nukem 3D lies to you six times

MADVIL · 47K views

LIVE

Counter-Strike's Forgotten Secrets

Counter-Strike Historian · 17K views

LIVE

SERIOUS SAM - DEVOLVE OR DIE

Civvie 11 · 2.5M views

LIVE

serious sam 2 out of context

Willowton · 79K views

LIVE

Why This Rare Bug Turns Everything into Unkillable Ghosts

decino · 666K views

LIVE

Doom's Powerups

decino · 1.4M views

LIVE

How Different Are Doom 64's Demons?

decino · 862K views

LIVE

Doom's Damaging Floors

decino · 371K views

LIVE

This Serious Sam Mod Hates You...

Br0leg · 119K views

LIVE

Minecraft but all math is slightly wrong

FibbWare · 1.8M views

LIVE

The Games Industry Thinks You’re Stupid - Marvel's Wolverine

InfiniteMass · 546K views

LIVE

Doom Challenges Deemed Impossible

decino · 1.6M views

LIVE

Can You Beat Portal 2 in VR Without Barfing?

NerdFuel · 1.1M views

LIVE

Are All Doom Monsters Equally Aggressive?

decino · 674K views

LIVE

Top 5 worst mistakes you can make in Dark Souls 1

ComYuri · 419K views

LIVE

How Doom's Enemy AI Works

decino · 2.1M views

YouTube, with the door locked.

Aegis plays a clean stream instead of YouTube's player, so pre-roll ads, trackers, and fingerprinting never ride along. Drop Shields any time if you want the official player back.