Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Question about OpenGl, 3D engines, and C

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2000
    Posts
    5

    Question about OpenGl, 3D engines, and C

    Currently I am learning the C programming language. What I'd like to do after learning it is to make a 3D engine for a game idea I have (I want to make an engine similar to Quake3 not a DOOM clone). What I'd like to know is: 1) how do I go about making a 3D engine, 2) where does OpenGL fit into all of this, and 3) is learning C++ really neccesary for the 3D engine I want to make. Thanks for any help.

    [This message has been edited by Icyrain (edited 06-13-2000).]

  2. #2
    DelsydSoftware
    Guest

    Re: Question about OpenGl, 3D engines, and C

    Though I'm relatively new to the 3d engine field,I think I can answer your questions.

    1) how do I go about making a 3D engine

    First,find some good reference books.If you really want to make a 3d engine,you need to understand some of the basic concepts and math involved with the process,even though you may never have to see them.The Black Art of 3d Game Programming is a good reference.The author of this book does a very good job of explaining the math involved with 3d games,and he touches on just about every aspect of 3d engine creation.The book is intended to be used for dos games,but the lessons that you learn will apply to real projects.

    If you're really crazy about writing your own equations and formulas,you might want to check out Computer Graphics:Practices and Principles.This book is not for the faint of heart,and it can be very dry reading,but it will tell you more about underlying math involved in making a 3d engine.You might want to find a copy of Introduction to Computer Graphics.It's a textbook version of Practices and Principals,and it's quite a bit easier to follow.

    You also might want to check out some sites on the net for 3d tutorials.The 3d Blackhole Tutorial is a good read,if you can find it.I don't have the URL for it anymore.

    You might also want to look at the source code for commercial game engines to see how they're structured.Source code is available for Doom,Quake I,Hexen,Heretic,Descent,and probably a couple other games I can't think of right now.Don't steal code from them,though.It's much better to learn on your own than to steal code from someone else when you can't figure something out.


    And,finally,get a copy of the OpenGL Reference manual(AKA the Red Book).It explains every function in OpenGL,and is really handy to have around.There's a version of it available online,but I really reccomend getting the book,because it is much more convenient.

    2) where does OpenGL fit into all of this,

    OpenGl will be your rendering API.OGL is very powerful,but more importantly,very easy to learn.In 3 days,I was able to make a very basic First Person Shooter engine.It's flat shaded,and there is no collision detection,but it's still pretty amazing.OGL is really the quickest path to success if you're a beginner,or even if you're an advanced coder.OGL code is also platform independent,unlike Direct X.So,you can have your engine compiled for all sorts of bizzare platforms,without having to touch much of the OpenGL code at all.

    3) is learning C++ really neccesary for the 3D engine I want to make

    This is a matter of debate.You can write the engine that you want to write in C without any problems.I personally prefer C over C++,because C++ adds a lot pretty useless functions,from my perspective at least.Anything that can be done in C++ can be done in C.You might have to work a little harder in C in some cases,but that's pretty rare.C should suit you just fine.Doom and Quake were written in C.

    I hope I have enlightened you...

    Chris

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2000
    Posts
    5

    Re: Question about OpenGl, 3D engines, and C

    Thanks for the help it was pretty informative. I was thinking about getting "The Red Book" but am not sure whether to get it or get The OpenGl Superbible which I've also heard good things about as well. I'll be sure to check out The Blackart of... Thanks again.

    [This message has been edited by Icyrain (edited 06-12-2000).]

  4. #4
    DelsydSoftware
    Guest

    Re: Question about OpenGl, 3D engines, and C

    You might want to pick up both.The Red Book is handy for reference purposes,while the SuperBible gives you more information concerning coding and techniques.The Superbible also covers a few popular formula's,like rotation and tranlation in a 3d world<---This would help you out a bit with writing your engine.
    Good luck!

    Chris

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2000
    Posts
    5

    Re: Question about OpenGl, 3D engines, and C

    Thanks. Once I can get some cash I'll pick them up.

    [This message has been edited by Icyrain (edited 06-12-2000).]

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: Question about OpenGl, 3D engines, and C

    <sarkymode>
    Hi! I'm just learning to build little toy houses out of match sticks! I wanna know, how do I build NASA's space shuttle?!
    </sarkymode>


  7. #7
    Junior Member Newbie
    Join Date
    Jun 2000
    Posts
    5

    Re: Question about OpenGl, 3D engines, and C

    Hey, I was just trying to figure out what books I'd need to read to reach my ultimate goal of making a game. It's not like I'm going to build the next Q3 killer this weekend or something.

    [This message has been edited by Icyrain (edited 06-14-2000).]

  8. #8
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: Question about OpenGl, 3D engines, and C

    Hey! hey.. sorry. okay
    my apologies for thatr sarky comment. But!! But. I have to explain the background to my... er... bemusement

    My argument is largely based on the observation that there's a HELL of a lot more to programming than just knowning a language; moreover, there's a hell of a lot to opengl before you can "just" write a graphics engine; it's much in the same vein that knowing english grammar and a vocabularly DOESN"T MAKE YOU A POET or a novelist, or a satirtical essayist, or the ability to write technical documents for a conference.

    Knowing how to construct a for() loop doesn't tell you ANYTHING about how to write large programs. Nor does it tell you how about "advanced" structures you'll need, like stacks, queues, linked lists, binary search trees, binary partition trees, oct trees, hash tables, and so on and so. it won't tell you how to ANALYSE algorithms, to find out when heap sort might be better to use than quicksort, or why bubble sort is so sucky, and so on. Just knowing SYNTAX doesn't MAKE YOU A PROGRAMMER. that's my assertion.

    so, after you're learn how to make a while loop... perhaps even know how to use void pointers properly to get something approaching generics, you want to launch into quake _3_. not even dabbling in wolfevensteins engine, where you don't need to learn about arbitary line intersections (how DO you work out the intersection of two lines? solving simultaneous equations? working out the determinant of the matrix of homeogeneous equations??). You want to get stuck into quake3... an engine that took carmack, a mightly experienced coder, a year to complete...

    I admire your ambition! but! you MUST realise what you're asking isn't impossible, but pretty f*cking close to it...
    you have to practice programming first... to find out HOW to structure your thinking to write programs. you need to learn a heap of maths behind the practice... how to calculate the intersection of lines and polygons for creating oct trees, for example.

    my suggestion is to RELAX about the quake3 engine for now. Learn how to CODE, not how to udnerstand syntax, and try more basic stuff before diving into the quake 3 end..

    don't let me try and flame you and dash your hopes for world domination, btw. I wish you the BEST of luck, but PLEASE realise that what you're asking is a difficult task...

    cheers
    John

  9. #9
    Senior Member Regular Contributor fenris's Avatar
    Join Date
    Mar 2000
    Location
    Cincinnati, Ohio USA
    Posts
    129

    Re: Question about OpenGl, 3D engines, and C

    ya. no sh*t. i learned C/C++ over 6 years ago, have been at this 3D programming gig solidly for about 3 years now. I learn something new every day. This area of programming is enourmously complicated. I thought much the same. You know, whack at it untill i think i got it, then whip out a bad ass engine. NOT. 3D engines go way beyond *looking pretty* I found this to be ture, and it would have been a real hope crusher, had I not been so patient with myself. The ultimate goal: be as fast as possible _AND_ look pretty. Sounds easy enoguh. But unfortunatley it isn't. And if a game is the end goal, theres sooooooooooo much more that goes beyond the backbone renderer. You gotta take into consideration the game logic, user input handling, sound, netwroking, etc... All the while this other stuff will have to run almost at light speed so the little renderer you whipped out retains it's 90+ FPS. John Carmack didn't become the "definitive programming god" overnight. It took him a decade to write the Q3A engine. Thats the truth. I don't wanna put a dent in anyone's desire to tackle the challenges that lie in creating a cutting edge 3D engine. This is just a dose of reality. Oddly enough, it is this reality that keeps me hooked on this stuff. When the day comes that i do achieve my goal...well, you imagine for yourself how you'd feel.

  10. #10
    DelsydSoftware
    Guest

    Re: Question about OpenGl, 3D engines, and C

    I have to agree that it's definitely not easy.I spent 2 years studying OpenGL,game physics,and rendering techniques before I ever touched any 3d code.That has really helped me out,because with all of the reading and outlining I've done,I've been able to get past a lot(but not all) of the common beginner's mistakes and misconceptions.Plus,I've been coding in general for 18+ years,so that tends to help out a bit as well.There is no quick and easy solution.But,I will say that there is a new generation of programmers coming along,with new ideas and new techniques.You've got to start somewhere.But,I've never met anyone who produced a grade A game or application on their first attempt.I wouldn't get discouraged just yet.Just don't expect to write a game and make a million on your first attempt.

    Chris

Page 1 of 3 123 LastLast

Similar Threads

  1. Best engines for openGL (easy to learn)
    By Thaenor in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-14-2014, 01:06 PM
  2. A question about good engines
    By switch in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-22-2004, 02:01 PM
  3. Yet Another Question about Creating 3D-Engines Using OGL :-)
    By QuantumNgen in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 05-31-2003, 10:39 PM
  4. Engines
    By Janneke in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 02-27-2001, 01:43 AM
  5. Libraries, 3D Engines, Game Engines ...
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-10-2000, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean