3 ms·
Paranoia was pretty common (and reasonable!) back in the era before you could easily release patches. Tossing in all those asserts etc would mean you would catc
by kevingadd 4y ago
Paranoia was pretty common (and reasonable!) back in the era before you could easily release patches. Tossing in all those asserts etc would mean you would catch problems sooner during testing and be able to fix them quicker.
Many game companies ship with asserts + assert messages turned on, for example, instead of making them DEBUG-only.
- iso8859-1 4y agoWould they abort(3) when an assert fails? Isn't there a risk of having a erroneously strict assert predicate and then having the game abort unnecessarily? If the game keeps going without aborting in the case that state has somehow been compromised, there is still the chance that the player won't actually notice. I wonder if they are afraid that the game state will be compromised in a way that makes the player not realize the corruption, but still ruin the game.
- kevingadd 4y agoYou have the aggressive asserts in during development, you can make them nonfatal in release builds. Though many games actually leave them on, for example World of Warcraft still has them set to crash the game with a detailed error message. Tabula Rasa (the ill-fated MMO) handled many assertion failures in a nonfatal way with an in-game popup, and errors in WoW mods also don't crash the game. Most of the games I work on have a mixed approach where if an error is recoverable I don't crash out, but if it's not then I fail-fast out with a detailed error popup. An example of a recoverable error would be a bug causing a player-activated ability to fail to activate, while fail-fast would be the right choice for something like an unexpected null in a data structure.