3 ms·
You might be correct, but I cannot say, having never read the source code. Since it was Carmack's first project in C++, I am inclined to believe you. But would
by alecdbrooks 14y ago
You might be correct, but I cannot say, having never read the source code. Since it was Carmack's first project in C++, I am inclined to believe you.
But would you agree that the practices mentioned in the article are what the team got right? You can remove the author's gushing about the code's beauty and have a substantive article left. For instance, the section on vertical spacing had me reconsidering my own style. The discussion of method signatures seemed pretty solid, too.
- HeXetic 14y agoPersonally, I found some of the horizontal spacing excessive. There were several lines that even forced me to scroll horizontally within VisualStudio (with a few side-panes open, admittedly), despite having a widescreen monitor. I'm pretty sure I chunked those up. Maybe Mr. Carmack has a much bigger monitor than I did. Besides that, I think the stylistic changes this author is commenting on are fairly minor. I think the conciseness of vertical space was a bit confusing sometimes; this article only shows the simple functions where it works. The almost complete absence of templated is more likely because no STL code was used. Certainly, the code base is very thorough. When I realized I had to use quaternions to represent the player's orientation in the game space, there was already an idQuat class ready and waiting and fully functional, which was very nice. I think that idQuat class was never even used anywhere in the base code, so it was cool -- for someone with who never knew about quaternions before then -- to have a class fully implemented and ready for me to use.