News for hackers. Stuff that matters.
Re:Source code for Quake 2 rerelease by FartyMcFarter on Friday August 11, 2023 @06:38AM (#37087137)
Sometimes it is about code quality. Defensive, well-documented code would not be as likely to suffer from such bugs.

It's not just subtle floating-point errors either, but also outright wrong maths that appears to work (see [1] for an example), buffer overflows [2] etc.

[1] https://www.youtube.com/watch?v=4gNYTqn3qRc

[2] https://news.ycombinator.com/item?id=20410166

Re:Source code for Quake 2 rerelease by joachimma on Friday August 11, 2023 @08:16AM (#37087819)
I think they made the right trade-off, back in the 90s on hardware that could barely run the game, sticking extra defensive checks to make sure you have not accidentally clipped through the geometry, or simpler ones like making sure you are not running too fast, seems excessive.

They weren't coding for some NASA space probe and they knew it.

Re:Source code for Quake 2 rerelease by FartyMcFarter on Friday August 11, 2023 @08:41AM (#37088042)
Typically you'd put the checks only in debug builds.