Pajari said:... even though I have weak c++ skills ...
Woohoo, some 3D engine is not in Pascal...Graz'zt said:See Sander, it's not in Pascal!
Oh, undoubtedly, but I'm wondering how far this goes....and I'd certainly like to take a look at some of the commentary and of what quality it is. Which is probably what I'll do.Graz'zt said:It's reasonable to expect they will release some sort of documentation with it. After all, this *is* one of the most popular and widely-licensed 3D engines in the world. I doubt Ravensoft, Infinity Ward and other teams figured out how the engine worked by staring at the code.
So, basically, it has quite some code that is unreadable/unmaintainable (the asm bits), and it's far from polished.Carmack said:Personally, I think the Q3 code is pretty clean on the whole. It was a commercial product done under time pressure, so it isn't a polished gem, but I consider it good.
Anyone working on the Q3 codebase today should just delete all the asm code and use the C implementations. Making a commercial game with fairly high end requirements go 10% faster is sometimes worth writing some asm code, but years later when the frame rate pressure is essentially gone, the asm code should just be dumped in the name of maintainability. All the comments in the world wouldn't change this decision a bit.
I don't think that's really the point, you can add all the new eye-candy yourself, and it doesn't really need to look all that good, I think it's much easier to use as a means to learn, especially, as I said, for people who don't know much about professional programming.Ratty said:I'm more worried about its age. It would probably take quite a bit of work to expand the engine with shiny new eye-candy that has become standard since 2000.
Heh, there was once a time when poverty and plague were rampant, society was primitive, people were superstitious, the Catholic Church kept the world in darkness and developers had to write not only parts of the engine, but also video and sound drivers in assembly from scratch. Thankfully, the brave and forward-thinking presbyters from SGI and Microsoft led us out of the cesspit of destitution and ignorance into a new era of wealth and knowledge.Sander said:So, basically, it has quite some code that is unreadable/unmaintainable (the asm bits), and it's far from polished.
Yes, because "fancy constructs" and "complex code" are more convenient and allow for faster and more error-proof programming. If it weren't so, there would be no Smalltalk, Ada, C++, Object Pascal, Java, C# or Visual Basic, everyone would still be writing mnemonic programs and a game engine would have millions of lines of code.Sander said:So, are you saying that fancy constructs and complex code is better than simple and clear code?
So basically, because there are things that facilitate the use of complex code, complex code must have a good use.Graz'zt said:Yes, because "fancy constructs" and "complex code" are more convenient and allow for faster and more error-proof programming. If it weren't so, there would be no Smalltalk, Ada, C++, Object Pascal, Java, C# or Visual Basic, everyone would still be writing mnemonic programs and a game engine would have millions of lines of code.
Like this one.
Heh, I wouldn't put any of these things under the header 'fancy constructs' or 'complex code'. So hence my reaction.Sander, dude, he probably meant classes, enumerations, strings and that kind of shit. C++ (and all newer languages, for that matter) has language constructs that really make programming more convenient and simplify the code. You think C code is more readable than C++ code? Try modifying a program that has a hundred procedures scattered in various files and all of them take the same variable as an argument. Changing the variable type means you need to change every single procedure, and then rewrite every single call of those procedures. A simple class would make the problem considerably easier to solve, since both the variable and the procedures would be located in one place, and procedure calls would be independent of procedure implementations.
I get your drift. Pascal has had half of that stuff since almost forever. Bitch.Sander said:Heh, I wouldn't put any of these things under the header 'fancy constructs' or 'complex code'. So hence my reaction.