3 ms·
That code is a nightmare.
by edoo 7y ago
That code is a nightmare.
- o-__-o 7y agoNo way, I said. Then I clicked into a random file[0] and was greeted with inline optimizations. Fun and nightmarish stuff, but then I thought about the game and its performance when all of those bombhead guys come running out from way in the distance on 2000s era hardware and the game didn’t hiccup or blink at all. Of course the optimizations are useless with today’s hardware so the code is equally as redundant (but oh so cool to browse) [0] https://github.com/Croteam-official/Serious-Engine/blob/master/Sources/Engine/Sound/SoundMixer.cpp#L205 https://github.com/Croteam-official/Serious-Engine/blob/mast...
- edoo 7y agoI went straight for the meat and most of it is like this. Double hungarian and poorly abstracted: https://github.com/Croteam-official/Serious-Engine/blob/master/Sources/Engine/Rendering/Render.cpp https://github.com/Croteam-official/Serious-Engine/blob/mast...
- PavlovsCat 7y agoThat's probably because it's an actually working and fun game, not some project where people spent more time giving talks or writing blog posts about it than all the people who can be bothered spent on playing it combined, and which is just a stepping stone to yet another half-assed thing nobody needs. Writing it perfectly the first time isn't possible because you don't know what exactly you're making until you made it, and rewriting it into something that behaves exactly the same for the user, but has nicer code, would be pointless masturbation.
- o-__-o 7y agoOh man that was both awesome and infuriating. And the mirrors code! Oh how I want to play with this engine now