Leaks

Leaks

Re: Leaks Posted by omegaslayer on Thu Feb 19th 2004 at 9:46pm
omegaslayer
2481 posts
Posted 2004-02-19 9:46pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
So does anyone still have problems with leaks???? I know I dont these days, except with complicated levels.
Re: Leaks Posted by OtZman on Thu Feb 19th 2004 at 10:00pm
OtZman
1890 posts
Posted 2004-02-19 10:00pm
OtZman
member
1890 posts 218 snarkmarks Registered: Jul 12th 2003 Occupation: Student Location: Sweden
To be honest I don't map very much(right now). I'm nothing but a big noob, so when I map I almost always get leaks.
Re: Leaks Posted by Wild Card on Thu Feb 19th 2004 at 10:01pm
Wild Card
2321 posts
Posted 2004-02-19 10:01pm
2321 posts 391 snarkmarks Registered: May 20th 2002 Occupation: IT Consultant Location: Ontario, Canada
Yea I got leaks, in Dark Complex... And due to lack of experience and poor mapping (at the time) they were tiny, sometimes several times smaller than 1 unit.
Re: Leaks Posted by Tracer Bullet on Thu Feb 19th 2004 at 10:03pm
Tracer Bullet
2271 posts
Posted 2004-02-19 10:03pm
2271 posts 445 snarkmarks Registered: May 22nd 2003 Occupation: Graduate Student (Ph.D) Location: Seattle WA, USA
Mostly not at all, and when I do it's because I did somthing dumb like forgetting seal of an unfinished area.
Re: Leaks Posted by SuperCrazy on Thu Feb 19th 2004 at 10:06pm
SuperCrazy
102 posts
Posted 2004-02-19 10:06pm
102 posts 1830 snarkmarks Registered: Aug 22nd 2001 Location: Iowa, USA
No, the Unreal engine doesn't have them :smile:
Re: Leaks Posted by omegaslayer on Thu Feb 19th 2004 at 10:09pm
omegaslayer
2481 posts
Posted 2004-02-19 10:09pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
SuperCrazy said:
No, the Unreal engine doesn't have them :smile:
that must be nice. I really havent gotton into the UT mapping because i dont want it to consume my life.
Re: Leaks Posted by Failsafe on Thu Feb 19th 2004 at 10:10pm
Failsafe
49 posts
Posted 2004-02-19 10:10pm
Failsafe
member
49 posts 65 snarkmarks Registered: May 5th 2003 Occupation: student Location: Midwest, USA
I had the unfortunate incident to make a stair case I thought was sealed off into a func_wall, thus causing "mapping chaos!"

I've caused several leaks under 1 unit, due to my excessive use of the vertex tool, so it's not unusual for me to have to compile 5 times before actually fixing my leak.
Re: Leaks Posted by Dr Brasso on Thu Feb 19th 2004 at 10:19pm
Dr Brasso
1878 posts
Posted 2004-02-19 10:19pm
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
failsafe, i find that interesting...in complex geometry, the vertex tool is a hella way to SEAL leaks....hmm

Doc Brass... :dodgy:
Re: Leaks Posted by Failsafe on Thu Feb 19th 2004 at 10:40pm
Failsafe
49 posts
Posted 2004-02-19 10:40pm
Failsafe
member
49 posts 65 snarkmarks Registered: May 5th 2003 Occupation: student Location: Midwest, USA
the problem:

User posted image

found:

User posted image

The point is, I seem to have problems making leaks in terrain more than fixing complex geometry and invalid solids. This was an easy fix, and I only had to compile once before I realised where the leak was.

