{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiaiocd5a7ureobzwl5mhoanxa4rjayiac5dflumicyss6ggmg6lva",
    "uri": "at://did:plc:vyjlfm46mfv6u4vjp6qtrfx2/app.bsky.feed.post/3mponx4r2zge2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreidg2k33tiuupnstmiowh7hyyvtsbe3gyhfygiytrzynysnhoctrxi"
    },
    "mimeType": "image/jpeg",
    "size": 81260
  },
  "path": "/articles/the-most-dangerous-game",
  "publishedAt": "2026-07-02T06:30:00.000Z",
  "site": "https://thedailywtf.com",
  "tags": [
    "CodeSOD",
    "fast inverse square root",
    "Learn more."
  ],
  "textContent": "While we talk about bad video game code periodically, we generally avoid it because it's so specialized and while something like fast inverse square root is bad code from a _maintainability_ perspective, it's great code for abusing floating points to make math fast.\n\n**Işıtan Yıldız** sends us a snippet from a game's config file. I won't pick on the specific game, but this isn't some random build of TuxCart, but a released game sold on multiple platforms. It's from a small team, but it's an actual professional product running on many devices. What's notable about this is the game _has multiplayer_ elements, which means networking code, which means…\n\n\n    net_socks_buffer_size\t\t\t\t\t= 4096;\t\t\t\t//I wouldn't change this if I were you\n    net_max_message_size\t\t\t\t\t= 32768;\t\t\t//changing this will require restarting the game.  MUST be power of 2, don't be a dick and make it too big\n    net_max_download_frames\t\t\t\t\t= 16;\t\t\t\t//changing this will require restarting the game.  MUST be power of 2 and smaller than net_max_message_size\n    net_udp_packet_size\t\t\t\t\t\t= 65536;\t\t\t//576 bytes the \"recommended\" fragment cutoff, ipv6 requires 1080.  The game will check automatically and make sure you aren't out of range (at least on windows it can do this)\n    net_udp_packet_send_buffer_size\t\t\t= 4;\t\t\t\t//how many packets it can store before sending (ideally it shouldn't be storing anything but threads are a b*)\n    net_udp_packet_recv_buffer_size\t\t\t= 8;\t\t\t\t//how many packets we can receive in 1 frame (8 is defualt, it'll discard packets that don't fit... it'll warn you in the console when this happens)\n    net_udp_force_specified_size\t\t\t= false;\t\t\t//overrides what the OS recommends, could disable networking and maybe crash the game? who knows\n    net_udp_enable_checksum\t\t\t\t\t= false;\t\t\t//probably unnecessary to have UDP checksums, but you can if you want for some reason\n\n\n… it means you can configure your copy of the game to attempt DoS attacks against other players' network stacks.\n\nI enjoy the warning here: don't be a dick. You _can_ set your max message size to any power of 2, but don't be a _dick_ about it.\n\nThe networking settings are fun, and I'm glad to know that I can probably cause the game to crash (either my copy or my fellow players' copies). But can I do something _dangerous_ or even… oh, I don't know, _crazy_? I really hope I can.\n\n\n    sys_ignore_variable_constraints\t\t\t= false;\t\t\t//DANGEROUS AS F***, leave off goddamnit you're crazy if you turn this on\n\n\nThat's the spirit! I want every game to add this config flag IMMEDIATELY. Actually, I'm working on a robot: I'm _definitely_ going to add that to my robot software. I'm gonna make the robot arm punch through a wall (note: it's not supposed to punch through walls, and I think a number of people would get very upset with me).\n\n[Advertisement] Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more.",
  "title": "CodeSOD: The Most Dangerous Game"
}