Sign in to follow this  
Fares

Its me again.

Recommended Posts

Hi, Today I understand that c++ is probably the best language to use in game development, because it is Object-Oriented (not as c) and faster then Java. I am also aware of the fact that game development is not like learning Java(which is easy) but a long process which involves research, reflection and practice (lots of it). I do not expect to become an expert in the few years to come. As I was taught in my first C++ course, always try to create a top-down program. In other words understand the role of every component in order to put it together successfully. Therefore I have a series of questions that I hope you can answer. What is the role of directX or OpenGl ? What is the role of 3D modeling ? What programs do I need to use for 3D modeling ? What books do you recommend I buy ? What software do you recommend I use during this learning process ? Best regards, Fares

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
What is the role of directX or OpenGl ?
Direct3D and OpenGL provide libraries to abstract different kinds of hardware to simplify hardware-accelerated graphics programming.
Quote:
What is the role of 3D modeling ?
To produce 3D art content, such as character models and worlds, for use inside the game.
Quote:
What programs do I need to use for 3D modeling ?
I'm not an artist, so all I use are cheap tools (Milkshape, Blender). I'm told Maya is popular in the professional games industry for an art solution.
Quote:
What books do you recommend I buy ?
I strongly recommend Eckel's Thinking in C++. A great series of books (he has them for Java and a few other languages too).
Quote:
What software do you recommend I use during this learning process ?
Not so much software as general guidelines -- make sure you read things and do them. If you don't understand something, don't skip over it and assume you'll pick it up later.

Share this post


Link to post
Share on other sites
Hello Ravuya,

Quote:
Direct3D and OpenGL provide libraries to abstract different kinds of hardware to simplify hardware-accelerated graphics programming.

Please give me a concret example of what is directX or OpenGl in a game like Battle 2 or Command and Conquer.

Quote:
To produce 3D art content, such as character models and worlds, for use inside the game.

Like cars, maps, weapons etc... ?

Quote:
I'm not an artist, so all I use are cheap tools (Milkshape, Blender). I'm told Maya is popular in the professional games industry for an art solution.

I am not an artist neither but I am taking art classes.
So the answer is Maya ? What about 3Dmax ?

Quote:
I strongly recommend Eckel's Thinking in C++. A great series of books (he has them for Java and a few other languages too).

And for 3D modeling ?

Quote:
Not so much software as general guidelines -- make sure you read things and do them. If you don't understand something, don't skip over it and assume you'll pick it up later.

I meant softwares like Visual C++ 6.0 . Do you have any better softwares ?

Best regards,
Fares

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
Please give me a concret example of what is directX or OpenGl in a game like Battle 2 or Command and Conquer.


As you probably know, everything you see on the screen when playing a game is made up of small polygons -- triangles to be exact. The graphics card does not only display the image nowadays, it is also responsible for drawing these triangles.

Said oversimplified, DirectX and OpenGL are interfaces through which a game can send polygons and textures to a graphics card to be drawn. The graphics card driver implements these interfaces and translates the interface methods into commands that the respective graphics card can understand.

So basically, DirectX and OpenGL are standardized interfaces through which a game can give drawing commands to the hardware, no matter whether it's an nVidia or ATI card, or what model it is.

Quote:
Original post by Fares
Quote:
To produce 3D art content, such as character models and worlds, for use inside the game.

Like cars, maps, weapons etc... ?


Exactly. The visual representation of these things is, like said above, made up of triangles. You build the shape in a convenient modeling software of your choice and then export it into a format where your game can read the individual triangles that make up the model and send them to the graphics card!

-Markus-

Share this post


Link to post
Share on other sites
DirectX and OpenGL are libraries that allow you to interact with your 3D card. In other words, you call some initialization functions and render functions and be done with it. They take care of the rest. Take a look at some tutorials (NeHe's for example), that should give you a better idea.

Basically, yes, 3D modelling packages allow you to create any 3D object. Larger games frequently use a specific program to create levels with, though, and that's often the tool where models are placed in maps, as well as game scripts and such. But, that's surely not the only approach. For some games 3DS Max or another package is used as the level-editor/modeller.
Again, there is a lot of info on this subject on the net. :)

Share this post


Link to post
Share on other sites
Quote:
I strongly recommend Eckel's Thinking in C++. A great series of books (he has them for Java and a few other languages too).


I second that, you can even download a free copy (scroll down) on his website but you'll probally want to but it as it doesnt have solutions to any of the problems/exercises in the online version.

Quote:
I meant softwares like Visual C++ 6.0 . Do you have any better softwares ?


VC++ 6.0 is a horrible thing you can get VC++ 2005 Express Edition for free from microsofts website.

Share this post


Link to post
Share on other sites
Let me get this straight. I create 3D objects with softwares like Maya and 3Dmax, which the directx receives and sends it to the Hardware, which will draw it ? So basicly I am not forced to create a 3D object with directx, right ?

I have another 2 questions:

1) What should I learn first, Directx or OpenGl ?
2) Should I practice in Windows or Linux ?

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
Let me get this straight. I create 3D objects with softwares like Maya and 3Dmax, which the directx receives and sends it to the Hardware, which will draw it ? So basicly I am not forced to create a 3D object with directx, right ?

I have another 2 questions:

1) What should I learn first, Directx or OpenGl ?
2) Should I practice in Windows or Linux ?


1) Either will do fine, both can do anything you want.
2) Doesn't really matter either, practice in whatever system you're using.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
1) What should I learn first, Directx or OpenGl ?
2) Should I practice in Windows or Linux ?


DirectX is only available for Windows, so if you choose DirectX you have no choice. OpenGL on the other hand is cross platform, and works on both Windows and Linux. So if you want to develop on Linux, then OpenGL is your best choice. The best thing would of course be to learn both, but you have to start somewhere.

There has been many discussions here on gamedev about whether one should use DirectX or OpenGL, so I recommend that you do a search on the forum. My opinion is that OpenGL is easier for a beginner to learn, but that is only my opinion.

If you want to learn OpenGL, this is the site to visit. Also check out SDL, a library that enables you to write OpenGL apps that compiles on both Windows and Linux.

Share this post


Link to post
Share on other sites
Quote:

Let me get this straight. I create 3D objects with softwares like Maya and 3Dmax, which the directx receives and sends it to the Hardware, which will draw it ? So basicly I am not forced to create a 3D object with directx, right ?


Kinda...
You have to create or find 3d models in some format, then load those into memory and pass them to the DirectX/OpenGL API in a way
that API understands.

With DirectX, you can save a model in .x format from within most 3d modeling programs. From there the DirectX API provides
a way to load those .x files.

With OpenGL you are stuck creating or finding a library that can load and display the models for you.

If you get started with something like the Ogre SDK you can bypass a lot of this trouble, since Ogre provides many
intefaces for loading models and textures into a 3d scene. But this is even further abstraction from OpenGL or DirectX.
So if you are intent on learning the API, this isn't quite for you yet, but if you want quick results you should
consider using this to bypass some of the learning curve and "recreate the wheel" issues you will run into if you
go directly to the graphics API's.

I should also note that for OpenGL there are libraries like SDL and GLUT that you can use to help load images
and setup the display window. I'd check out NEHE for some good OpenGL tutorials and
starter code.

Share this post


Link to post
Share on other sites
Quote:
So basicly I am not forced to create a 3D object with directx, right ?

That sounds a bit strange since DirectX is not / does not contain a modeling toolkit. But I think you got it partially right.

As said, DirectX and OpenGL are only interfaces. You tell DirectX/OpenGL in your code what polygons to draw and it passes this information on to the graphics card.

Where your code takes these polygons from is up to you. Usually, you read them from a file that was generated by 3dsmax, maya or milkshape. But you could as well produce those polygons in your code (eg. a terrain renderer usually does this).


Whether you learn DirectX or OpenGL first is entirely up to you.

For game programming, Windows is certainly the preferred environment. The vast majority of game developers use windows, thus, it's easier to get help, most tutorials you'll find are tailored to the Windows environment and you're sure to find drivers for your graphics card that support 3D acceleration on windows while it *may* become hard to finding suitable on linux.

-Markus-

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
Today I understand that c++ is probably the best language to use in game development, because it is Object-Oriented (not as c) and faster then Java.
Object orientated programming is just a paradigm, and isn't automatically better for games. A lot of the most famous classic games from the early console years will have been written in straight assembly. Also; Java is not slow; at least, not since the introduction of a just-in-time (JIT) compiler. In fact, since it is recompiled to native code on the end-user's machine the first time it is run, code that relies on a JIT compiler can potentially be faster than native code as it will be optimised to the user's specific machine configuration.

