views:

186

answers:

5

I am reletively new to c++ programming can anyone please tell me how does Direct-X SDK is helpful and how does it works and how can we use it in game programming.I Downloaded it and I found lots of header files and documentation also tells something about game programming.

A: 

I'm not entirely sure what you're asking, but Frank Luna's book on DirectX is a very good intro.

But if you're a relative newcomer to C++, DirectX may be too low-level for what you're looking for. I mean, are you looking to create a colorful rotating cube, or do you want to make a semi-complete game? Assuming the latter, you probably want a framework that abstracts away the low-level details of either DirectX or OpenGL. For that, I can heartily recommend Ogre 3D. The tutorials alone will get you up and running before you know it.

rtperson
+7  A: 

DirectX is a library (a large collection of classes, really) that allows you to "talk" to the video adapter, sound card, keyboard, mouse, joystick, etc. It allows you to do it much more efficiently then other "standard" Windows functions. This is important because games need all the performance gain you can get - and DirectX has plenty to offer in this regard. Especially when it comes to graphics programming, because it has functions that enable you to use the 3D acceleration features of your graphics card. Windows doesn't have such functions by default.

The DirectX SDK contains:

  • Documentation for all the features of DirectX;
  • Tutorials in the C++ language to get you started if you don't know anything;
  • Sample applications;
  • The necessary .h and .lib files to add DirectX support to your program;
  • The debug version of DirectX (I think, I'm not so sure about this one)
  • The DirectX redist that you can include with your own programs.

If you're not up to speed with C++ then starting with DirectX development will be quite difficult, as either of these things has a pretty big learning curve.

Btw - you did download the latest version from Microsoft webpage, not a 5 years old copy from some web guy, right?

Vilx-
This is all true, but still I think he would most probably be better off by not reinventing the wheel, but using a premade engine as mizipzor suggested.
Adrian Grigore
True, but using it directly would be quite educational. :)
Vilx-
A: 

Read a book.

Space_C0wb0y
+3  A: 

Your question is way to broad. DirectX can help you create games in more ways that you can (considering youre new) imagine.

Rendering (putting stuff on the screen), input (responding to what happens on the users mouse/keyboard), network (for multiplayer), reading files, fonts, 3D-models, sound. To name a few.

I urge you not to try to write something yourself directly utilizing DirectX. Getting something good out of it is an extremely complex task. Dont reinvent the wheel unless you plan to learn more about wheels. (The wheel here being DirectX.)

If you just want to get up and running and make World of Warcraft 2, I suggest you use premade DirectX implementations (usually called game engines) such as Ogre, Irrlicht or HGE (simpler, but only for 2D games).

Good luck, dont give up and welcome back later with your first real question. :)

mizipzor
The mantra I've always heard about indie development: You can either build a game or and engine not both.
caspin
Regarding the mantra, I couldnt agree more. I was tempted to post it but I was afraid that just writing such a line and move on could come across as a bit arrogant.
mizipzor
+1  A: 

I'd like to add that "game programming" does not necessitate graphics programming. DirectX, like OpenGL, provides a basis to create a graphics application; but, as mentioned, it's very low level.

As a professional game developer, I would not suggest just jumping into DirectX after learning C++. It's a difficult endeavor that will move slowly and provide you little motivation to continue. It's definitely something to keep in mind for your future; but, for the moment, it would be more beneficial to play with something complete, possibly start with gameplay programming.

Note: In addition to C++ skills, you will also need some mathematical talents. Linear algebra and trigonometry are the primary concerns.

Check out a lightweight engine like Angel. It's a fairly intuitive starting point and small enough that you can fully understand what's happening within it.

As always, try to make small edits and projects for yourself in the beginning and then move on to bigger and badder tasks!

Good luck!

A.A. Grapsas