[EDIT] Odd, most of my post got deleted the first time... [/EDIT]
Re: Leaks Posted by azelito on Thu Feb 19th 2004 at 11:01pm
azelito
570 posts
Posted 2004-02-19 11:01pm
azelito
member
570 posts 127 snarkmarks Registered: Aug 8th 2002 Occupation: Wierdness Location: Sweden
I very rarely have leaks and if I do I know exactly where they are, at the second the compile says LEAK. My maps are very organised.
Re: Leaks Posted by wil5on on Fri Feb 20th 2004 at 12:21am
wil5on
1733 posts
Posted 2004-02-20 12:21am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
Damn those leaks! Theyre always in the place I least suspect... and its usually something stupid like I forgot to put in a wall :azelito:
Re: Leaks Posted by Dr Brasso on Fri Feb 20th 2004 at 1:21am
Dr Brasso
1878 posts
Posted 2004-02-20 1:21am
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
well basicly failsafe, you need to slow down and pay a little more attention to the detail as yer doing it....if it doesnt land on the one to one grid, yer pretty much screwed, the exceptions being geometry created such as arches etc, and even then they will give invalids, and/pr leaks....plan yer architecture a little more carefully, and work it one section at a time.....yer not in a race man....do it the first time with care, and youll not have to do it a second, and tird, and so on,........

Doc B... :dodgy:
Re: Leaks Posted by Failsafe on Fri Feb 20th 2004 at 1:41am
Failsafe
49 posts
Posted 2004-02-20 1:41am
Failsafe
member
49 posts 65 snarkmarks Registered: May 5th 2003 Occupation: student Location: Midwest, USA
Blasphemy, my maps end up doing fine until I get tired of making the map! But thank you anyways Doc, I realise that I should be more careful with such a powerful tool, but it dosen't really matter what errors I make until I get to the end of my map, in which case I fix all of errors, leaks, invalids, texture errors, ect. A lesson to everyone though, don't ever plan on correct looking arches to fill in a gap...It never works :biggrin:

Tbh, paying more attention would, in the end, save me days of work in front of my computer, clicking and dragging several hundred vertices just to solve one or two leaks.
Re: Leaks Posted by Jinx on Fri Feb 20th 2004 at 4:18am
Jinx
874 posts
Posted 2004-02-20 4:18am
Jinx
member
874 posts 692 snarkmarks Registered: Nov 27th 2002 Location: Ohio
I got them more when I was a newbie. anymore I would keep the grid higher, and work only on one area of the map between compiles so I would know exactly where the leak was. And I compile very frequently, too.
Re: Leaks Posted by Crono on Fri Feb 20th 2004 at 4:32am
Crono
6628 posts
Posted 2004-02-20 4:32am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I've found that I really don't get leaks until I try some heavy vertex manipulation. The problem usually happens when I try to make simple architecture into very complex architecture, or if I undersize the length of a wall and stretch it after clipping it somewhere.

So, As much as Doc rants on about this stuff, he's right, and it's pretty much the best advice someone could give, take your time and plan out what you're doing. I can't believe how many "practice" map's I've made and found later that, maybe I didn't have a leak, but r_speeds were amazingly high because I didn't go in far enough to make sure everything is lined up (usually happend with clipping funny angles).

Anyway . . .not that anyone here is as inexperienced as I, but, that's just how I've seen it so far.
Re: Leaks Posted by Gorbachev on Fri Feb 20th 2004 at 4:33am
Gorbachev
1569 posts
Posted 2004-02-20 4:33am
1569 posts 264 snarkmarks Registered: Dec 1st 2002 Location: Vancouver, BC, Canada
I've had two leaks in recent times that weren't really there, one was a solid brush that for some reason glitched out and let VIS through...I had attempted to "to world" it a bazillion times, and eventually just remade the brush exactly as it was and the leak was gone. I've also had this non-existant leak that I just copied and pasted the entire level into a new file and the leak was gone.
Re: Leaks Posted by Dr Brasso on Fri Feb 20th 2004 at 5:34am
Dr Brasso
1878 posts
Posted 2004-02-20 5:34am
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
i cant remember which one, but one of the custom compile tools setups also gives out "untrue leaks"....ill dig around and see if i can find it again....and btw, ive never had leaks form FROM vertex manipulation, although "invalid solids" was at one time the bane of my mapping existance because of it till i figured out how to avoid them...

Rant?...i didnt mean to...sorry, i just get excited.... :heee:

i spose thats an "ageism" thing....im more patient than i used to be, but when im done being patient, look the f**k out!... :wink:

