Hungarian notation?
by Tim "Zear" Hammock · in Torque Game Engine · 08/31/2001 (4:40 pm) · 9 replies
Has hungarian notation changed since I learned it (possible... no, likely) or is this a version specific to v12? I can't quite make sense of it. Anybody have a reference sheet for this? :)
#2
Hiya Zear!!
It looks to me, at least for the past few weeks, that they followed their own rules, or made up their own system loosely based on Hungarian notation.
I'm the same way with my stuff. I don't really like being told how to write code because I've been doing it for awhile now, looks like the GG staff feels the same way ;)
09/02/2001 (7:22 am)
While that is a good site, I don't believe Zear needs an introduction into the Tribes Scripting capabilities ;)Hiya Zear!!
It looks to me, at least for the past few weeks, that they followed their own rules, or made up their own system loosely based on Hungarian notation.
I'm the same way with my stuff. I don't really like being told how to write code because I've been doing it for awhile now, looks like the GG staff feels the same way ;)
#3
I don't mind using what is already there... and it might make it easier to read in the long run. Not to mention the advantage of knowing what vars are what when trying to 'decrypt' some of the more obtuse code.
09/04/2001 (8:49 am)
Robert's right - I was talking about the C++ source, not the script (thanks tho). It seems they use some kind of var naming convention similar to Hungarian notation, but I can't seem to pin it down. I was just hoping mebbe one of the devs would offer a quick list of the most common conventions, as I would just as soon not mix my conventions with theirs in the same source file.I don't mind using what is already there... and it might make it easier to read in the long run. Not to mention the advantage of knowing what vars are what when trying to 'decrypt' some of the more obtuse code.
#4
Some of the conventions though that are in the code:
cFunctionName: the 'c' is for callback or console... the cFunctionName functions are generally callback functions for console commands so it's a bit of both :)
mFunctionName: the 'm' is for math... these are implitations of common math functions like Cos, Sin, Tan, Cross, Rand, Log and on and on and on...
mVariableName: the 'm' is for member.. easy enough.. class member variables
dglFunctionName: some implementations of old gl functions (for compatibility with.. something i forget, has something to do with the way GL matrices are setup) and some new helpful stuff...
dFunctionName: the 'd' is for dunno...Dynamixs? =) They're implitations of the normal C functions like Realloc, Atoi, Strcpy, Strcmp, Memmove, Memset, Memcpy, etc
alxFunctionName: the 'alx' is for audio library x.. extension? regardless, they're just functions dealing with sound (V12 uses OpenAL.. or at least did though I think it still will after sound is fixed)
gVariableName: global variable
glVariableName: GL variable
stub_FunctionName: broken Audio functions =)
logFunctionName && qwglVariable Name: Fun stuff from winGL.cc... wgl is WinGL im guessing, *shrugs*
tsClasses: handle models and skins and animations, but I couldn't tell you what the ts means
There's a few other odds and ends... just ask about specific stuff so it'll be easier to answer ;)
-nohbdy
09/04/2001 (11:02 am)
I might not be clear on exactly what you're looking at that looks like hungarian notion... this is nothing nearly is obfuscated as hungarian notation (like those beautiful lpsztvjkaImAStringHonest variables for Windows programming)Some of the conventions though that are in the code:
cFunctionName: the 'c' is for callback or console... the cFunctionName functions are generally callback functions for console commands so it's a bit of both :)
mFunctionName: the 'm' is for math... these are implitations of common math functions like Cos, Sin, Tan, Cross, Rand, Log and on and on and on...
mVariableName: the 'm' is for member.. easy enough.. class member variables
dglFunctionName: some implementations of old gl functions (for compatibility with.. something i forget, has something to do with the way GL matrices are setup) and some new helpful stuff...
dFunctionName: the 'd' is for dunno...Dynamixs? =) They're implitations of the normal C functions like Realloc, Atoi, Strcpy, Strcmp, Memmove, Memset, Memcpy, etc
alxFunctionName: the 'alx' is for audio library x.. extension? regardless, they're just functions dealing with sound (V12 uses OpenAL.. or at least did though I think it still will after sound is fixed)
gVariableName: global variable
glVariableName: GL variable
stub_FunctionName: broken Audio functions =)
logFunctionName && qwglVariable Name: Fun stuff from winGL.cc... wgl is WinGL im guessing, *shrugs*
tsClasses: handle models and skins and animations, but I couldn't tell you what the ts means
There's a few other odds and ends... just ask about specific stuff so it'll be easier to answer ;)
-nohbdy
#5
09/04/2001 (2:54 pm)
I believe I read in another thread that the "ts" in tsClasses is for "Three Space or 3 Space or 3D Space - the original name for the engine from which V12 has evolved.
#6
anyone care for a sys$mint ? :-)
09/04/2001 (8:50 pm)
That notation isn't Hungarian notation - It's a variation of Facility Code notation. Familiar to those of us who worked for Digital Equipment Corporation back in the day ...anyone care for a sys$mint ? :-)
#7
09/10/2001 (10:46 am)
Newopts owned me
#8
I'll take that as a compliment. Funny thing is, while threat of death would not make me revisit NewOpts, for some reason the thought of building the options support for my game is really starting to sound fun. Go figure...
09/10/2001 (10:55 am)
I'll take that as a compliment. Funny thing is, while threat of death would not make me revisit NewOpts, for some reason the thought of building the options support for my game is really starting to sound fun. Go figure...
#9
I remember being a newbie to the whole Tribes thing and going to your scripts page.
I know we are making Newopts type thing for our game, its a great way to handle scripting. Makes it easy for morons like me ;).
Sorry that was OT, im used to TW ....
09/10/2001 (11:06 am)
Well it was a complimentI remember being a newbie to the whole Tribes thing and going to your scripts page.
I know we are making Newopts type thing for our game, its a great way to handle scripting. Makes it easy for morons like me ;).
Sorry that was OT, im used to TW ....
Associate Anthony Rosenbaum
http://hosted.tribalwar.com/t2faq/
Anthony