Thread: directx9 programming

  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    1

    directx9 programming

    hey so i want to create my own games using directx. from what i understood so far d10 and 11 are not even supported on windows xp so i want to start with directx9. but i'm confused about shaders? i got no experience in directx programming only a bit of c++. so where do i start from? right now i'm at chapter 3 from Thinking in c++ volume 1 lol. so far i understand everything i'm taking notes and also write code for every important feature. so can somebody explain to me the important topics of directx9 programming? also i plan to use the Bullet physics engine in my game and make my own models using Blender. but when i looked at the code samples from directx sdk it was a bit overwhelming. especially the dxut stuff - lots of code there.

  2. #2
    Registered User
    Join Date
    Sep 2007
    Posts
    131
    Yeah, directx is pretty overwhelming. You may want to start with an external lib, like Ogre3D.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    216
    I recommended you work with C/C++ for a while until your comfortable with it. Then, you may want to try some 2D game librarys like Allegro 5 or SDL. This part is up to you depending on your confidence in your skill. Then, you should find a good book on DirectX and read it. If it's a good book, it will provide you with the necessary background knowledge on textures, surfaces, drawing rects, buffer-swapping, etc. You must build up these things in stages.

    Best of luck.

  4. #4
    Registered User
    Join Date
    Sep 2007
    Posts
    131
    Quote Originally Posted by binks View Post
    Then, you may want to try some 2D game librarys like Allegro 5 or SDL.
    Only if he wants to do 2D games. Otherwise, he should work in 3D if he wants to do 3D.

    mum, on top of your C++ book, you will likely find "3D Math primer for Graphics and Game Development" useful if you plan to work in 3D. The math functions/member functions will almost always be provided by the 3D graphics lib of choice, but it's good to have a basis of understanding on scalars, vectors, matrices, dot product, cross product, etc.

  5. #5
    Registered User
    Join Date
    May 2012
    Posts
    71
    Does DirectX provide the best graphics?

  6. #6
    Registered User
    Join Date
    Dec 2011
    Posts
    12
    Hello, Welcome to gaming world. When I started(not too long back), I also had the same questions in mind. I will tell you what I did, rest is up to you how you take it
    - learn C++, with enough programming on the concept of OOP.
    - Windows programming basic so that you know how the control flows and how your code work acordingly.
    - 3D maths, a must. Without you being not comfortable with mathematical concepts like matrix, vectors etc. It will be tough for starting with game programming. (Even I also, even currently keep on learning stuffs in this segment)
    - How to use the DirectX (or OpenGL) API. For DirectX API, examples in SDK is good. Start with the "Simple Sample" for beginners.
    If you are planning for cross platform game, then go with OpenGL else DirectX for Windows only. Shaders can also be written in DirectX 9. Do search for the posts from VirtualAce on this board of game programming. I remember he stated good way to start.
    Rest all our friends are there on this forum and this really nice place to post and get your doubts cleared.
    Keep gaming \m/. .\m/

    Regards,
    NJ

  7. #7
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Does DirectX provide the best graphics?
    DirectX provides the best graphics you can provide to it. DirectX does not provide graphics per se but graphical functionality and leaves it up to the software engineer to provide content, put it on the screen efficiently as possible and also allows them to shoot themselves in the foot with slow algorithms and brute force approaches that usualy result in a slide show of epic proportions.

    DirectX is really more about Direct3D than anything these days. It is an interface to the hardware. D3DX is a library that Microsoft provides that does a lot of little nitty gritty things for you like 3D math, textures, meshes, etc. As most professional studios do not use half of the library much of it will be going away soon. Direct3D is not difficult to use once you understand basic 3D and/or 2D mathematics. If you do not understand transformations and coordinate spaces then you ought to read a few books about graphics before attempting to use it.

    Also selecting another library or abstraction that sits on top of DirectX or OpenGL when you do not understand the math and concepts beneath it is another exercise in futility. Buy a few books on DirectX or OpenGL and a few on 2D or 3D math and maybe one or two on game programming and how to go about structuring your game and game loop so you do not code yourself into no man's land.
    Last edited by VirtualAce; 05-16-2012 at 04:50 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Collision Detection with DirectX9
    By chris2307 in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2011, 12:41 PM
  2. DirectX9 Font Problem
    By Morgul in forum Game Programming
    Replies: 8
    Last Post: 04-18-2005, 01:12 PM
  3. How do I link DirectX9 to MS VC++ 6.0
    By Maddog42 in forum C++ Programming
    Replies: 2
    Last Post: 09-02-2004, 09:46 AM
  4. DirectX9 Game Programming
    By Android in forum Game Programming
    Replies: 1
    Last Post: 10-27-2003, 03:26 PM
  5. DirectX9 question
    By w384life in forum Game Programming
    Replies: 2
    Last Post: 08-09-2003, 01:32 PM