Doc B... :dodgy:
Re: Leaks Posted by Yak_Fighter on Fri Feb 20th 2004 at 5:50am
Yak_Fighter
1832 posts
Posted 2004-02-20 5:50am
1832 posts 742 snarkmarks Registered: Dec 30th 2001 Occupation: College Student/Slacker Location: Indianapolis, IN
:rolleyes: I don't get leaks anymore. That's what a big box around the entire map is for.
Re: Leaks Posted by Edge Damodred on Fri Feb 20th 2004 at 5:57am
Edge Damodred
237 posts
Posted 2004-02-20 5:57am
237 posts 54 snarkmarks Registered: Apr 24th 2002 Occupation: student Location: I don't even know anymore
Well, I got a leaky fawcett... and I get memory leaks in my code sometimes because I forgot to free it up before the program was over...If I actually get back into mapping, I'm sure I'll create more leaks.
Re: Leaks Posted by Dr Brasso on Fri Feb 20th 2004 at 6:16am
Dr Brasso
1878 posts
Posted 2004-02-20 6:16am
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
:rofl: ...good natured-wise asses.....thats what i keep coming back here for.... :wink:

i had a leak once in the service, but the doc gave me a shot of penicillan, and it sealed right up.... :puke:

j/k... :wink:

Doc Brass... :dodgy:
Re: Leaks Posted by Gorbachev on Fri Feb 20th 2004 at 6:19am
Gorbachev
1569 posts
Posted 2004-02-20 6:19am
1569 posts 264 snarkmarks Registered: Dec 1st 2002 Location: Vancouver, BC, Canada
Yak_Fighter said:
:rolleyes: I don't get leaks anymore. That's what a big box around the entire map is for.
That better be a joke, and if not, please don't teach that to people new to mapping...
Re: Leaks Posted by Dr Brasso on Fri Feb 20th 2004 at 6:26am
Dr Brasso
1878 posts
Posted 2004-02-20 6:26am
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
of course it was a joke gorby....hes a king in the realm of wiseass-dom.... :lol:

Doc B... :dodgy:
Re: Leaks Posted by Cassius on Fri Feb 20th 2004 at 6:30am
Cassius
1989 posts
Posted 2004-02-20 6:30am
Cassius
member
1989 posts 238 snarkmarks Registered: Aug 24th 2001
Since with... yes, I guess almost every last map I've ever made, I've always attempted to mimic nature, invalid solid structures were like a plague for me for a year or so, but once you figure out why they occur they aren't no nothin's to fix and avoid.

What I found out about QERadiant that made me fall in love with it is that if you make a shape that Hammer would call an invalid, it just splits it into triangles. I was giggling like a schoolgirl (wow, that sounded gay) when I was able to make a room flooded with bumpy rubble in about ten minutes for a Hammer job of a few hours.

In general, I am likely to ditch a map straight off if it's structure is not very solid and clean... Fool's Paradise is the sole exception; those rocks are all over the place. Since then, my rockwork has gotten amazingly better.
Re: Leaks Posted by Gorbachev on Fri Feb 20th 2004 at 6:31am
Gorbachev
1569 posts
Posted 2004-02-20 6:31am
1569 posts 264 snarkmarks Registered: Dec 1st 2002 Location: Vancouver, BC, Canada
Dr Brasso said:
of course it was a joke gorby....hes a king in the realm of wiseass-dom.... :lol:

Doc B... :dodgy:
Just clarifying, we don't want to teach the young'uns the wrong ideology in the beginning, or else it could get ugly trying to rework 'em. :razz:
Re: Leaks Posted by Crono on Fri Feb 20th 2004 at 9:26am
Crono
6628 posts
Posted 2004-02-20 9:26am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Well, I got a leaky fawcett... and I get memory leaks in my code sometimes because I forgot to free it up before the program was over...If I actually get back into mapping, I'm sure I'll create more leaks.
Yikes, I got into the habit a long time ago to write things like my destructors first (hopefully I'd also impliment copy constructors properly such that I wouldn't need a smart destructor) so that I wouldn't have to worry about most of my releasing later on.

