Thothie, you win. Congratulations.

Thraxis

New Adventurer
MSC Developer
RiP
Joined
Apr 30, 2007
Messages
530
Reaction score
0
Age
35
Location
Riverside, New Jersey
Well theres some pretty stuff in green, and then a lot of ugly stuff in regular black.

The green saves your life, the black holds your doom.

You must touch the black and not the green.

(Go forth and die)
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
Hundreds of thousands* of lines of code, I'd imagine.

There aren't many USEFUL comments that I've really noticed. >_>
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
Is the code indented properly at least?
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
Of course.. That's an automatic process..
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
If you write code in Visual Studio, yes. C++ can also be written in notepad :wink:
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
But, as we said, VS2003 is how we write it =|
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
Right, but I heard you guys picked up on the project, you weren't the original developers.

On another note, are older C++ techniques used more often or newer ones, such as using #define (being the old way) used over const (being the newer way)?

I looked at bits of the valveDLL template, and they use #define alot more than const.


Well, I'm off to my computer science class (I'm actually posting while waiting for a class).
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
Depending on the situation, we use #define because it allows for more than just constant variable declaration.

Example: (By far my favorite #define that I use in my CIST programs)
#define foreach(var,max) for( int var = 0; var < max; ++var )

Though, in the code it's "var++"... It really should be changed to ++var, as that's more optimizied. *Glares at Thothie in a kk-change-those-bye way*
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Well, it's not just a matter of optimization, it also changes when the var gets increased, which can fubar yonder code, in some instances.

Brain4 is making me feel like a C++ genius. Probably not a good sign.
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
We wouldn't want that ego of yours to get any bigger, now would we Thothie =p

There's always many ways of doing something. Alot of it is personal preference.

P.S. If I got the source code, I'd have to give it to Xjiro, since he's a professional coder I know http://www.xjiro.com/ http://ts.esix.us/ are his sites. Just wanted to make sure this was OK, if I got it. Also, he has no reason to cheat, he doesn't play MS:C, and was only willing to look at the source code and help you guys out a little as a favor to me, since he's cool like that.

P.S.S. Thothy, please don't mess with J-M's character :?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
P.S. If I got the source code, I'd have to give it to Xjiro, since he's a professional coder I know http://www.xjiro.com/ http://ts.esix.us/ are his sites. Just wanted to make sure this was OK, if I got it. Also, he has no reason to cheat, he doesn't play MS:C, and was only willing to look at the source code and help you guys out a little as a favor to me, since he's cool like that.
If I had a nickle for every professional coder who has seen this source code and run away screaming, I'd have... ....$6.05 by now.
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
Thothie said:
Well, it's not just a matter of optimization, it also changes when the var gets increased, which can fubar yonder code, in some instances.

Brain4 is making me feel like a C++ genius. Probably not a good sign.

I don't mean this to sound insulting.. But, Thothie, you just made me feel like a C++ genius, and that's probably not a good sign :p

++var vs var++ makes no difference in a for loop, as the increment condition gets called, for the sake of argument, on a line of its own and at the end of the loop. Ye can go try it yerself if ya don't believe me ;-)
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Ah, but that depends on the sort of loop you are using, and weather or not the var is altered within it. Tis the same reason I keep telling ye break and continue are not the same thing. ;)

(Granted, I do have a nasty habbit of doing i++ when I could just do ++i, but I'm just sayin, the former is not without function... ;) )
 

Shurik3n

New Adventurer
MSC Developer
RiP
Joined
Aug 15, 2006
Messages
1,357
Reaction score
0
Age
34
Break and continue are very very much not the same thing. Break will exit the entire loop, continue goes to the next increment.
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
Thothie said:
Ah, but that depends on the sort of loop you are using, and weather or not the var is altered within it. Tis the same reason I keep telling ye break and continue are not the same thing. ;)

(Granted, I do have a nasty habbit of doing i++ when I could just do ++i, but I'm just sayin, the former is not without function... ;) )

No, it doesn't make a difference...

Equivalence:
int i = 0;
while( i < 5 )
{
++i;
}

for( int i = 0; i < 5; ++i )
{}

Trust me, it does the same thing.


Second, about the break/continue thing...
1. I asked you ONCE and in a "Oh, I think I understand them, now. They do __ right?" and you confirmed.
2. I haven't asked you since. I get them.
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
Ditto on what Shuriken said, although break is also used in switch statements, its not just about ending an iteration of a loop. ++var is prefix and var++ is postfix.

Oh,and here is a quote directly from my C++ text book.
"The older C-style directive of creating named constants is with the #define preprocessor directive. Although it is preferable to use the const modifier, there are programs with the #define directive still in use."
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
obviousman.jpg


You wanna impress me, tell me how to seperate and track entities and edicts within the server dll. ;)
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
lol we are getting WAYYY off topic. I'd like the source code and with a professional programmer's help, I think I could make a positive contribution to the mod. Thothy, will you send me the source code? (my aim is brianalbin3, and my ingame name is Cornholio)
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Go get the HL1SDK. Solve the puzzle mentioned above with a successful compile, and I'll consider handing over the source code.
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
Post a link for the hl1sdk.
 

brian4

New Adventurer
The True Followers of the Lost
Joined
Jan 14, 2008
Messages
358
Reaction score
0
collective.valve-erc.com Same site I learned a bit of mapping. n\m.
 

Dridmar

Old Skool Apostle
MSC Developer
Socialist Guild
Alpha Tester
Joined
Feb 2, 2007
Messages
2,252
Reaction score
73
CrazyMonkeyDude said:
brian4 said:
Post a link for the hl1sdk.
It's in the tools tab of steam.

Nope it's not there CMD. You have to download it from a website.
 

CrazyMonkeyDude

New Adventurer
MSC Developer
RiP
Joined
Jun 29, 2007
Messages
2,619
Reaction score
2
Age
35
Dridje said:
CrazyMonkeyDude said:
brian4 said:
Post a link for the hl1sdk.
It's in the tools tab of steam.

Nope it's not there CMD. You have to download it from a website.
Really? I checked, maybe that's not what I thought it was.

Oh, I see. I saw "dedicated server" with the HL1 icon and thought that was the SDK. :X
 
Top