View Full Version : ROTT alpha?
AlteDrecksau
12-24-2002, 09:27 AM
I just had a look on the ROTT source code and I was really surprised by the bad programming style. There are functions which are used before they are declared, brace style is very inconsistent and there were even files misspelled (like _rt_buil.h). I'm wondering if this code really stems from a workable build.
Joe Siegler
12-24-2002, 10:33 AM
I'm wondering if this code really stems from a workable build.<font size="2" face="Verdana, Arial">Yes, it's the final v1.3 version of the game.
What's this have to do with "ROTT Alpha"? That subject doesn't seem to make any sense to me.
Lon Matero
12-24-2002, 10:50 AM
I'd just have to say, cut them some slack, this code is eight years old. Watcom isn't as strict as newer compilers, so that's why it didn't require function prototypes, for example.
The reason for inconsistent coding style is because of multiple programmers worked on the game. I guess there was no company style guidelines back then, as ROTT was Apogee's first large scale inhouse game.
theoddone33
12-25-2002, 02:40 AM
Originally posted by AlteDrecksau:
I just had a look on the ROTT source code and I was really surprised by the bad programming style.
<font size="2" face="Verdana, Arial">Schedule is what drives products. If code cleanliness doesn't get the game out faster, it is not necessary. This is the way it works in the real world.
I'm wondering if this code really stems from a workable build. <font size="2" face="Verdana, Arial">Of course. Whether or not you keep your indentation style consistent has no bearing whatsoever on the functionality of the game.
AlteDrecksau
12-25-2002, 05:56 AM
Originally posted by theoddone33:
Schedule is what drives products. If code cleanliness doesn't get the game out faster, it is not necessary. This is the way it works in the real world.<font size="2" face="Verdana, Arial">John Carmack also had his schedule when he was developing Doom, but his code is much cleaner than R.O.T.T.'s.
Of course. Whether or not you keep your indentation style consistent has no bearing whatsoever on the functionality of the game. <font size="2" face="Verdana, Arial">I'm not only talking about bad style, there are errors in the source code which should make in incompilable like the misspelled include of _rt_buil.h.
oh boo ****ing hoo.. who cares?
The code DOES work, proof is in the Linux and MacOS ports that are available now.
I myself have my own coding style, which others might find messy but if it works then great, if it's confusing for others then they can clean it up themselves.
AlteDrecksau
12-25-2002, 07:14 AM
Originally posted by ADoomedMarine:
The code DOES work, proof is in the Linux and MacOS ports that are available now.
<font size="2" face="Verdana, Arial">It works since they have corrected the errors.
Originally posted by AlteDrecksau:
</font><blockquote><font size="1" face="Verdana, Arial">quote:</font><hr /><font size="2" face="Verdana, Arial">Originally posted by ADoomedMarine:
The code DOES work, proof is in the Linux and MacOS ports that are available now.
<font size="2" face="Verdana, Arial">It works since they have corrected the errors. </font><hr /></blockquote><font size="2" face="Verdana, Arial">do you know that? do you have proof they did alter the code to get it to work?
The Stinger
12-25-2002, 07:34 AM
It's he 1.3 source code... I patched my game to 1.3 and it works perfectly. So whats the problem?
AlteDrecksau
12-25-2002, 07:47 AM
Originally posted by ADoomedMarine:
do you know that? do you have proof they did alter the code to get it to work? <font size="2" face="Verdana, Arial">Look at icculus's cvs tree (http://cvs.icculus.org/horde/chora/cvs.php/rott?rt=rott).
The Stinger
12-25-2002, 07:53 AM
Originally posted by AlteDrecksau:
</font><blockquote><font size="1" face="Verdana, Arial">quote:</font><hr /><font size="2" face="Verdana, Arial">Originally posted by ADoomedMarine:
do you know that? do you have proof they did alter the code to get it to work? <font size="2" face="Verdana, Arial">Look at icculus's cvs tree (http://cvs.icculus.org/horde/chora/cvs.php/rott?rt=rott). </font><hr /></blockquote><font size="2" face="Verdana, Arial">I think he means to get it to compile with watcom. AS in just compile the thing to test if that works
AlteDrecksau
12-25-2002, 08:30 AM
It may compile under a compiler which is so lazy to just give a warning when there are files to be included which do not even exist and so intelligent that it can compensate missing structure definitions, so it may compile under watcom if it fulfills this prerequisities; but, for example, not under MSVC.
Crosma
12-25-2002, 11:31 AM
Originally posted by AlteDrecksau:
not under MSVC. <font size="2" face="Verdana, Arial">ROTT won't compile as-is under MSVC, is contains a lot of Watcom specific code.
Night Hacker
12-25-2002, 05:30 PM
John Carmack also had his schedule when he was developing Doom, but his code is much cleaner than R.O.T.T.'s.<font size="2" face="Verdana, Arial">So? Who cares? Nobody was ever meant to see the source code in the first place so who cares what it looks like, the only thing they were worried about was if the code worked or not. When you have multiple programmers working on different problems you're going to get different coding styles as well, so long as you can understand what the code is doing and it works, nothing else matters. I think you'll find alot of commercial games this way.
IceColdDuke
12-25-2002, 06:05 PM
The wolfenstien 3d code was worse.....NO comments images/icons/frown.gif
IceColdDuke
12-26-2002, 12:06 AM
To be more correct...the first time I compiled ROTT under MSVC I got 200ish compiler errors.
But in the long run, I had fix over 450ish errors images/icons/smile.gif
George Broussard
12-28-2002, 02:23 AM
AlteDrecksau,
So what? It's free images/icons/smile.gif
Just shows how bad of code you can write and still make a game that sold 250k copies in 1995.
Go forth and do better images/icons/smile.gif
Plus there is an "indent" tool you can use to get uniform style and improve readability. At least for Linux...
dejay
12-28-2002, 04:17 PM
Originally posted by George Broussard:
Go forth and do better images/icons/smile.gif <font size="2" face="Verdana, Arial">images/icons/grin.gif
MrEricSir
12-28-2002, 05:23 PM
Only a computer science major who hasn't seen or worked with real-world code would whine about ROTT's source code.
andystob
12-28-2002, 07:41 PM
But there is a lot to be said for using standard templates and a house agreed convention for coding and a commenting. Makes things a lot easier in the long run.... team code reviews, I find, are so much easier when neatly laid out and pleasing to the eye...
But I don't work in the game industry so I'm not sure if that applies.....
Night Hacker
12-29-2002, 03:49 AM
Originally posted by andystob:
But there is a lot to be said for using standard templates and a house agreed convention for coding and a commenting. Makes things a lot easier in the long run.... team code reviews, I find, are so much easier when neatly laid out and pleasing to the eye...
But I don't work in the game industry so I'm not sure if that applies..... <font size="2" face="Verdana, Arial">I agree. When I'm working on my game I like to TRY and keep my code as neat as possible and well commented, mainly for my own purposes so I don't forget why I did something, but it will benefit anyone who sees my code in the future too.
I have known teams of programmers that have agreed on a certain way of coding, like 3 spaces in, /* */ style comments to describe what a function does just before a function etc... it has definately helped me learn from thier code and I have adopted alot of thier coding styles. Of course, I am a neatness nut, I HAVE to have all my indentations just right or it bugs me, but it really helps you see what code is within certain loops really fast. Sometimes when you get carried away coding you can start getting messy and I can only imagine what it is like if you have several people working on something, all with different styles and possibly a deadline etc.. how it can be.
Flaose
12-30-2002, 08:13 AM
ROTT alpha (http://www.3drealms.com/rott/originalspec.html) images/icons/grin.gif
AlteDrecksau
12-31-2002, 11:39 AM
Originally posted by MrEricSir:
Only a computer science major who hasn't seen or worked with real-world code would whine about ROTT's source code. <font size="2" face="Verdana, Arial">Bah Humbug! (http://www.geocities.com/int20h/)
[ 12-31-2002, 11:44 AM: Message edited by: AlteDrecksau ]
theoddone33
12-31-2002, 04:08 PM
In answer to the ROTT alpha question... the code is from a workable build, yes. However it is not the same as the release build. There were some apparently minor changes made between the release build and the source release. Most of them seem to involve dopefish.
The include mistake mentioned is not a mistake at all, since either watcom or dos truncates the filename to 8.3 format.
AlteDrecksau
12-31-2002, 07:53 PM
Originally posted by theoddone33:
The include mistake mentioned is not a mistake at all, since either watcom or dos truncates the filename to 8.3 format. <font size="2" face="Verdana, Arial">Truncate "_rt_build.h" to "_rt_buil.h" ? Doubt it.
The Stinger
12-31-2002, 08:16 PM
Originally posted by AlteDrecksau:
</font><blockquote><font size="1" face="Verdana, Arial">quote:</font><hr /><font size="2" face="Verdana, Arial">Originally posted by theoddone33:
The include mistake mentioned is not a mistake at all, since either watcom or dos truncates the filename to 8.3 format. <font size="2" face="Verdana, Arial">Truncate "_rt_build.h" to "_rt_buil.h" ? Doubt it. </font><hr /></blockquote><font size="2" face="Verdana, Arial">let me explain.Dos file name have a max of 10 characters, 11 if you include the "."Infront of the "." can only be 1 to 8 characters long. After the "." can only contain 1 to 3 characters.
_rt_buil.h : _rt_buil = 8 characters and h = 1.a perfect dos name structure
_rt_build.h: _rt_build 9 and h = 1. 1 character too many infront of the "."
Now the next question is why not rename it to rt_build.h. I think they didnt because _ will put the file in alphabetical order in the top.
the 2nd _ is just to seperate rt and buil for better view of file names.
relnev
12-31-2002, 08:19 PM
Originally posted by AlteDrecksau:
Truncate "_rt_build.h" to "_rt_buil.h" ? Doubt it. [/QB]<font size="2" face="Verdana, Arial">"_rt_buil" is 8 characters long. The DOS compilers would actually allow you to include "_rt_builasdfjkl.h" and it would load _rt_buil.h.
Most of the changes we made for the Linux version were not to fix errors, but to add support for OSes other than DOS images/icons/smile.gif (We still have yet to fix the file serialization issues, though.)
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.