Click to See Complete Forum and Search --> : C/C++ Programing


Wintermute
10-04-2000, 01:49 PM
...Wanted to start this thread so I could pick the brains of you more experienced programers, especially 3D game developers. Ever since I saw Wolfenstein 3D, I've wanted to know how such software worked. Recently, I've purchased Borland C++ Builder 5 Standard and a few books on 3D graphics. My eyes have been opened; all that boredom I suffered sitting through Trigonometry class is starting to pay off...

At this point, I'm a serious C++ hobbyist trying to advance my skills enough to become a professional game developer (I know, we ALL want to write games).

Any advice (other than 'give up') would be most appreciated. At this point, I really need to know about good reference books, web sites, ect. that would be useful to someone at my level of proficiency. I am considering taking classes in Calculus to further my ability in Computer Science. As going to school is quite expensive, is this really necessary?

------------------
From Blade Runner: Holden> The tortise lies on its back, its belly baking in the sun - thrashing its legs, trying to turn itself over but it can't; not without your help. But you're not helping. Why is that Leon?

Arcadian
10-04-2000, 01:55 PM
I really believe there is a certain amount of experience needed before you can simply dive into 3d programming. I think your best idea is to take more courses. Calculus is good, and it will help with some mathematic algorithms, but more importantly, you should be taking those Computer Science courses. Take the ones with a lot of projects. Theory is nice, but you learn much more by actually writing code. All you really need is a basic CS1 and 2 course, and maybe a data structures course, and then you can start reading the books. They'll make a lot more sense to you after that. http://www.sharkyforums.com/ubb/smile.gif

Rick_James9
10-04-2000, 02:46 PM
Originally posted by Wintermute:
...Wanted to start this thread so I could pick the brains of you more experienced programers, especially 3D game developers. Ever since I saw Wolfenstein 3D, I've wanted to know how such software worked. Recently, I've purchased Borland C++ Builder 5 Standard and a few books on 3D graphics. My eyes have been opened; all that boredom I suffered sitting through Trigonometry class is starting to pay off...

At this point, I'm a serious C++ hobbyist trying to advance my skills enough to become a professional game developer (I know, we ALL want to write games).

Any advice (other than 'give up') would be most appreciated. At this point, I really need to know about good reference books, web sites, ect. that would be useful to someone at my level of proficiency. I am considering taking classes in Calculus to further my ability in Computer Science. As going to school is quite expensive, is this really necessary?



Becoming a good programmer is not easy. You kinda jumped ahead of yourself by starting with C++ but what the hell. Every developer has told me the way you become the best is not in the classroom but to write constantly and find a "mentor". The guys at this site are the REAL deal and they can help.
http://www.cprogramming.com/cgi-bin/UltraBoard/UltraBoard.pl

P.S.-If you "make it". Remember to create a character named Rick_James9 in one of your games http://www.sharkyforums.com/ubb/smile.gif

------------------
Tech GOD

[This message has been edited by Rick_James9 (edited October 04, 2000).]

Wintermute
10-04-2000, 03:34 PM
Thank you, Arcadian and Rick_James9. I should have mentioned that I have in fact had some education in Comp Sci including C and data structures (but I was an electronics major). Additionally, I have been puttering w/C and pseudo-oop w/my Amiga for some years...the process (of finding info in Commodore manuals) has been quite educational. I agree, jumping into 3D graphics is not going to be easy, but it is something I have always wanted to do, so that is motivation enough...for now, anyway. http://www.sharkyforums.com/ubb/wink.gif

Klashe
10-04-2000, 03:45 PM
Not to discourage you, but C++ is without a the most difficult language you can learn or program in. The reason why is because it is so powerful. It is EXTREMELY difficult to just sit down and code without knowing what kind of program you want to make. That's why school is so important, because they give you homework and tests and they point you in the right direction and teach you at the right pace. One of the best books around is the Deitel and Deitel "How to Program in C++". They give you basic excersises and explain many of the quirks and quibbles of the language. It costs around 40 bucks but I have been programming for 6 years and I still use it.
Another option you might want to try is a less difficult (and more forgiving) language. My suggestion is Visual Basic. It's the perfect beginner's language and it's really easy to teach yourself. Plus, if you worked at it, you could probably have a simple game up and running in two weeks (of leisurely programming).
My major point is , don't set your hopes too high at first. Programming takes a certain mindset and it takes a while to get accustommed to it (hell, I am STILL adjusting). Don't expect to read a book and then go, sit down, and program a quake 4. In fact, chances are that your first program is going to simply add two numbers. Slowly but surely, I'm sure you'll achieve yours (and many others) game designing dreams.

Whirlwind
10-04-2000, 04:07 PM
C++ isn't as hard as C is. If you develop the mindset that you are working with a barebones computer system, you will be all set. The comparison - you start with a base system, custom configure it, and set it to the job you configured it for.

