7 ms·
// Homework for today. Write 2000 words reconciling "Your code must never crash" with "Intentionally putting crashes in the code". Fucktard. // DEBUG_CR
by Starlevel004 2y ago
// Homework for today. Write 2000 words reconciling "Your code must never crash" with "Intentionally putting crashes in the code". Fucktard.
// DEBUG_CRASH(( "xferScienceVec - vector is not empty, but should be\n" ));
//
https://github.com/electronicarts/CnC_Generals_Zero_Hour/blob/0a05454d8574207440a5fb15241b98ad0b435590/GeneralsMD/Code/GameEngine/Source/Common/System/Xfer.cpp#L646 https://github.com/electronicarts/CnC_Generals_Zero_Hour/blo...
- inetknght 2y agoEA game devs cursing each other out? Internal company drama being aired out years later? Oh boy!
- cluckindan 2y ago*Westwood
- IntelMiner 2y agoGenerals was EA Pacific (Formally Westwood Pacific, opened by EA)
- jsheard 2y ago// Lets discuss how Windows is a flaming pile of poo. I'm now casting the header // directly into the structure, because its the one I want, and this is just how // its done. I hate Windows. - jkmcd https://github.com/electronicarts/CnC_Generals_Zero_Hour/blob/main/Generals/Code/Main/WinMain.cpp#L615 https://github.com/electronicarts/CnC_Generals_Zero_Hour/blo...
- poizan42 2y ago... because they just casted lParam into a pointer to DEV_BROADCAST_HDR a few lines above, which is the common part of the different structure it could point to. That's just doing inheritance the C way. What did they expect? A C++ class from a C api?
- IntelMiner 2y agoGenerals was famously extremely rushed in development. Probably a novice programmer
- stnmtn 2y agoThis one made me laugh, mostly because the variable names are so dumb // our RNG is basically shit -- horribly nonrandom at the start of the sequence. // get a few values at random to get rid of the dreck. // there's no mathematical basis for this, but empirically, it helps a lot. UnsignedInt silly = GetGameLogicRandomSeed() % 7; for (Int poo = 0; poo < silly; ++poo) { GameLogicRandomValue(0, 1); // ignore result }
- anal_reactor 2y agoI spent some time browing curiosities about old games, and what strikes me is that the code sometimes was quite personal. You could see the joy, the anger, the disappointment, the satisfaction. Nowadays it would never fly to name a variable "poo", you need to stay professional at all times.
- herewulf 2y agoNowadays it just depends on how shitty your job is.
- lofaszvanitt 2y agosays who?
- esafak 2y agoThe person reviewing your PR.
- lofaszvanitt 2y agoopen window, throw individual out >D
- broeng 2y agoanal_reactor says so.
- as1mov 2y ago
- moffkalast 2y agoGame code comments are always the most entertaining :D https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overview_of_the_code https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overv...
- account42 2y agoI don't get the complaint in the comment. Asserts for invariants/pre-/postconditions are absolutely compatible with not crashing: don't violate those properties.
- genocidicbunny 2y agoAs an ex-gamedev, this one cracked me up: else { DEBUG_CRASH(("PREFER_CORRECT_SOLUTION @todo impl")); } (From PartitionSolver.cpp)