This might be the only time I’ll ever submit a Kotaku article here.
It’s kinda interesting seeing somebody else’s take on that.
I’m really sick of this meme at this point. Yeah Doom 3 has a nice code base. It’s not the best code I’ve ever seen and it’s not that interesting for 99% of programming work. I feel like wanna-be programmers have latched onto it and it keeps popping back up for them all to sound like they know anything about programming by repeating the same dumb cliches about it. Enough already.
It’s not the best code I’ve ever seen and it’s not that interesting for 99% of programming work
I have to agree, but I find it kind of baffling that there isn’t much elegant code in gamedev. When you have a bunch of complex systems that have to run in realtime and interact properly, I’d expect some nice code to end up somewhere in the mix, but I really haven’t seen anything great. Do you happen to know of any major games that are well written, ‘cause I’ve been looking for some inspiration.
As I read through these gushing praises of the codebase I was struck only by how low abysmally the bar is for code quality in the games industry.
It really is. And to top it off C++ is one of the hackier languages in existence. I don’t like using it because it’s a poor mix of unsafe C and somewhat safer OO. I love C, and I love high level languages, but the two do not mix.
The other day I read that Naughty Dog wrote much if Crash Bandicoot and all of Jak and Daxter in Lisp (and they still use Lisp for scripting in their newer games) so maybe there’s some hope.
Hmmmmm… Beauty is most definitely not something I’m beholding here. It’s not bad, but I personally prefer Wesnoth’s C++. I don’t agree that most comments are indicative of a design error. Some things are just complicated no matter how you code them. I also like a few more newlines, like separating paragraphs in text. And I like the C++ stdlib. Having to pass start and end iterators to algorithms is a bit a verbose, but there are ways around it, especially with C++11 (btw, the example there of how to shorten iteration over std::vector could be shortened even more: for(auto& v; vector)).
for(auto& v; vector)
I should go have a look and see how much C++11 and beyond Wesnoth is using these days.
The best part is Carmack’s comment on the article. He isn’t so anti-STL any more, even if he still doesn’t love it.