Jump to content
  • Advertisement
Sign in to follow this  
programmerml

Beginner DirectX Tutorials

This topic is 4842 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've gotten pretty good with making a bunch of simple text programs so now I want to start with the DirectX stuff. Where should I start? Some links to some good tutorials would be helpful. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Well, first of all, when you install the SDK it comes along with a very nice help and some good sample applications. I suggest you'd take a look at those.

Next, a good site for DirectX 8 & 9 tutorials is Drunken Hyena: http://www.drunkenhyena.com/.

Finally, I recommend Frank Luna's book "Introduction to 3D Game Programming with DirectX 9".


Good luck!

Share this post


Link to post
Share on other sites
I've been trying to do some DirectX 9 work this weekend, being fairly new I found the developers samples in "C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Samples\C++\Direct3D\Tutorials" (default install path) to be very helpful. With the caveat that you do not copy and paste the examples.

Just my two cents.
Rewt

Share this post


Link to post
Share on other sites
... And another one I forgot is here - http://www.andypike.com/tutorials/directx8/

(Though it's DX8 only, the basics are more or less the same)

Share this post


Link to post
Share on other sites
There arent that many great tutorials out there, there are a few like andy pike and drunken hyhena but they are solo apps (much similar to the sdk tuts you get)
allthough these programs help you get something on the screen to look at, they dont really pave the way for good coding practice.

The code in most online direct tuts is a mess as it is all done in one cpp file. Classing up some of dx modules such as the direct3d, a windows window and a class to deal with loading and displaying textures such as a tile class isnt explained in many of the online tutorials i have seen.

Learning DX is very hard, ive been trying for 6 months now and although im familar with somw of the calls dx makes im still pretty crap at getting it into an OO design.

the best book ive seen so far (possibly cos its the only book ive got on dx) is the sams teach urself dx in 21 days . . be warned tho it gets hairy quickly and its in dx8. The text is not as well written as it could be and some of the early parts leave you looking at functions with 10 parameters in them and you have absolutly no idea what they do and just add the numbers he tells you.

Other than that there is the msdn but i advise u to stay away from that unless u are one of the really good coders. MSDN to me is confusing and the only time i use it if i get an error like GetSprite() does not take 5 arguments .. i can then see whow many it does tske and try nd assume that what im adding makes sense to me

dx is hard and there isnt all that much around to hlp you, this site however does do the best job of the bunch

hope you succeed cos im nearely at defeat with this api

Share this post


Link to post
Share on other sites
Quote:
Original post by counterrabbit
allthough these programs help you get something on the screen to look at, they dont really pave the way for good coding practice.


To be fair, that's all their goal is. Learning about DirectX and learning about software engineering are 2 totally different things. There's nothing special about DirectX in regards to OO design. Trying to teach too much at once is a recipe for failure.

Quote:

The code in most online direct tuts is a mess as it is all done in one cpp file. Classing up some of dx modules such as the direct3d, a windows window and a class to deal with loading and displaying textures such as a tile class isnt explained in many of the online tutorials i have seen.


Once you build a framework you raise the bar to entry. A lot of people hate the Microsoft samples because you need to understand their framework to have a hope of following what the samples are showing. Obviously you would never do a significant project all in a single cpp file without decent abstraction, but it's the best way to keep things clear and easy to understand.

Quote:

Learning DX is very hard, ive been trying for 6 months now and although im familar with somw of the calls dx makes im still pretty crap at getting it into an OO design.

Learning DirectX is very hard. Graphics programming is HARD. Game development is HARD. Anyone who says differently is trying to sell you something. But there are things to make it easier. I'd recommend investing in some programming books. Get a good C++ book that explains all the ins and outs of classes and class design. When you understand good class design, and you understand the DX concepts you will be able to easily combine the 2.

Quote:

the best book ive seen so far (possibly cos its the only book ive got on dx) is the sams teach urself dx in 21 days . . be warned tho it gets hairy quickly and its in dx8. The text is not as well written as it could be and some of the early parts leave you looking at functions with 10 parameters in them and you have absolutly no idea what they do and just add the numbers he tells you.

No one is going to learn much about DirectX in 21 days. NOTE: They are trying to sell you something.

Quote:

Other than that there is the msdn but i advise u to stay away from that unless u are one of the really good coders. MSDN to me is confusing and the only time i use it if i get an error like GetSprite() does not take 5 arguments .. i can then see whow many it does tske and try nd assume that what im adding makes sense to me

The documentation is very valuable no matter what level you are at. When you're starting out you won't understand everything, but that's okay. Some of the most important bits are the "Remarks" at the end of every function definition, these often point out very useful information.

Quote:

hope you succeed cos im nearely at defeat with this api

When you're feeling defeated sometimes the best thing you can do is to take a little break. If you get a good C++ book then you can use that time to still move yourself forward without bashing your head against DX. Then after a short break you can come back fresh.

Unlike DX, C++ has not changed appreciably in quite a long time. If you're short on cash it's likely that a library will have at least a few C++ books and you don't have to worry about it being out of date.


Share this post


Link to post
Share on other sites
thanks for that hyena, i was merely trying to put myself in the op shoes, all what i said isnt my personal stance, im just trying to remember when i heard that to get graphics on the screen i needed the use of an API, open gl i learned in first but as i got better directx seemed more apealing although the engines i build will support methods from both.

I said these things to show the OP that doing this isnt easy and that he certainly isnt the only one who has to face the masive up hill barrier he has to face with dealing with any api.

I believe i can tech dx and c++ 10x better than most books ive come across in the areas i know best.

Personally i would explain the importance of OO design. The c++ in 21 days is obviously trying to sell something BUT the author of that book is indeed a dx programmer so by essence there must be some value in his writing.

he does class up his program later but i feel a better approach would be top get the user doing this from the start. if the user has no idea then he doesnt really understand inheritance, polymorphism and the whole concept of deriving classes and the use of singleton classes and virtual methods. This needs to be undersood before the undertaking of any graphical api.

So OP if you are infact following ur posts, im sorry to say but what u are trying to do is really hard and at least full understanding of a c++ in 24 hrs book is needed. These books as pointed out by hyena are not great but they cover everything you need, but not the stl which i recommend you get to grips with as soon as you can stl programming from the ground up is a great book for that.

All i can say is, keep at it, i 'WAS' at defeat with the API at one point but then someone showed me another way of looking at it and the penny dropped (albeit 2 years ago so further practice has gone into it by then).

if you are new to programming the MSDN may confuse u, it is helpful, i use it all the time but as a beginner it is veryy little help. This has to be fact as beginners who i know all say "i dont understand that msdn its really complicated", so on about 30 counts of that for beginners the stats say that the msdn is pretty hd work for beginners, the reason for this is they simply dont understand functions properly yet and a few keywords. I know what they mean tho cos when i first looked at it i saud the same thing

feel free to pm me if you require more help cos i totally understand the frustration u are going through

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!