If the guy wants to do 3D programming, he can. If he wants to do game programming he needs to start simple - clone a simple game like tetris (don't let Hasbro find out, though http://www.sharkyforums.com/ubb/smile.gif). From tetris go to breakout to pac-man to 3d pac-man. Once he gets the basics down, the rest is additive.

Arcadian
10-04-2000, 04:34 PM
Originally posted by Klashe:
Not to discourage you, but C++ is without a the most difficult language you can learn or program in..

Huh?!? Have you ever used Lisp? How about Fortran? COBOL? These languages are much harder than C or C++. Maybe what you meant to say was that C++ is difficult to MASTER. But in my opinion, it is very easy to learn.


Originally posted by Klashe:
Another option you might want to try is a less difficult (and more forgiving) language. My suggestion is Visual Basic. It's the perfect beginner's language and it's really easy to teach yourself.

That's like telling a perspective artist to try a Disney coloring book before that person experiments with paint http://www.sharkyforums.com/ubb/smile.gif. VB might be an acceptible language for writing the UI for a simple Windows app, but for video games, you definately need to go with C/C++. If I were to suggest a beginner's language, I would recommend Pearl or Java. VB is too bloated, and not nearly as robust. (However, to prevent myself from looking like a hypocrite, let me point out that Pearl and Java are bloated as well, but at least they have they are more widely used in terms of the Internet, and you're more likely to get a better introduction to real programming with them http://www.sharkyforums.com/ubb/smile.gif).

Ymaster
10-04-2000, 04:40 PM
Forget C++ and try the Antechinus C# sharp...

gammaray51
10-04-2000, 05:44 PM
Switching between C and C++, isnt too big of a deal.. just have to know the differences between the two. Although I havent gotten into any "heavy" C code yet, so Im sure I will see lots of change there. For beginers I would recomend perl.. easy to learn and easy to use.

Arcadian
10-04-2000, 06:12 PM
Originally posted by Ymaster:
Forget C++ and try the Antechinus C# sharp...

I have heard of C#, but I don't know too much about it. Can you please elaborate on it. Better yet, make a new topic about it. Thanks! http://www.sharkyforums.com/ubb/smile.gif

Ymaster
10-04-2000, 09:33 PM
Originally posted by Arcadian:
I have heard of C#, but I don't know too much about it. Can you please elaborate on it. Better yet, make a new topic about it. Thanks! http://www.sharkyforums.com/ubb/smile.gif


Gasp...Ok I'll do it when the time is good for me. Might be a long post..muahaha

zombor
10-05-2000, 12:15 AM
2 years ago, i saw a "game programing gurus" book that had the complete source code for doom1 on it, and i showed you how to build a doom type engine from the ground up. Man did it confuse me with my limited c++ knowledge. Im going to wait till im out of school to do any serious programing as im a Computer engineer major. Anyway all the stuff in that book was like 4 years old too so it was kinda pointless to do it.

------------------
Compaq Armada E500
650MHz PIII 128MB RAM
8MB ATI rage mobility
11GB hard drive/DVD

who said you cant game on a notebook????

Sol
10-05-2000, 09:00 AM
Originally posted by Ymaster:
Forget C++ and try the Antechinus C# sharp...

isn't that microsofts so called answer to Java?? I learned PASCAL first and then moved on to C++ and eventually Java. At work I do a lot of Java programming, but the next project will involve some C++ open gl programming so I am hoping to get to dabble in that some.

jtshaw
10-05-2000, 11:07 AM
From the looking for a job standpoint I recommend all the schooling you can get. In my experience school is an envestment. You pay a lot up front but you get a lot back when you are done. As far as references and things for 3D graphics design you should look for a copy of the OpenGL and Direct3D spects. They will tell you everything you need to know about the library calls and such to allow you to use those API's. I have done a minimal amount of 3D work myself and I found that I learned more from people that have experience then any book on the subject. I think this is one of those areas where things are changing to fast for the book publishers. Also, you might want to check out some of the tools for basic C, I know there is a lot of nice OpenGL stuff out there that isn't in C++.
Also, if you really truely wanna be a game developer don't give up. Probably the best way to do it is learn as much as you can and try creating your own product. Myst and Doom are proof that with enough work 2 guys can outsell the likes of Sierra and Interplay.

Originally posted by Wintermute:
...Wanted to start this thread so I could pick the brains of you more experienced programers, especially 3D game developers. Ever since I saw Wolfenstein 3D, I've wanted to know how such software worked. Recently, I've purchased Borland C++ Builder 5 Standard and a few books on 3D graphics. My eyes have been opened; all that boredom I suffered sitting through Trigonometry class is starting to pay off...

At this point, I'm a serious C++ hobbyist trying to advance my skills enough to become a professional game developer (I know, we ALL want to write games).

Any advice (other than 'give up') would be most appreciated. At this point, I really need to know about good reference books, web sites, ect. that would be useful to someone at my level of proficiency. I am considering taking classes in Calculus to further my ability in Computer Science. As going to school is quite expensive, is this really necessary?

Klashe
10-05-2000, 11:46 AM
Arcadian,
Yes, well, it's might be true that LISP , CObol and FOrtran are harder than C or C++ (i don't really know them too well) but how often are those ancient languages used to program games? In fact, how often are they use AT ALL outside of the science/business world? I can't think of any instances.
All I was saying was that out of all of the Languages I know, C/C++ are the hardest. I can't STAND sitting there staring at a screen full of errors because of some piddly little thing where I forgot to take the address of a pointer's address in the .h file. Just thinking about it pisses me off... http://www.sharkyforums.com/ubb/smile.gif C/C++ is a very low level language (as opposed to Java or BASIC) which addes functionality but unfourtunatly increases difficulty.
Yes, Visual Basic is a little simple. Very simple. ****, its called BASIC! But if you had no experience with any type of programming then it's a good stepping stone. All artists started with a "Disney coloring book" and all good programmers started with a simple language. For me, it was BASIC on an APPLE IIe. But I posted that message before Wintermute said that he had had previous programming experience. Knowing that, I would have never told him to go down to VB.

[This message has been edited by Klashe (edited October 05, 2000).]

Adisharr
10-05-2000, 04:51 PM
Hey, I'm also getting into C++. Bought that nift C++ in 21 days - yeah right.. Like no eating, sleeping or bathroom trips..

Anyway it seems ok - all the examples can be done the the MS introductory complier in a psuedo 'text' mode so you don't have to worry about windows function calls. I started to learn C but then figured what the hell - might as well go to C++. I have heard that learning C first may not be a good way to go.

Anyway, I wish you luck - my time to learn is spaced so far out by the time I get the read another section, I have to review the previous ones again http://www.sharkyforums.com/ubb/frown.gif

$ .02

------------------
- Mouse not found - click to continue..

jtshaw
10-05-2000, 05:21 PM
C and C++ can be a little difficult to grasp and don't always give the best error messages but they are great programing languages. C was created by Bell Labs for the development of UNIX and the ability of the language is endless. C++ is basically a macro langauge built off of C that adds in object orientation and gets ride of some of the notorious fun things people would do to make C code basically impossible to read or trace. C++ is not a low level langauge, it is a high level langauge just like Java. The major difference is C++, like C, does not believe in hand holding. You have all the power to do anything, including screw up. I think far to many people confuse C and C++ for being the same thing. On a side note, one of my professors claims that C is the fastest non-assembly langauge in exsistance (ie the finished product runs faster then the finished product from any other langauge)....I wonder if that is true or not.

Originally posted by Klashe:
Arcadian,
Yes, well, it's might be true that LISP , CObol and FOrtran are harder than C or C++ (i don't really know them too well) but how often are those ancient languages used to program games? In fact, how often are they use AT ALL outside of the science/business world? I can't think of any instances.
All I was saying was that out of all of the Languages I know, C/C++ are the hardest. I can't STAND sitting there staring at a screen full of errors because of some piddly little thing where I forgot to take the address of a pointer's address in the .h file. Just thinking about it pisses me off... http://www.sharkyforums.com/ubb/smile.gif C/C++ is a very low level language (as opposed to Java or BASIC) which addes functionality but unfourtunatly increases difficulty.
Yes, Visual Basic is a little simple. Very simple. ****, its called BASIC! But if you had no experience with any type of programming then it's a good stepping stone. All artists started with a "Disney coloring book" and all good programmers started with a simple language. For me, it was BASIC on an APPLE IIe. But I posted that message before Wintermute said that he had had previous programming experience. Knowing that, I would have never told him to go down to VB.

[This message has been edited by Klashe (edited October 05, 2000).]



[This message has been edited by jtshaw (edited October 05, 2000).]

Klashe
10-05-2000, 05:37 PM
jtshaw,

Well, I could be wrong, but I always thought that a low level language (Assembly, for example)was one that you have to do more memory manipulations. I never had to do that in any other language other than C/C++ so I assumed that it was a low(er) level language. But, I just asked my co-worker, and he says C is a low level language and C++ is a high level, so I don't know.

I would have to agree with your professor too. The reason why C can run so fast is because it is close enough to Assembly. YOu are telling the computer how to handle the memory and how to allocate it, instead of relying on pre made funciton/libraries to automatically do it for you. The more user friendly a language is (Java, VB) the more translation is needed from the compiler, which equal longer compile/load times.

Arcadian
10-05-2000, 05:59 PM
Originally posted by Klashe:
jtshaw,

Well, I could be wrong, but I always thought that a low level language (Assembly, for example)was one that you have to do more memory manipulations. I never had to do that in any other language other than C/C++ so I assumed that it was a low(er) level language. But, I just asked my co-worker, and he says C is a low level language and C++ is a high level, so I don't know.

I would have to agree with your professor too. The reason why C can run so fast is because it is close enough to Assembly. YOu are telling the computer how to handle the memory and how to allocate it, instead of relying on pre made funciton/libraries to automatically do it for you. The more user friendly a language is (Java, VB) the more translation is needed from the compiler, which equal longer compile/load times.

Well, there is no language available that gives you as much power over the hardware than assembly. This is true by definition. However, assembly is hard to use, and it's very difficult to read someone else's code. Because of this, C is much more widely used.

C is only as efficient as the compiler, but fortunately modern compilers are a lot more intelligent, and are thus able to tailer the code more specifically for a given set of microprocessors. It's not easy to justify the use of assembly any more, which is why it's rarely used.

C++ is a superset of C, and because of the level of abstraction that can be found in C++ classes, it tends to be a little more bloated than plain ANSI C. But, like I said: C/C++ is only as good as the compiler, and fortunately C++ compilers are fairly efficient these days as well.

Wintermute
10-05-2000, 07:05 PM
Thanks to all for the tremendous support on this thread! http://www.sharkyforums.com/ubb/smile.gif At this point, I feel I should continue to clarify my position in relation to this topic...

1. I'm quite familiar w/C language and have been puttering w/it for about 10 yrs. Nothing too serious - Fractal toys and a complete w/menus, buttons, ect. port of the old UNIX mainframe game Conquest to the Amiga (OS v3.x).
2. While new to C++, I am familiar w/oop (events, msgs, ect.) from my experience w/the Amiga...wish the Amiga would have caught on instead of the IBM PC... http://www.sharkyforums.com/ubb/wink.gif
3. I hate Microslop (because I believe in competition) and will not buy any Messysoft products if I don't absolutely have to - being an avid gamer, I MUST buy the OS.
4. I stopped writing BASIC programs about 15 years ago when I learned Pascal (I kind of got burned by AmigaBASIC)...don't get me wrong, I know VB is a powerful tool and is quite useful for those who wish to create (slower, larger) apps without having to learn a lot of comp. sci. to do it.
5. Being proficient w/algebra and trig, (damned identities!), I don't think I will have too much trouble w/the 3D graphics algorithms...I have heard that AI can be/is calculus intensive although I don't know why it would be...