This is sort of related I guess, but, for fun compile this and run it :biggrin:

//C++ code

//define some function in your program

void crash (char array[])
//array has 10,000,000 usable elements
{
char bye[10000001];

while(bye)
crash(bye);
}

(I couldn't think of something as damaging with as little code at the moment, such as a 20 million node tree. . . :biggrin: ).

. . . . As I realize not many people will realize what that code will do . . .
Re: Leaks Posted by Edge Damodred on Fri Feb 20th 2004 at 7:52pm
Edge Damodred
237 posts
Posted 2004-02-20 7:52pm
237 posts 54 snarkmarks Registered: Apr 24th 2002 Occupation: student Location: I don't even know anymore
you sick sick sick sick recursive bastard!!! But at least that'll crash, which is good thing. Here's worse

int main(void)

{

while(1);

return 0;

}

This won't crash but...
Re: Leaks Posted by Crono on Sat Feb 21st 2004 at 1:36am
Crono
6628 posts
Posted 2004-02-21 1:36am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
...bye bye program stack.

Nice infinite loop there, buddy. However, yes that will crash, the program anyway. You'll get a stack dump when that thing overflows (everytime you loop you push on the program stack) oh man, if you were on Windows that'd probably crash it. Actually if you're running windows 95 it's sadly easy to get Mr. Blue screen . . . make an array of 10 ints . . .go to element 10 lol.

But that's pretty simple. However, if I were using dynamic memory in that function I could overflow the heap as well :biggrin:

AND! In that case, even if you killed my program the memory would never be freed (until it lost power of course) because it can't be accessed. I swear a lot of programmers do this, I don't know why, maybe they're Java programmers taking a stab at C++ . . .

However, Edge, the function I made would crash your system and mess it up pretty well. Running out of memory and using up all the VMM is never a good thing.

Anyway...

There's nothing wrong with recursion when used in a proper manner, however, what I wrote was anything but that lol.

I know there's only like three people here besides Edge and myself that will truely see how bad that function is.

Edge, have you ever written in Cg? When writting to the GPU, of course.
Re: Leaks Posted by Dr Brasso on Sat Feb 21st 2004 at 3:52am
Dr Brasso
1878 posts
Posted 2004-02-21 3:52am
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
yeah, but can you do this??... :razz:

Doc Brass... :dodgy:
Re: Leaks Posted by Wild Card on Sat Feb 21st 2004 at 4:05am
Wild Card
2321 posts
Posted 2004-02-21 4:05am
2321 posts 391 snarkmarks Registered: May 20th 2002 Occupation: IT Consultant Location: Ontario, Canada
Alright, enough with the coding, and back to the leaking. :biggrin:

I took a leak today...
Re: Leaks Posted by Crono on Sat Feb 21st 2004 at 4:56am
Crono
6628 posts
Posted 2004-02-21 4:56am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
yeah, but can you do this??... :razz:

Doc Brass... :dodgy:
Do what exactly? the code we've been putting up? If so, yeah you can. It will have the implications of what we've been saying lol.

And in regards to the leak topic of the thread as I said a few posts ago, I think you (doc) have the right idea. It's like anything else, procedurally go through and find the problem and if you spend enough concentration and time in one area making it work properly there's a better chance you won't have to go back and fix it later.

:biggrin: there it's on topic.
Re: Leaks Posted by Edge Damodred on Sat Feb 21st 2004 at 5:34am
Edge Damodred
237 posts
Posted 2004-02-21 5:34am
237 posts 54 snarkmarks Registered: Apr 24th 2002 Occupation: student Location: I don't even know anymore
Crono said:
Edge, have you ever written in Cg? When writting to the GPU, of course.
Actually I just downloaded the stuff from the Nvidia developer site http://developer.nvidia.com/page/home.html (for those interested who haven't looked into it...) I haven't gotten around to working with it, but I will once I get through my final project.

And yes recursion is great, especially if you like to work with trees. It's just when you first learn about it, your brain kinda goes "guurp" and shuts down. Same thing happened when I first tried to understand function pointers....
Re: Leaks Posted by Crono on Sat Feb 21st 2004 at 6:18am
Crono
6628 posts
Posted 2004-02-21 6:18am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Yeah, I've never had much need for function pointers to be honest, it's like one of those things that you should learn so you can best others lol. I'm sure it has its own uses, but I've never really needed it. The stuff I'd like to do is overload useful operators. such as with a tree, it'd be real nice if the treenode class (I usually make them a struct and have no working functions on it) had some overloaded operators, like = . Then inside the tree class, overload all operators, oh man, people would love you lol. However, if you were smart (even though templates are bad) you would use a template and overload everything you can imagine and release some notes with it, meaning you can make a tree for almost anything and people will just have to say Tree += newtreenode or something like that, man that would kick ass . . . anyway. I was asking that because I saw a book on it and I was like "whaa" and I started reading some stuff about it. I'd go get the dev kit, but I personally don't even know the openGL libraries, so.

But I will . . . I will lol.
Re: Leaks Posted by Dr Brasso on Sat Feb 21st 2004 at 7:58am
Dr Brasso
1878 posts
Posted 2004-02-21 7:58am
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
man, after trying to decipher the lingo you two are putting out, im gonna take a couple a aspirins and go back to the religion thread....sheeesh.... :lol:

Doc Brass... :dodgy:
Re: Leaks Posted by Orpheus on Sat Feb 21st 2004 at 9:06am
Orpheus
13860 posts
Posted 2004-02-21 9:06am
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
Dr Brasso said:
man, after trying to decipher the lingo you two are putting out, im gonna take a couple a aspirins and go back to the religion thread....sheeesh.... :lol:

Doc Brass... :dodgy:
how about, we call the doctor in the morning.. its Omaha guys, Omaha Ne :biggrin:
Re: Leaks Posted by Crono on Sat Feb 21st 2004 at 9:50am
Crono
6628 posts
Posted 2004-02-21 9:50am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
man, after trying to decipher the lingo you two are putting out, im gonna take a couple a aspirins and go back to the religion thread....sheeesh.... :lol:

Doc Brass... :dodgy:
. . . sorry? lol
Re: Leaks Posted by ReNo on Sat Feb 21st 2004 at 1:04pm
ReNo
5457 posts
Posted 2004-02-21 1:04pm
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
I've just come across function pointers this semester, and it seems like they could come in useful sometime. Recursion is something that everyone says is useful (or essential, and incredibly neat and tidy compared to the alternatives in many situations), but the only time I've used it is in trees, and I can't thik of many more practical uses.
Re: Leaks Posted by fraggard on Sat Feb 21st 2004 at 1:10pm
fraggard
1110 posts
Posted 2004-02-21 1:10pm
fraggard
member
1110 posts 220 snarkmarks Registered: Jul 8th 2002 Occupation: Student Location: Bangalore, India
Function pointers can be used very well in C++ (as pointers to member functions) to provide one interface to many different methods ,ergo Run Time Polymorphism. In C, I am yet to see a good use though.

BTW: anyone who wants to feel the power of recursion, attempt the Towers of Hanoi problem without recursion and then debate :wink:
Re: Leaks Posted by ReNo on Sat Feb 21st 2004 at 1:16pm
ReNo
5457 posts
Posted 2004-02-21 1:16pm
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
The use I will be making of them is to carry out the current state in a playstation game, written in C. Rather than having huge amounts of switch cases or else ifs, just set the function pointer based on user input or any other determinant on what state will be active (eg. splash screen, initialisation, level 1, etc...) and then call the function that the pointer is pointing to...or something.

Man I suck at programming.
Re: Leaks Posted by Dr Brasso on Sat Feb 21st 2004 at 5:41pm
Dr Brasso
1878 posts
Posted 2004-02-21 5:41pm
1878 posts 198 snarkmarks Registered: Aug 30th 2003 Occupation: cad drafter Location: Omaha,NE
this IS a nice town, friendly folks, good place to raise my kids..... :lol:

Doc B..... :dodgy:
Re: Leaks Posted by Edge Damodred on Sat Feb 21st 2004 at 7:20pm
Edge Damodred
237 posts
Posted 2004-02-21 7:20pm
237 posts 54 snarkmarks Registered: Apr 24th 2002 Occupation: student Location: I don't even know anymore
Crono said:
Yeah, I've never had much need for function pointers to be honest, it's like one of those things that you should learn so you can best others lol. I'm sure it has its own uses, but I've never really needed it. The stuff I'd like to do is overload useful operators. such as with a tree, it'd be real nice if the treenode class (I usually make them a struct and have no working functions on it) had some overloaded operators, like = . Then inside the tree class, overload all operators, oh man, people would love you lol. However, if you were smart (even though templates are bad) you would use a template and overload everything you can imagine and release some notes with it, meaning you can make a tree for almost anything and people will just have to say Tree += newtreenode or something like that, man that would kick ass . . . anyway. I was asking that because I saw a book on it and I was like "whaa" and I started reading some stuff about it. I'd go get the dev kit, but I personally don't even know the openGL libraries, so.

But I will . . . I will lol.
Well, if you really didn't want template classes, you could just use a void pointer to keep track of the data. Granted now any type of data could be in the tree...but hey, there's probably some strange time when you'd want that, I've seen stranger things in game code before. Might have some trouble with the operator overloading though...
Re: Leaks Posted by Monqui on Sat Feb 21st 2004 at 7:36pm
Monqui
743 posts
Posted 2004-02-21 7:36pm
Monqui
member
743 posts 94 snarkmarks Registered: Sep 20th 2002 Occupation: Poor College Student Location: Iowa, USA
I've just come across function pointers this semester, and it seems like they could come in useful sometime. Recursion is something that everyone says is useful (or essential, and incredibly neat and tidy compared to the alternatives in many situations), but the only time I've used it is in trees, and I can't thik of many more practical uses.
Try working in a functional language (like Scheme, LISP, Hascal, etc.). Loops don't exist- the only way to do things is via recursion.

Those languages are 1337 because you get these obscenely long looking things that do incredibly dull things... For example- this line:

(define member-slst? (lambda (s slst) (if (null? slst) #f (or (if (symbol? (car slst)) (equal? s (car slst)) (member-slst? s (car slst))) (member-slst? s (cdr slst))))))

Simply reads through a list of symbols and returns t or f, depenging on whether or not s is a member of the slist. Without recursion, I think I might have shot myself in the face.
Re: Leaks Posted by Edge Damodred on Sat Feb 21st 2004 at 8:14pm
Edge Damodred
237 posts
Posted 2004-02-21 8:14pm
237 posts 54 snarkmarks Registered: Apr 24th 2002 Occupation: student Location: I don't even know anymore
There's a reason progress happens Monqui...
Re: Leaks Posted by Crono on Sat Feb 21st 2004 at 8:40pm
Crono
6628 posts
Posted 2004-02-21 8:40pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Function pointers can be used very well in C++ (as pointers to member functions) to provide one interface to many different methods ,ergo Run Time Polymorphism. In C, I am yet to see a good use though.

BTW: anyone who wants to feel the power of recursion, attempt the Towers of Hanoi problem without recursion and then debate :wink:
. . . why aren't you using Dynamic Binding??

and Edge, how would the definitions change? I mean the only thing I could think of would be to make a struct node and make it to where the programmer could change the struct node to hold whatever datatypes he wanted, then because you used operator overloading, you overloaded many many many many different arguments for the same operators (and yes it would work nicely lol) they could theoretically use your stuff without you using templates. . . but you shouldn't really let people use your code like that, especially because they'd have to compile it and such . . . anyway.

Why keep a void pointer?? that would only be useful in an inhertance heirarcy, and even then you just keep a pointer of the Abstract Base. . . (Meaning you shouldn't really use a pointer of type void because you still don't know what it's pointing to, especially if you assign it in a loop or when using recursion.)

Yeah, there is a crap load of messy code out there for games .. . pick up a Direct3D game programming book sometime (litterally just pick it up, don't buy it or anything) you'll probably be disgusted at the code.

Anyway, I know most wont agree on my programming methodalagy. But anyway, Nice to see some cough coders out there . . . keep learning guys lol. (by the way, monqui, why would you (sort of) bitch about a language you use? I mean if it's difficult to use and there isn't much use in the output . . . why are you using it? Probably for a class, I hope, but then you might want to question the instructor as to why they chose the language (in most classes at PSU the professor chooses the language it's in . . . oh man, I hope I get a dude who wants Java in the compiler courses lol.)
Re: Leaks Posted by Monqui on Sat Feb 21st 2004 at 10:44pm
Monqui
743 posts
Posted 2004-02-21 10:44pm
Monqui
member
743 posts 94 snarkmarks Registered: Sep 20th 2002 Occupation: Poor College Student Location: Iowa, USA
I'm not bitching, I really actually enjoy working in Scheme.

Oh, and these languages are still in use- in fack Jak II for the PS2 has a very large amount of code written in GOAL.

It's fast, simple to learn, and really powerful once you get the hang of it. Who needs variables, anyways?
Re: Leaks Posted by fraggard on Sun Feb 22nd 2004 at 3:15am
fraggard
1110 posts
Posted 2004-02-22 3:15am
fraggard
member
1110 posts 220 snarkmarks Registered: Jul 8th 2002 Occupation: Student Location: Bangalore, India
Crono said:
. . . why aren't you using Dynamic Binding??
I know virtual functions are an easier way, but that's not the only way to go. Some special cases, function pointers are much easier.
Re: Leaks Posted by Edge Damodred on Sun Feb 22nd 2004 at 3:41am
Edge Damodred
237 posts
Posted 2004-02-22 3:41am
237 posts 54 snarkmarks Registered: Apr 24th 2002 Occupation: student Location: I don't even know anymore
I've worked with D3D, and had a 2 month hang over from it. I hope I never have to work with it again(although for the career I'm going into, there's little chance of that).

The reason for the void pointer is to store anything. The problem with templates is that there's a copy of the code for every time that template is used. The void pointer allows you the flexibility to just code one class, and use it to store anything. In a PC environment, it's not that critical, but if you're worried about memory or working on a console, then you might consider the void pointer method. Again, I really can't argue either way, it really depends on your situation.

Monqui

Yes, some of those languages are used, Jak II also used a LISP variant for some of the AI. I'm just glad they aren't main coding languages. I have a hard enough time deciphering some C Macros...
Re: Leaks Posted by Monqui on Sun Feb 22nd 2004 at 3:16pm
Monqui
743 posts
Posted 2004-02-22 3:16pm
Monqui
member
743 posts 94 snarkmarks Registered: Sep 20th 2002 Occupation: Poor College Student Location: Iowa, USA
GOAL is the LISP variant that they made especially for programming games (which is actually really weird because they still used LISP for coding other parts of the game).

"Of the 1.2 million lines of code, roughly 900,000 lines are written in GOAL. GOAL is a programming language based on LISP or rather Scheme (which is a dialect of LISP)."

But in all honesty- once you actually start using these languages, it becomes so damn simple to decipher. Plus, there are only about 8 pre-made functions, so it's a snap to learn. Overloading becomes almost a joke (wanna overload +? do this: (define + *) (+ 3 4), it'll return 12). Functions can be passed as parms, which eliminates the need in java to have those annoying gimpy classes that only hold a function that you want to overload for an interface, since you can just pass it into the function that needs it directly (ex: (apply + '(1 2 3 4 5)) applys the + operator to all the elements in the list given. + is a parameter of apply).

I'll stop ranting, but the languages are gems, I love 'em.
Re: Leaks Posted by Crono on Mon Feb 23rd 2004 at 4:38am
Crono
6628 posts
Posted 2004-02-23 4:38am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I've worked with D3D, and had a 2 month hang over from it. I hope I never have to work with it again(although for the career I'm going into, there's little chance of that).
....I'm sorry :sad: