CodeSOD: The Most Dangerous Ga... Note

CodeSOD: The Most Dangerous Game

While discussions of bad video game code are rare, they often focus on specialized performance optimizations rather than maintainability issues. A released game, despite being a professional product from a small team, contains a notable config file related to its multiplayer functionality. This config file allows for extensive adjustments to networking parameters.One setting, net_socks_buffer_size, comes with a warning not to change it. Others, like net_max_message_size and net_max_download_frames, require game restarts if modified and must be powers of two. The net_udp_packet_size is set to a large value, with notes on recommended fragment cutoffs and IPv6 requirements. Further settings control UDP packet buffer sizes, including a warning about discarding packets when the receive buffer is full.There's also an option to override operating system recommendations for UDP packet sizes, which could potentially disable networking or crash the game. The decision to disable UDP checksums is presented as an optional, likely unnecessary, feature. Critically, the ability for players to configure these settings implies the potential to launch denial-of-service attacks against other players' network stacks.The config file humorously warns users not to be "a dick" about changing certain parameters. Beyond the networking, a truly alarming setting is sys_ignore_variable_constraints, explicitly labeled as "DANGEROUS AS F*." The author humorously advocates for this dangerous flag to be added to all games and even their own robot software for potentially destructive purposes.