I'll start w/something easy...I was thinking of doing something like the MS "maze" screen saver...scripted movement, basic textures, simple lighting...seems simple enough...(gulp)...

I've seen C# mentioned but don't know anything about it yet.

Again, thank you...

cheers,

-James

Adisharr
10-06-2000, 12:03 PM
I too wish the Amiga would have caught one better - it was such an advanced machine compared to the crappy x86 series..

$ .02

------------------
- Mouse not found - click to continue..

Geforce25
10-06-2000, 07:26 PM
Originally posted by Whirlwind:
C++ isn't as hard as C is.

I find it neither harder nor easier, just different.

Either way, it maintains the feel of a "do it yourself" language. You have a huge investment in getting started, but once you have a nice set of classes, rapid development is a reality.

johnsonfromwisconsin
10-08-2000, 03:20 AM
If your going to do some 3d programming, then I think C++ is the language you will want to use. I don't believe you'll need any calculus. If you use, say OpenGL you should become very familiar with the various library's and functions of the API. If you do some more hardcore 3d programming, learn lists and pointers.

Arcadian
10-08-2000, 01:28 PM
Originally posted by johnsonfromwisconsin:
If your going to do some 3d programming, then I think C++ is the language you will want to use. I don't believe you'll need any calculus. If you use, say OpenGL you should become very familiar with the various library's and functions of the API. If you do some more hardcore 3d programming, learn lists and pointers.

You can just as easily do 3d programming in C. In fact, if you look at Microsoft's direct3D samples, you will notice a lot of them are in C as opposed to C++. Some people feel comfortable making their own classes, but I also find it easy to create data structures out of C... it allows for some more optimizations. But, since C++ is a superset of C, you can always produce your code in C and C++.

johnsonfromwisconsin
10-08-2000, 01:33 PM
Agreed Arcadian, C is just as good. I usually fall in the habit of refering to both of them by the name of one. I should have been more specific. http://www.sharkyforums.com/ubb/smile.gif

Wintermute
10-08-2000, 03:49 PM
I've spent some time studying the stuff that makes C++ different from C. I'm definitely going to use C++. Writing oop code on the Amiga w/C proved to be very cumbersome because of the huge number of system-related functions required. Classes would have been very useful. Being a neat (code) freak, I also like the modualarity of classes and the way variable/function access can be controlled.

