Logo
git commit -m 'Fix bug' --no-verify
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Immortality-bug Memes

Posts tagged with Immortality-bug

It Pays To Double Check They Say Part Two

Gamedev Programming Debugging
3 months ago 19.8M views 0 shares
It Pays To Double Check They Say Part Two
Someone really, really wanted to make sure the player was dead before executing all those game-ending cleanup routines. Line 8 sets HP to -1, but then we get a beautiful cascade of nested if (HP==0) checks that will literally never execute. It's like building an entire mansion of death animations, sound effects, and instance destroys... and then locking the door and throwing away the key. The irony? They're checking for HP being exactly zero when they just set it to -1. So all those carefully crafted death sequences—stopping sounds, pausing boss music, spawning blood emitters, destroying boss items, playing death sounds, removing HP bars—are all sitting there in unreachable code purgatory. The player could be at -1 HP, technically dead, but the game's like "nah, you're good, keep playing." The "double check" here isn't defensive programming—it's defensive paranoia that accidentally created an immortality glitch. Should've been if (HP <= 0) or just removed that initial assignment. Classic GameMaker Studio moment right here.

Today's picks

Portable Monitor, 15.6" FHD 1080P Travel Portable Monitor for Laptops, Ultra-Slim External Portable Screen for Laptop with Kickstand, Screen Extender for Laptop PC Mac Phone PS4/5 Xbox Switch

Portable Monitor, 15.6" FHD 1080P Travel Portable Monitor for Laptops, Ultra-Slim External Portable Screen for Laptop with Kickstand, Screen Extender for Laptop PC Mac Phone PS4/5 Xbox Switch

Affiliate
$50.99
NordVPN

NordVPN

Sponsored
VPN
System.out.println(“Error” + e);

System.out.println(“Error” + e);

Java
106.1K views 3 years ago