If you're ultimately looking for ease of coding, I'd recommend looking into XNA (C#). If you prefer to stick with Java, you can probably use Managed DirectX alongside J#.

If you're set on C++ then so be it, but don't pick it for the wrong reasons (such as speed). [grin]

Share this post


Link to post
Share on other sites
Welcome to GameDev and Good luck!

When you learn C++ you learn basic textual input and output by cin and cout. These are part of the C++ standard and come with any C++ compiler.
If you want anything more advanced (widowns, buttons, 3d...) you need to include more code (functions and/or classes) that isn't part of the C++ standard. This code can be something from the operating system or from libraries you download.
These added non-standard code has many names with subtle differences such as SDK, API, Engine, library, DLL, and more... but its basically just ready functions for you to use.

You simply cannot do graphics in C++ without some added code.
DirectX/OpenGl is just another API (=added code for you to use) which gives you lots and lots of functions and classes to do (3d hardware accelerated) graphics.


When you make a game you have the exe file which has all the compiled code and you have data files such as mp3 for music and jpg for 2d art. You also have some model data files for the 3d models and game levels.
When you use blender or 3dMax or Maya to create models you save it to a data file, and later your code loads the data file (with DirectX function or a function you made yourself) keeps all the triangle cooridnates in memory and later draws the triangles to screen (with DirectX functions). DirectX is not used to create models, just to draw them and maybe load the data files (but if I remember correct it only support ".X" data format).

Making the 3d models and game programming are very different talents. They require very different knowledge and very different skills. If you are blessed to be skilled in both and have the patience to learn and master both then be happy. If you want, you can focus on programming and use free content (mp3, 3d models, etc...) from the net.

Share this post


Link to post
Share on other sites
you can use OpenGL with java using JOGL bindings. google for them, they're not hard to use, or not harder to use compared to doing OGL with C++.

There is also another binding, "Light Weight" something or other, but I'm not overly familiar with it, but I think it can work a little better with MS Windows.

You don't really need to use the 'best' language for games, simply because it doesn't exist. You can hammer in screws, but a screw driver works better.

Share this post


Link to post
Share on other sites
So you are sugguesting that I start learning game developpement with Java and once I am good (if ever) in it pass to C++ ?

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
So you are sugguesting that I start learning game developpement with Java and once I am good (if ever) in it pass to C++ ?
Yes. If you get good at OpenGL in Java there's no need to move to C++ at all, beyond adding another string to your bow. And if you do, you'd just be learning a new language, not a new language and a new graphics API.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fares
c++ [...] is Object-Oriented

C++ is not object oriented, it is multi-paradigm. If you want a language that truely supports object oriented programming, don't chose C++.

Quote:
Original post by Fares
and faster then Java.

Speed should be your last concern when you learn a language.

Share this post


Link to post
Share on other sites
Hi,

I decided to begin with Java then when I am good enought to start with C++.

I have another question.

I have been reading some of the threads in this forum to understand the role of every component in the game developement world. I see the word engine alot of times. I saw some people talking about commercial engine and free source engine or something like that.

What is an engine ?

I know I am annoying you with this stupid questions.

Best regards,
Fares.

Share this post


Link to post
Share on other sites
Quote:
Original post by benryves
If you prefer to stick with Java, you can probably use Managed DirectX alongside J#.

Ewww. J# isn't Java, it's a language that just happens to look superficially like it. If you want fancy graphics though Java, then I totally recommend LWJGL. Basically it lets you do OpenGL, OpenAL and controller input.

Theres also Jogl as mentioned above. But that is just an OpenGL binding, and tends to be much less reliable (fullscreen support is particularly bad).

Share this post


Link to post
Share on other sites
I have downloaded the Blender software.
For the past 3-4 days I have been reading, watching Blender Tutorials and praticing. My first 3D object was the m24 sniper rifle. I started to make the scope and everything was good, but when I inserted more details into the scope, I faced some weird problems. I could not select all vertices, therefore I could not rotate, grap, resize it or add new vertices. Can it be my graphic card ? I have the Nvidia GeForce 4000 MX. If it is my graphic card, what graphic card do you sugguest I buy (good for gaming and 3D modelling) ? If it is not my graphic card, can it be my Virtual Memory ? I have ... 374 ddram .

Share this post


Link to post
Share on other sites
Hi, I do not know what is the problem. I am also new and haven't used Blender software.


There is no need for any upgrade may be when you get experienced you will need slightly more faster PC.


But if your looking for new graphic card then you should at least get 6200 which is a nice budget card or 6600GT which is more expensive card and also good for gamming. I think you have agp slot, so get agp card only not pcie. Geforce 4 mx card do not support DirectX 9 features like shader model. Geforce 6 and above do support directX 9.0c features including shader model 3 to some extent.

Virtual memory is not physical memory like ram, it is used only when ram is completely used. I do not think it is virtual setting problem.

Share this post


Link to post
Share on other sites
Quote:
Original post by kimiVirtual memory is not physical memory like ram, it is used only when ram is completely used. I do not think it is virtual setting problem.


Not quite entirely true (or at least, the first part of the first sentence is, as is the second sentence).

Explanation: Virtual memory is used on systems where both the hardware and systems software (read: operating system) support paging (although it can be implemented without hardware support, it becomes painfully slow). A page file is saved onto backing storage. Pages (logical sections of memory - 4kB/1MB/4MB in size on the IA-32 architecture) can then be 'swapped out' from memory - that is, they are marked as 'not-present' and their contents saved to backing storage. This allows the system to [appear to] use more memory than is available in physical memory. However, it can be done othertimes simply to save memory (when paging is done depends entirely on the operating system used).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this