Considering my position on MS, I'm sure I'll be looking mostly at OpenGL...
I am currently using a Voodoo3 3000 PCI (yes, it's obsolete, like the rest of this PC) vid card and am wondering about OpenGL on it. I know (from setting up Half-Life) that a "Voodoo3MiniGL" driver is used by the Voodoo chips. Obviously, this must be a reduced subset of OpenGL. I have heard that glide is on the way out, so I won't bother w/it (like I could find documentation anyway). Am I wasting my time w/MiniGL as well?

Humus
10-08-2000, 05:19 PM
If you're going to do some serious 3d programming my recommendation is C++. OOP programming is always a good thing, and the performance difference over C isn't that much. When you're gonna build you first BSP Tree you'll probably appreciate classes a lot.
And OpenGL is a good choise, it's easy and powerful, unlike D3D which is messy and slightly less powerful.

jtshaw
10-09-2000, 10:24 AM
I might be wrong but I think you can emulate OpenGL somehow on a Voodoo3 card. If not you could always use software drivers to render your OpenGL just so that you can program in the real thing. I wouldn't use the miniGL because, as I understand it (which might not be totally correct....), miniGL is an old Voodoo card thing that isn't supported by none 3dfx cards or even the new 3dfx cards. Anyway, I wish you luck.

Originally posted by Wintermute:
I've spent some time studying the stuff that makes C++ different from C. I'm definitely going to use C++. Writing oop code on the Amiga w/C proved to be very cumbersome because of the huge number of system-related functions required. Classes would have been very useful. Being a neat (code) freak, I also like the modualarity of classes and the way variable/function access can be controlled.

Considering my position on MS, I'm sure I'll be looking mostly at OpenGL...
I am currently using a Voodoo3 3000 PCI (yes, it's obsolete, like the rest of this PC) vid card and am wondering about OpenGL on it. I know (from setting up Half-Life) that a "Voodoo3MiniGL" driver is used by the Voodoo chips. Obviously, this must be a reduced subset of OpenGL. I have heard that glide is on the way out, so I won't bother w/it (like I could find documentation anyway). Am I wasting my time w/MiniGL as well?

100%TotallyNude
10-09-2000, 05:45 PM
Originally posted by Arcadian:
You can just as easily do 3d programming in C. In fact, if you look at Microsoft's direct3D samples, you will notice a lot of them are in C as opposed to C++. Some people feel comfortable making their own classes, but I also find it easy to create data structures out of C... it allows for some more optimizations. But, since C++ is a superset of C, you can always produce your code in C and C++.

While probably not the first person you may want to run to for GL programming, I have been programming with C for a good 15 years, and C++ for at least 7, and Java for the last 3. You use the language best suited for the job, I don't think theres any question; For Win32 programming you'll probably be doing both C++ and plain C. There are some drivers that are best implementeed in C, theres just no question. For the most part when I write stuff for this platform I use C++ and MFC, though for OpenGL you may want to look at STL, I have seen a lot of code out there implemented in STL lately, and that will buy you a lot of cross platform compatability and a vast library of stuff already out there for OpenGL. I mean, why invent the wheel again? Then when you have the
basic design working, you optimize, right? A lot of that optimization can and should be done using the procedural essence of plain C.

It all depends on the circumstances. One thing I can tell you is that software engineering is like a lot of skills. Practice. Its like Billy Crystal's line from 'Throw Mama From The Train'- "A writer writes, always."

Humus
10-10-2000, 09:54 AM
Originally posted by jtshaw:
I might be wrong but I think you can emulate OpenGL somehow on a Voodoo3 card. If not you could always use software drivers to render your OpenGL just so that you can program in the real thing. I wouldn't use the miniGL because, as I understand it (which might not be totally correct....), miniGL is an old Voodoo card thing that isn't supported by none 3dfx cards or even the new 3dfx cards. Anyway, I wish you luck.


Voodoo3 has a OpenGL ICD, it'll be able to run OpenGL fine. However, 3dfx OpenGL support isn't the best (it's like "if we can run Q3 our ICD is complete"). So, as long as you use standard functions it'll be just fine.

Whirlwind
10-10-2000, 04:27 PM
If you scan through OpenGL.org, you might be able to find an article that was written about 6mo. ago about what and what is not supported by the minigl's. Most minigl's supported a good size set of the opengl library, but not all.

Of note, it might be a good idea to point out that you only need to remove 1 parameter (varies from function to function) from Direct3D to convert from C to C++. Also, don't forget that you can mix the two more often than not as not all functions can be contained in a single class or warrent the use of a single class. Go hybrid, just document as you go along.

I had some major rejections to C++ as the projects that I had in college hardly warrented the use of C++. I could always find a better way to do it in C. However this year I picked up on the positive side of C++ and have been poking around with it since. The easy part is coding, the hard part is planning on how to code it.

Sketch
10-12-2000, 11:30 AM
I'll start w/something easy...I was thinking of doing something like the MS "maze" screen saver...scripted movement, basic textures, simple lighting...seems simple enough...(gulp)...


That shouldn't be too difficult for you as long as you understand some basic data structures. Matricies are common in graphic, and you also need a grasp on normal vectors to get lighting to look right, but your Algebra and Trig should have given you that.

Also, if your really serious, get the OpenGL Programming Guide. It's a very good book, and much more like a textbook than a typical language reference, with programming examples and explanations of almost everything in the libraries. I think the latest version is has a red cover and a picture of a 3D rendered scene with globe made out of Legos.

Also, I should add that the Mesa Graphics Library, available from www.mesa3d.org (http://www.mesa3d.org) is a very good OpenGL clone, and not overly hard to get to work if you don't mind playing with it for a while, and I haven't tried anything in it that wasn't supported. It supports a lot more of the language than the miniGL drivers, so you may want to look into that.

Good Luck!

[This message has been edited by Sketch (edited October 12, 2000).]

[This message has been edited by Sketch (edited October 12, 2000).]

Wintermute
10-13-2000, 12:17 PM
Thanks again for the support, especially references and links; I am learning quite a lot from these.

I have been reading 3D Graphics Programing: Games and Beyond (get back w/author) and have found the explanations of the math mostly satisfactory. I can follow the algorithms (very enlightening) but don't entirely understand why the matricies contain the values they do. The translation transformation matrix isn't too bad but for some of the rotation and scaling stuff, the author expands the matricies to 4x4 and fills them with what appears to be gobbledy-gook...

I agree, coding is easy compared to algorithm design. Designing is easy compared to sitting down w/a blank piece of paper and a flowchart stencil...sigh...

Cheers,

-James

100%TotallyNude
10-15-2000, 03:07 PM
Originally posted by Wintermute:
I agree, coding is easy compared to algorithm design. Designing is easy compared to sitting down w/a blank piece of paper and a flowchart stencil...sigh...


James;

If you find algorithm design a pain you might want to look at patterns... it makes the design of algorithms much easier. Any kind of algorithms, not just computer ones. Infact its a whole philsophy. Check out design patterns with your favorite search engine. I can tell you its made my life easier as a Java programmer, but its not just for java. Check it out.



[This message has been edited by 100%TotallyNude (edited October 15, 2000).]

JabberJaw
10-15-2000, 03:39 PM
James, have you ever checked out gamedev.net (http://www.gamedev.net/gamedev.asp)?
Lots of useful info for game development. Plus, look in the Code Vault for the downloadable source code for DOOM, the original Quake, Heretic, Hexen, 3D FPS, and Wolfenstein 3D.

[This message has been edited by JabberJaw (edited October 15, 2000).]

BikeDude
10-15-2000, 06:59 PM
Originally posted by Klashe:
automatically do it for you. The more user friendly a language is (Java, VB) the more translation is needed from the compiler, which equal longer compile/load times.


What about a large C++ program with a lot of header files, macros and stuff which forces the compiler to make multiple passes over the source code?

Compared with a language such as Object Pascal, most other languages pales in comparison. Borland Delphi is a single pass compiler which produces fairly good machine code (strong on string and integer stuff, not so good with fpu optimizations). Interestingly enough, it compiles very complex applications in seconds, whereas something comparable written in C++ would require minutes to compile unless you have the best iron Sun can throw at you (and the end result wouldn't necessarily be better).

In short: Delphi gives you the power of C++ while not being more difficult to master than VB.

There are two books about Delphi that is worth a read (on this subject), one covers OpenGL and the other specifically deals with game programming.

Another interesting point is that Delphi for Linux is in the works. I doubt we'll see MS VB or VC++ for Linux any time soon.

--
Rune

Sketch
10-19-2000, 11:12 AM
Originally posted by Wintermute:
I can follow the algorithms (very enlightening) but don't entirely understand why the matricies contain the values they do. The translation transformation matrix isn't too bad but for some of the rotation and scaling stuff, the author expands the matricies to 4x4 and fills them with what appears to be gobbledy-gook...

It took me a while to see that too. A little background in Linear Algebra helps out a whole lot. I would recommend class, as that's how I learned what little I know, but it was a graduate level (500 level) university course and I realize a lot of hobbyists don't have access to a class like this. I wasn't too motivated either, as I just needed a couple of 500 level classes to graduate. The best thing I've made is a 3D mini-golf game with a couple of obsticles, an altitued change and multiple camera angles, and that was after a quarter long class. To be honest, the hardest thing about it was the ball physics. The graphics, cameras, and lighting was almost trivial, and I actually did the thing in about 24 hours of total work time or so (in the 2 days before it was due,of course).

frankmccann
10-21-2000, 06:14 PM
Wintermute,
You don't need Calculus to understand the Build editor by Ken Silverman, which is what they used for Duke Nukem.
Calculus is great but you don't need it to understand 3D editors. 3D editors are pretty weird and it pays to read anything by others who have tackled them and won. I was very proud of my Duke Nukem level. Calculus.
frank

Originally posted by Wintermute:
...Wanted to start this thread so I could pick the brains of you more experienced programers, especially 3D game developers. Ever since I saw Wolfenstein 3D, I've wanted to know how such software worked. Recently, I've purchased Borland C++ Builder 5 Standard and a few books on 3D graphics. My eyes have been opened; all that boredom I suffered sitting through Trigonometry class is starting to pay off...

At this point, I'm a serious C++ hobbyist trying to advance my skills enough to become a professional game developer (I know, we ALL want to write games).

Any advice (other than 'give up') would be most appreciated. At this point, I really need to know about good reference books, web sites, ect. that would be useful to someone at my level of proficiency. I am considering taking classes in Calculus to further my ability in Computer Science. As going to school is quite expensive, is this really necessary?

jtshaw
10-23-2000, 03:55 PM
I am not really too familar with Delphi but I think the main thing is C++, although it might take multiple passes to compile, creates a final product that is faster then Delphi...or so I hear. I use Borland C++ Builder 5.0 myself and it works fairly nicely, though it might compile slower then Delphi...

Originally posted by BikeDude:

What about a large C++ program with a lot of header files, macros and stuff which forces the compiler to make multiple passes over the source code?

Compared with a language such as Object Pascal, most other languages pales in comparison. Borland Delphi is a single pass compiler which produces fairly good machine code (strong on string and integer stuff, not so good with fpu optimizations). Interestingly enough, it compiles very complex applications in seconds, whereas something comparable written in C++ would require minutes to compile unless you have the best iron Sun can throw at you (and the end result wouldn't necessarily be better).

In short: Delphi gives you the power of C++ while not being more difficult to master than VB.

There are two books about Delphi that is worth a read (on this subject), one covers OpenGL and the other specifically deals with game programming.

Another interesting point is that Delphi for Linux is in the works. I doubt we'll see MS VB or VC++ for Linux any time soon.

--
Rune

BikeDude
10-24-2000, 03:05 PM
Originally posted by jtshaw:
I am not really too familar with Delphi but I think the main thing is C++, although it might take multiple passes to compile, creates a final product that is faster then Delphi...or so I hear.

Actually, Delphi uses pretty much the same backend compiler as Borland C++ Builder... I think you'd be surprised if you did a couple of benchmarks.

If you compare with VC++ though, there are a couple of 'issues' you need to be aware of. Delphi programs by default sets the fpu to use extended for all internal calculations. VC++ defaults to Double. In addition, Delphi also enables fpu exceptions (I'm not sure about VC++). Level the playing field (there's a function called Set8087CW or something that'll let you get access to the fpu parameters) and suddenly whatever distance there was between Delphi and C++ isn't all that much.
http://www.optimalcode.com/ covers some aspects of optimizing Delphi and http://www.gamedeveloper.org/delphi3d/ seems to be a nifty game developer resource...

and finally: http://home.xnet.com/~johnjac/JCEC.htm runs some interesting challenges... (Delphi5 even seems to win a few of them)

--
Rune

Grizzly
10-26-2000, 10:46 PM
Originally posted by Adisharr:
I have heard that learning C first may not be a good way to go.


I was wondering about this myself. I'm in college right now. I took a semester of C++ a while back, and now I've transferred colleges to become a "Website Development" major, and am taking some programming classes in "C" now. I was wondering if I should be happy I'm doing C now, or somewhat disappointed I'm not working with C++ like I used to. So far I've found C and C++ to be fairly easy languages to understand. As long as you have a basic knowledge of the necessary components of programming, it's all abot learning the terms and the syntax. Pretty cut and dry, and pretty danm interesting too.

Oh, and in response to those wondering about which C is classified as, a "lowlevel" or "highlevel" language, my proffessors have always said both C/C++ are "mid-level" languages. Meaning, they're not quite assembly, but they're also a little more in touch with the hardware than Java or Pascal. An example would be, I don't think you can write a virus to flash someone's BIOS in Pascal can you? From what I've been told, only C/C++ have the power and functionality to get down and dirty with the system like that. (not that you would ever want to!)

BikeDude
10-27-2000, 04:45 AM
Originally posted by Grizzly:
Meaning, they're not quite assembly, but they're also a little more in touch with the hardware than Java or Pascal. An example would be, I don't think you can write a virus to flash someone's BIOS in Pascal can you?

That has nothing to do with the language.

With Turbo Pascal you had every bit as much access to the hardware as you had with the other compilers at that time.

With 32 bit versions of Delphi, Borland chose to cut back on some of the old features. E.g. (IIRC) you can't access the old Port array (equivalent to in and out x86 instructions) plus its harder to access memory directly. You can however write assembly code whenever you feel like it:
function returnone: integer; assembler;
asm
mov eax, 1
ret
end;
should compile nicely in all versions of Delphi...

What current versions of Delphi _don't_ have is support for writing VxDs and NT device drivers. This requires rather intimate VC++ compatibility (linker format?) and was a feature only very recently added to Borland's C++ product (which btw is the easiest C++ development tool on the Windows platform to use, but once you discover why, you'll probably kick yourself for not learning Delphi in the first place).

It all boils down to what you want to do. Use VC++ to write device drivers because it's good at that, but if you don't use Delphi for virtually everything else, then you're burning valuable time (well, I don't know how much you value your time).

FWIW: There are those who use VC++ for the nitty gritty details of making device drivers, but as soon as they can use Delphi (Control Panel applets, .dll interfaces, NT service, _anything_) they immediately revert back to Delphi. The smallest console application written in Delphi clocks in at approx 10k.

C can be fun (I spent a year on a settop project that involved QNX and C programming which was fun for a while), but someone with one year worth of Delphi experience should be able to implement almost anything (except for device drivers :-) ) faster than someone with say 3 years worth of C/C++ experience. And the result should generally be better.

Since the OP compiler catches (way) more errors, you end up spending less time testing (which can be tedious at times -- thus someone came up with QA departments).

In short, Object Pascal is easier to read, maintain and compile.

--
Rune

jtshaw
10-27-2000, 09:28 AM
I have to say that whether somebody perfers C, C++, Java, Pascal, or whatever is a matter of personal prefference. The first language I ever learned was Pascal. I used it for a while and then I started learning C. Because I started using the unix environment C was a much better language for me to code in and I haven't touched pascal since. When I do programing in Windows I use Borland C++ Builder. I love the Borland interfaces and think that it has VC++ beat hands down (This is of course, just my opinion). I haven't used Delphi before but having read so many good posts about it I might dust the cobwebs out of that section of my brain that still knows pascal and give it a shot:P I guess the whole point of this post is to say that somebody else can't tell you what language you are going to like coding in better or what tools you will like using better. Some people "speak C" and love it, others think pointers are the devil and won't touch it. Eitherway, the only way you can know what you like the best is to try and give everything an honest shot.

John

------------------
My computer said "WindowsME/2000 or better" so I installed Linux.

Grizzly
10-27-2000, 10:25 AM
heh, this is a pretty darned interesting thread! Now could someone explain to me why some people would think that "pointers are the devil" in C? I personally find them kinda cool. C gives you the flexibility to pass by value, and pass by reference, why would that be a bad thing?

BikeDude
10-27-2000, 03:17 PM
Originally posted by Grizzly:
Now could someone explain to me why some people would think that "pointers are the devil" in C? I personally find them kinda cool.

IMO although pointers are a pretty vital part of a language, there are sometimes ways of using them that borders on insanity.

I particulary remember struggling with function pointers in C. I fluidly understand the concepts involved and have no problems creating and using function callbacks in Pascal, yet in C I faced two problems: First of all, the declaration was ambigious and reading K&R didn't help much, second of all the compiler I used (Watcom C++) accepted virtually anything I threw at it, so I spent some time compiling and testing out the various way of declaring (and using!) these function pointers that I needed. And in this context, having compile times that well exceed (30-50 times slower) the familiar one second Pascal compile and link time is a grueling experience.

So the ironic thing is that with Object Pascal (and particulary Delphi) you'll be using function pointers all the time, and you might not even realise that it indeed is a function pointer.

Pascal:
type
TMyFunc = function(var i: integer; const s: string): boolean;

{ a function taking TMyFunc as arg }
function dostuff(f: TMyFunc; var i: integer): boolean;
begin
result := f(i, 'test');
end;

to use you'd simply say b := dostuff(myfunc, someint); No typecasting involved and no unpleasant surprises (it won't compile unless myfunc declaration _exactly_ matches the declaration of TMyFunc)...

You could _choose_ to typecast and thus override the type checking performed by the compiler, but in 99% of the cases there's no need to do so, and this leads to code that is much easier to maintain. E.g. if someone else working on your project changes the definition of TMyFunc, then he/she won't be able to compile until they've changed the rest of the code as well. The struggles I had with WC++ leads me to believe that this isn't so straightforward in C and thus effectively hinders cross-project collaboration to a great extent.

But I guess this could be an issue that only haunts me.

Other pitfalls that I fell into (or rather annoyed by): Logical vs bitwise operators. There's a difference between & and &&, | and | |, and so on. In Pascal the compiler knows when an and is a bitwise or a logical operator and 'and' is spelt out. In C, this makes perfect sense: x=x+3. Show that to your math teacher, and he'll slap you silly. Once, I even managed to miss an equal sign and typed "if i=0" (or something) and it took a while before it dawned on me that I had actually missed a keystroke (I type touch and have problems reaching the upper row sometimes, besides, on Norwegian keyboards '=' requires that you hit SHIFT-0 making it a doubly awkard character to type). I've been told since that some programmers type if 0==i because this would produce a compiler error if they missed a keystroke... (IMHO that workaround makes the code even more unreadable)

In any case, no time during my one year stint as a professional C programmer did I catch myself thinking "boy, this would've been a lot harder in Pascal" or "wow, this outperforms Pascal a lot". Au contraire. Performance doesn't equate to cryptic code written in a language that was created in the 70s so that larger programs could fit in 3K of memory. Performance is about good algorithms and good coding practices (but some languages make it easier to adapt good habits -- hungarian notation isn't very common in the Pascal world, simply because it's rarely needed!).

I guess it (for me) boils down to that I consider programming an art. C/C++ is much too coarse a canvas for me to paint on, so I choose a somewhat finer and more refined canvas that can bring out the finer details I want to express in less time (while still being able to use the ol' paint roller on the wide areas that doesn't require as much detail and thought). I loathe modern art, but I guess as long as people use their creativity for good, everything is all right in the end.

--
Rune

jtshaw
10-27-2000, 04:30 PM
Heh, I here ya, pointers are one of my best friends... but for those who have trouble with the concept they can be a nightmare. C's ambigious nature is part of it's power. You can do virtually anything. There is very little holding you back in the way of rules. That and the compilers produce some of the fastest damn machine code you will ever find. In a way I think of C vs. Java or Pascal like Linux vs. Windows. C allows you to get down to levels that Pascal (at least in the forms I have used it...again, I have never done Delphi) and Java don't allow so it takes longer sometimes to master but you have more control once you do.

------------------
My computer said "WindowsME/2000 or better" so I installed Linux.

Humus
10-27-2000, 06:16 PM
One negative thing with pointers is that they will limit the compilers ability to optimize the code, since in many cases the compiler cannot know where a certain pointer points and cannot reuse data already in the register but must rather have to go to the memory instead.
Pointers should be avoided as long as they are not needed. Pointers can also be used in ways that make the code hard to read. Especially the ability to use the ++ or -- operators on pointers in C/C++ is IMO plainly stupid. Using arraystyle indexing (like myPointer[i]) instead makes the code much easier to read and generates in many cases faster code.

Grizzly
10-28-2000, 01:52 AM
I have to disagree with you on the ++, and -- usage on pointers. Imagine you wanted to read in 800 seperate scanf's from the keyboard. Easiest way to do this would be to create a big-*** array, and use pointer's in a for loop to increment the location in the array. Like this:

int x, *ptr, array[800];
for(x = 0, ptr = &array[0]; x < 800; x++, ptr++)
scanf("%d", ptr);

Little crap like that make the increment and decrement operators useful with pointers. But you're right, makes for some amazingly cryptic code as it gets more complicated http://www.sharkyforums.com/ubb/tongue.gif

BikeDude
10-28-2000, 05:44 AM
Originally posted by jtshaw:
That and the compilers produce some of the fastest damn machine code you will ever find.

This isn't necessarily so.

Jake's Code Efficency Challenge: http://home.xnet.com/~johnjac/JCEC.htm

Conclusion: A multipass highly optimized compiler is beaten senseless by a single pass compiler which compiles 30-50 times faster (and ends up with as good as or better machine code).

Don't judge a book by it's cover. Just because a compiler is fast, doesn't equate to poorly optimized machine code.

I'd still welcome some pointers (pun) as to what exactly it is that you feel you can do with C that is difficult with other languages. Pascal is a far different animal than Java in that regard.

--
Rune

Humus
10-28-2000, 06:43 AM
Originally posted by Grizzly:
I have to disagree with you on the ++, and -- usage on pointers. Imagine you wanted to read in 800 seperate scanf's from the keyboard. Easiest way to do this would be to create a big-*** array, and use pointer's in a for loop to increment the location in the array. Like this:

int x, *ptr, array[800];
for(x = 0, ptr = &array[0]; x < 800; x++, ptr++)
scanf("%d", ptr);

Little crap like that make the increment and decrement operators useful with pointers. But you're right, makes for some amazingly cryptic code as it gets more complicated http://www.sharkyforums.com/ubb/tongue.gif

What about doing it like this?

int x, array[800];
for(x = 0, x < 800; x++)
scanf("%d", &array[x]);

BikeDude
10-28-2000, 09:14 AM
Originally posted by Humus:
What about doing it like this?

int x, array[800];
for(x = 0, x < 800; x++)
scanf("%d", &array[x]);

Compilers used to (I don't know if they've improved this or not) have a harder time optimizing that code. An array based lookup like that will lead to an additional add instruction. Add is way more costly than inc.

In addition, using the counter variable inside the forloop forces the compiler to count the way indicated. An extra instruction could've been saved had the compiler been given the opportunity to count backwards (i.e. count down from 800 towards 0). Delphi frequently uses this form of optimizations on simple for loops (I dunno if any C for loop can be characterized as "simple" though and benefit from such optimizations).

--
Rune

Humus
10-28-2000, 04:04 PM
Originally posted by BikeDude:
Compilers used to (I don't know if they've improved this or not) have a harder time optimizing that code. An array based lookup like that will lead to an additional add instruction. Add is way more costly than inc.

In addition, using the counter variable inside the forloop forces the compiler to count the way indicated. An extra instruction could've been saved had the compiler been given the opportunity to count backwards (i.e. count down from 800 towards 0). Delphi frequently uses this form of optimizations on simple for loops (I dunno if any C for loop can be characterized as "simple" though and benefit from such optimizations).
--
Rune

At least the MSVC compiler seams to make a better job if you avoid direct pointer aritmetic. I have tried to optimize my code many time by using ++ or -- on pointers just to find out that my code became slower. Most compilers of today are smart enough to optimize indexing in for loops with pointer incrementation, so there's seldom any advantage of using ++ on pointers.

Btw, ADD isn't "way more costly" than INC. They use the same hardware. The only difference is that INC is a one byte instruction while ADD is two, so it can only help the caching slightly in some situations.

garethr
10-29-2000, 11:59 AM
It isn't necessarily so that C programs run faster than anything short of assembly language. Some counter-examples:
- One friend of mine worked on porting a military battlefield simulator from FORTRAN to C. The C version ran a lot slower. That was probably partly due to bottlenecks with the database it was using, but also due to the fact that function-call prolog/epilog is typically slower in C (FORTRAN living without stack frames)
- C++ programs are often as quick or quicker than their C equivalents. That's because it's easier to choose a good data structure/algorithm in C++ than in C (of course, it's also easier to rely on inefficient libraries as well).

Then again, more compiler writers have put more effort into developing C compilers than they have for any other language, so there's something in it, I just wouldn't make it an absolute rule.

garethr
10-29-2000, 12:18 PM
Originally posted by BikeDude:
Compilers used to (I don't know if they've improved this or not) have a harder time optimizing that code. Rune

Modern optimizing compilers can indeed optimize code that uses array notation. They've come a long way since the ++ notation was introduced as a hint to use the PDP11's auto-increment addressing mode. And, since modern processors translate x86 instructions to RISC-like ops before execution, it's not necessarily so that an inc instruction will work faster than an add.

jtshaw
10-30-2000, 03:06 PM
Back in the day when I did Pascal it was very slow... Delphi is probably at least 10,000 times better then Pascal on a DG2000 mainframe though:P The thing I can do in C that I can't do in Pascal, or Java, or anything else mostly pertains to the programming I do on small microcontrollers and pic's. And that is mostly because somebody wrote compilers for C for those chips. It is probably my misconsception but I have always considered pascal a learning language developed for educational purposes (which was it's original intent) and not a high powered language for product development. I also know that educators have mostly migrated from Pascal to C or C++ because they feel it is more worth while for there students to know. Once again, I am not saying that Pascal or Delphi is old and crappy by any means, I haven't actually ever used Delphi. I just know that as far as the world of business goes most new code is being generated in C or C++ and they are both definitly important languages to know and understand.

------------------
My computer said "WindowsME/2000 or better" so I installed Linux.

[This message has been edited by jtshaw (edited October 30, 2000).]

[This message has been edited by jtshaw (edited October 30, 2000).]

BikeDude
10-30-2000, 05:36 PM
Originally posted by jtshaw:
I also know that educators have mostly migrated from Pascal to C or C++ because they feel it is more worth while for there students to know.

AFAIK the educational sector is in complete disarray. I suspect you'll find just as many institutions teaching Java and/or VB as you'll find C++... And the reasons given doesn't have to make sense.

Plus, the same probably goes for the choice of OS. There is probably more demand for NT knowledge these days, but some schools still prefer to push a particular brand of UNIX (be it SUN Solaris, Linux, HP-UX or [insert your favourite flavour of UNIX here]). It doesn't necessarily reflect the real world of yesterday, today or tomorrow. (and I don't mind, learning C and UNIX during my school days never hurt me any)

One of the most popular development environments is Visual Basic. People actually try to use VB to build realworld applications and haven't caught on to the fact that MS has not released anything internationally written using their own tool (someone once mentioned "MS Money", but it's not available overseas so I've never seen it). In fact, the author of "Hardcore VB" once commented that he had to explain a particular piece of BASIC syntax to one of MS' VB developers who had never touched a line of BASIC in his entire life... But still, people insist on using it.

Anyway, a good teacher would probably prefer the most featureless development tool there is, so that the pupil can focus on the basics rather than get caught up with a particular (and extensive) library. I suspect when you say C++, they'd rather go for a stripped down Borland C++ version rather than a full blown C++ Builder with bells on.

YMMV of course...

--
Rune

Humus
10-30-2000, 06:50 PM
Originally posted by jtshaw:
Back in the day when I did Pascal it was very slow... Delphi is probably at least 10,000 times better then Pascal on a DG2000 mainframe though:P The thing I can do in C that I can't do in Pascal, or Java, or anything else mostly pertains to the programming I do on small microcontrollers and pic's. And that is mostly because somebody wrote compilers for C for those chips. It is probably my misconsception but I have always considered pascal a learning language developed for educational purposes (which was it's original intent) and not a high powered language for product development. I also know that educators have mostly migrated from Pascal to C or C++ because they feel it is more worth while for there students to know. Once again, I am not saying that Pascal or Delphi is old and crappy by any means, I haven't actually ever used Delphi. I just know that as far as the world of business goes most new code is being generated in C or C++ and they are both definitly important languages to know and understand.


The real power of Delphi is productivity. You can smash together a complete windows app with a lot of buttons and controls in notime. http://www.sharkyforums.com/ubb/smile.gif It's way more easy than VC++.

dstidolph
10-31-2000, 11:52 AM
If you want to play, start with something working and see how it works. You can get the Quake source code and look at that (though the DOOM code is easier to understand), or work with an existing package you can use:
http://crystal.linuxgames.com/

Building a 3D engine is the task of several highly talented and trained programmers. There are MANY engines already out there.

David Stidolph

jtshaw
10-31-2000, 01:56 PM
Ya, that is why I like Borland C++ Builder a lot. It works very similar to Delphi or so I hear (not surprising though now is it) and it allows me to code in C++. Microsoft was stupid when the didn't allow VB style form building and such with Visual C++. In my opinion there isn't much Visual about VC++. I don't wanna have to learn mfc just to throw a couple windows on the screen.
Also, about the whole Jake's Challenge thing... Putting Delphi up against VC++ doesn't prove that Object Pascal compiles to better optimized source code then C. I personnally use C or C++ for most everything and wouldn't touch a MS product for development. Anyway, the entire of purpose of this thread was about 3D games were are virtually all written in C or C++ and always have been.

Originally posted by Humus:
The real power of Delphi is productivity. You can smash together a complete windows app with a lot of buttons and controls in notime. http://www.sharkyforums.com/ubb/smile.gif It's way more easy than VC++.

------------------
My computer said "WindowsME/2000 or better" so I installed Linux.

[This message has been edited by jtshaw (edited October 31, 2000).]

Sol
11-01-2000, 01:15 PM
Originally posted by jtshaw:
Ya, that is why I like Borland C++ Builder a lot. It works very similar to Delphi or so I hear (not surprising though now is it) and it allows me to code in C++. Microsoft was stupid when the didn't allow VB style form building and such with Visual C++. In my opinion there isn't much Visual about VC++. I don't wanna have to learn mfc just to throw a couple windows on the screen.
Also, about the whole Jake's Challenge thing... Putting Delphi up against VC++ doesn't prove that Object Pascal compiles to better optimized source code then C. I personnally use C or C++ for most everything and wouldn't touch a MS product for development. Anyway, the entire of purpose of this thread was about 3D games were are virtually all written in C or C++ and always have been.



I have to agree with this, I wish there was a quick way to throw up some GUI items in Visual C++. At work we are currently using Java. It is so easy to slap together a GUI in java, I dont have much experience with Delphi, but I would love to see C++ have a really good way of developing a GUI. We have been talking about our next project and probably going with C++ so does anyone know of any compilers that you can prototype a GUI rather easily?

100%TotallyNude
11-01-2000, 04:34 PM
Originally posted by Sol:
I have to agree with this, I wish there was a quick way to throw up some GUI items in Visual C++. At work we are currently using Java. It is so easy to slap together a GUI in java, I dont have much experience with Delphi, but I would love to see C++ have a really good way of developing a GUI. We have been talking about our next project and probably going with C++ so does anyone know of any compilers that you can prototype a GUI rather easily?


I have to strongly DISAGREE with both of ya... I HATE the VB form builder, HATE HATE HATE it. I find the Res editor in Vis Studio to be much more usable in my case than the VB form builder. I notice other guis (like metrowerx on the Mac, I think...?) have this style of dialog editor in their stuff. Uggg... I can't say how much I hate that junk. To each his own I guess, there are enough of you who seem to like it. I did all my Windows programming in MFC though back in the day. I picked up VB once just for fun since it was installed by default with the VS crap along with Fox Pro and something else (fortran?), I guess it a full "enterprise" install deal. Played with the gui builder then tried to get a sample app built. One thing about this story: At the risk of sounding like I am a self-proclaimed Einstein here I picked up MFC by playing around with Visual C++ back in the 16 bit days, that was VC 1.5. I learned how to build simple apps and guis without once looking in the manuals or online help, I did this just by playing around with the framework. I tried this same approach with VB. Nuh-Ah. Wasn't going to happen. I screwed around for 3 days before I finally cracked and looked in the books. Bad practice, I know, but that is my measuring stick. I accept needing to look at docs to do low level, or complex stuff. But if it doesn't make sense to me right off the bat, I suspect the App writer, not me. Needless to say this left a very bad taste in my mouth regard vb. What can I tell ya?

jtshaw
11-01-2000, 05:43 PM
We have been talking about our next project and probably going with C++ so does anyone know of any compilers that you can prototype a GUI rather easily?


If you want simple GUI layout go no further then Borland C++ Builder http://www.sharkyforums.com/ubb/smile.gif I love it http://www.sharkyforums.com/ubb/smile.gif As for VB, I dislike it because I hate programming in basic. But I still can't say I had an trouble building apps with it when I tried it out, without looking at help files or anything, just by clicking around. Maybe you used it before they made it make sense (though some would say it still doesn't make sense).

------------------
My computer said "WindowsME/2000 or better" so I installed Linux.

[This message has been edited by jtshaw (edited November 01, 2000).]

[This message has been edited by jtshaw (edited November 02, 2000).]

Sol
11-02-2000, 08:28 AM
hmmm not sure, but I dont think I said anything about VB. Most of those form builders, like the one in JBuilder is mainly for prototyping and thats what I am interested in right now. Most of my GUI design is done by coding and not done by app builders. Ive done all my programming in Java or C/C++, but C++ is what I would really like to get into in my next project. I can throw a quick GUI together in Java in just a little amount of time, where as in C++, its a little more difficult. Maybe I will just take the time and sit down for a week and get into Visual C++ or some other compiler a little more. http://www.sharkyforums.com/ubb/smile.gif

Originally posted by 100%TotallyNude:
I have to strongly DISAGREE with both of ya... I HATE the VB form builder, HATE HATE HATE it. I find the Res editor in Vis Studio to be much more usable in my case than the VB form builder. I notice other guis (like metrowerx on the Mac, I think...?) have this style of dialog editor in their stuff. Uggg... I can't say how much I hate that junk. To each his own I guess, there are enough of you who seem to like it. I did all my Windows programming in MFC though back in the day. I picked up VB once just for fun since it was installed by default with the VS crap along with Fox Pro and something else (fortran?), I guess it a full "enterprise" install deal. Played with the gui builder then tried to get a sample app built. One thing about this story: At the risk of sounding like I am a self-proclaimed Einstein here I picked up MFC by playing around with Visual C++ back in the 16 bit days, that was VC 1.5. I learned how to build simple apps and guis without once looking in the manuals or online help, I did this just by playing around with the framework. I tried this same approach with VB. Nuh-Ah. Wasn't going to happen. I screwed around for 3 days before I finally cracked and looked in the books. Bad practice, I know, but that is my measuring stick. I accept needing to look at docs to do low level, or complex stuff. But if it doesn't make sense to me right off the bat, I suspect the App writer, not me. Needless to say this left a very bad taste in my mouth regard vb. What can I tell ya?

Sol
11-02-2000, 08:30 AM
Thanks, I use JBuilder for Java, but the designer tool isn't that great because it puts it in some weird Borland XYLayout format... but I have heard from another friend that the C++ is rather good for GUI prototyping. thanks.

Originally posted by jtshaw:
If you want simple GUI layout go no further then Borland C++ Builder http://www.sharkyforums.com/ubb/smile.gif I love it http://www.sharkyforums.com/ubb/smile.gif As for VB, I dislike it because I had programming in basic. But I still can't say I had an trouble building apps with it when I tried it out, without looking at help files or anything, just by clicking around. Maybe you used it before they made it make sense (though some would say it still doesn't make sense).

BikeDude
11-03-2000, 04:43 AM
Originally posted by Sol:
(various comments about C++ Builder)

Also be aware that Borland has licensed MFC, thus if you have some legacy VC++ apps around, Borland C++ Builder should be able to compile most of it off the bat... (best of both worlds)

--
Rune

Sol
11-03-2000, 09:17 AM
Originally posted by BikeDude:
Also be aware that Borland has licensed MFC, thus if you have some legacy VC++ apps around, Borland C++ Builder should be able to compile most of it off the bat... (best of both worlds)

--
Rune

Thanks for the help!

Eugene
11-04-2000, 03:11 AM
You can visit www.opengl.org (http://www.opengl.org) for some information concern with open-gl or get this book "Open-gl super bible"...

------------------
Better to have loved and lost, than to have never loved at all

Eugene
11-04-2000, 03:16 AM
Originally posted by Arcadian:
That's like telling a perspective artist to try a Disney coloring book before that person experiments with paint http://www.sharkyforums.com/ubb/smile.gif. VB might be an acceptible language for writing the UI for a simple Windows app, but for video games, you definately need to go with C/C++. If I were to suggest a beginner's language, I would recommend Pearl or Java. VB is too bloated, and not nearly as robust. (However, to prevent myself from looking like a hypocrite, let me point out that Pearl and Java are bloated as well, but at least they have they are more widely used in terms of the Internet, and you're more likely to get a better introduction to real programming with them http://www.sharkyforums.com/ubb/smile.gif).


So you think those classes, oop and library are much easier than COBOL and FOTRAN?

------------------
Better to have loved and lost, than to have never loved at all

moman_99
11-06-2000, 09:27 PM
Not sure, but from one article I read on C Sharp, it seems that it is a "Visual Basic with a C-interface", meaning that the language is syntactically similar to C, but carries the "features" (bloat) of VB.

BikeDude
11-07-2000, 03:36 PM
Originally posted by moman_99:
Not sure, but from one article I read on C Sharp, it seems that it is a "Visual Basic with a C-interface", meaning that the language is syntactically similar to C, but carries the "features" (bloat) of VB.

I.e. Java with (yet another) new spin on it.

C# has some great features and some new ideas (and a great architect: Anders Hejlsberg) and all, but I'd strongly advice against using something MS doesn't use themselves (e.g. MS never used VB).

--
Rune

Sol
11-08-2000, 10:44 AM
Originally posted by moman_99:
Not sure, but from one article I read on C Sharp, it seems that it is a "Visual Basic with a C-interface", meaning that the language is syntactically similar to C, but carries the "features" (bloat) of VB.

C# is a lot like java with a few spins. I am really not sure what to think about this. Currently on my project we are using Java, but some of the higher up people like to use bleeding edge technology so I am sure I will have to dable with it some soon.

100%TotallyNude
11-08-2000, 01:24 PM
Originally posted by Sol:
C# is a lot like java with a few spins. I am really not sure what to think about this. Currently on my project we are using Java, but some of the higher up people like to use bleeding edge technology so I am sure I will have to dable with it some soon.


C# Is nothing more than Microsoft's latest attempt to horn in on Java. One of the comments from a C# engineer: "We created C# becuase we missed a lot of features of C; like ennumerated types. Why do away with those?" I'm paraphrasing of course, but thats the gist. Its a fine point, but, in a truly object-oriented language ennumerated types aren't nessessary. You can create objects that inherit ennumeration, just like you can create objects that do anything. Thats the whole point of OOP. I would dare to blatently accuse M$ of being very pissed off at not having thought of Java first, and having based 90% of thier money and future on C++. While currently still a nessessary language for doing stuff like device drivers, it couldn't have stayed the enterprise language forever. The computer is the Network now, and having each and every little device connected to the Network speaking a different language isn't going to work.


[This message has been edited by 100%TotallyNude (edited November 08, 2000).]

jester
11-12-2000, 01:32 PM
Originally posted by Sol:
C# is a lot like java with a few spins. I am really not sure what to think about this. Currently on my project we are using Java, but some of the higher up people like to use bleeding edge technology so I am sure I will have to dable with it some soon.


What exactly are you doing with Java? I'm taking a course right now, introducing all the basic concepts. Such as I/O, GUI, Database connectivity, and hopefully some networking. I found that the language is very slow. Does this seem to be a problem with real applications in the career world? Do companies back away because of its lack of speed or do they say "I need something that will run on UNIX, Windows, Solaris, etc"? Sorry if this topic was already talked aobut, didn't feel like reading though 75 posts.

------------------
- jesteŽ

How could tomorrow ever follow today?

Wintermute
11-12-2000, 02:42 PM
Heh, I have broken my EverQuest addiction long enough to get back in touch w/other projects (yeah, right). I've almost finished that book I mentioned earlier...As with many things I have taken the time to learn; it turns out that the things I thought would be difficult to do (translation transformations), are fairly simple while things I didn't consider at all (texture mapping, data base manipulation) are comparatively difficult.
As far as which language to use: I wish I could use Pascal because I think it is an elegant language as far as elegence applies to such a thing. I think C/C++ is much more powerful, but more tedious to work with; but it's what the games are written in, so C/C++ is what I will use. As far as C or C++ goes, I think that using both is the way to go. Many of the core graphics functions/structures really don't have to be object-oriented (and thusly might be faster), but the database stuff screams out for classes.
I think OpenGL is definitely the way to go; thanks for the great refs on this. http://www.sharkyforums.com/ubb/smile.gif

Sol
11-13-2000, 08:48 AM
Originally posted by jester:
What exactly are you doing with Java? I'm taking a course right now, introducing all the basic concepts. Such as I/O, GUI, Database connectivity, and hopefully some networking. I found that the language is very slow. Does this seem to be a problem with real applications in the career world? Do companies back away because of its lack of speed or do they say "I need something that will run on UNIX, Windows, Solaris, etc"? Sorry if this topic was already talked aobut, didn't feel like reading though 75 posts.



The company I am with is developing a multi-tier application. Yes, it is slow, but speed is not that big of an issue. The program, for what it's supposed to do, runs perfectly fine in Java. Right now I do a lot of GUI work. We have three people, one working on DB connectivity, a middle tier person (ejb) and a GUI man. I am also working on an R&D project with web phones. It is probably better to concentrate on the theories behind it, instead of learnign just the Java. I started off with c++ and migrated over to Java and a lot of the concepts carry over. good luck.

jester
11-13-2000, 09:15 AM
Originally posted by Sol:
The company I am with is developing a multi-tier application. Yes, it is slow, but speed is not that big of an issue. The program, for what it's supposed to do, runs perfectly fine in Java. Right now I do a lot of GUI work. We have three people, one working on DB connectivity, a middle tier person (ejb) and a GUI man. I am also working on an R&D project with web phones. It is probably better to concentrate on the theories behind it, instead of learnign just the Java. I started off with c++ and migrated over to Java and a lot of the concepts carry over. good luck.


I've taken about five c/c++ classes that are making java a little bit easier. Classes included c, data structures, (assembly language)creating a compiler with c, c++ itself, and I'm also taking a Visual C++ at the moment. Thanks for the info.


------------------
- jesteŽ

How could tomorrow ever follow today?

jtshaw
11-13-2000, 09:32 AM
Java will always be a little slow because it is runs on a Virtual Machine. As far as portability goes though, it was created specifically so it could run on absolutely every platform with no changes to the code. Of course MS stepped in and had to introduce there own Java stuff and ruined that but as far as Sun's Java goes, it runs on almost any platform, Linux, Solaris, Windows, ect. Only platforms that can't run it are ones without VM's, and all the major OS's have them.

Originally posted by jester:
What exactly are you doing with Java? I'm taking a course right now, introducing all the basic concepts. Such as I/O, GUI, Database connectivity, and hopefully some networking. I found that the language is very slow. Does this seem to be a problem with real applications in the career world? Do companies back away because of its lack of speed or do they say "I need something that will run on UNIX, Windows, Solaris, etc"? Sorry if this topic was already talked aobut, didn't feel like reading though 75 posts.





------------------
My computer said "WindowsME/2000 or better" so I installed Linux.

Sol
11-13-2000, 11:10 AM
Yep, this pretty much sums up why my company is using Java. It has to run on Unix and windows systems.

Originally posted by jtshaw:
Java will always be a little slow because it is runs on a Virtual Machine. As far as portability goes though, it was created specifically so it could run on absolutely every platform with no changes to the code. Of course MS stepped in and had to introduce there own Java stuff and ruined that but as far as Sun's Java goes, it runs on almost any platform, Linux, Solaris, Windows, ect. Only platforms that can't run it are ones without VM's, and all the major OS's have them.