Learning Direct X 10

Started by
12 comments, last by Dynamo_Maestro 11 years, 8 months ago
So I've been learning Direct X 10 through http://www.rastertek.com/tutindex.html and the book "Beginning DirectX 10 Game Programming." So far, not too bad. I've found that the rastertek tutorials are more in depth and he's explaining a bit more and preparing before just making a normal DX project. But to my reason for making this topic, when you learned DX what mistakes did you make along the way? What didn't you understand? And do you have any tips?
I'm moving along pretty well with DX, I just want to get to the point where I can set a background and putting sprites on the screen.
Advertisement
First. Why not learn DirectX 11 instead? The Rastertek tutorials exist in version 10 AND 11, and the differences in DirectX interfaces are small at the beginner level, meaning you can yous the Luna book and pretty much change all 10's for 11's. Also, you could use the Rastertek tutorials for learning the function calls, and using the book for learning the concepts. No point in using an old API.

The hardest part in the beginning for me was that it could take ages to figure out what I had done wrong sometimes, since you can't really use the VS2010 debugger and put breakpoints at places and see your variable values. Today I know about for example PIX, which comes with the DirectX SDK!

Also. In my opinion, Rastertek uses a kind of weird framework. Think things through before making your code library too great. How do you want to organise your classes? How you do it is up to you, but think it through! =)
I guess I wasn't sure what to really go for like 10 VS 11. After looking it up I couldn't decide so I just started on 10. I can start 11 though :P It's just most of the time I see games that are made using like 9, but 9 is old enough as it is, so i just chose 10.

I'll admit I was wondering about that. I thought maybe VS would be able to help me but i guess not. :P

In all honestly, I'm still not sure how I should even make the framework for a large project like this so the tutorials are at least showing me one way to do it. I've taken many classes for programming it's just I've never really worked on a large project. ie. a project with more then 2 header and 3 source files.
Yeah, I know how it is in the beginning. My tip for you is to start out small. Start your framework by creating a class, say "Window", and make sure that it can open a Windows window for you with simple calls. After that, make a class, something like "D3DEngine", and make sure it can initialize DirectX for you. Again, try to make it simple. And by that I mean that the user (maybe just you), can use these classes in simple ways. Ways that you understand if you pause for a year.
Sounds good to me. :) By chance is there a framework book? lmao. Just a general setup would work as well, and I dont mean for only games.

I guess I wasn't sure what to really go for like 10 VS 11. After looking it up I couldn't decide so I just started on 10. I can start 11 though tongue.png It's just most of the time I see games that are made using like 9, but 9 is old enough as it is, so i just chose 10.
It's not exactly like that. DX9.0c is the highest DX version supported by WinXP, which at the moment is the most popular OS on this planet. It makes sense to learn it (if you are going to release anything today or year from today that's a must to have a WinXP compatible version, whci means either DX9 or OpenGL.
On the other hand, learning DX10 makes no sense at all, it's just an outdated version for Vista/Win7 OS. It's better to go all the way for the newest DX11.

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube


[quote name='Inuyashakagome16' timestamp='1343470194' post='4963905']
I guess I wasn't sure what to really go for like 10 VS 11. After looking it up I couldn't decide so I just started on 10. I can start 11 though tongue.png It's just most of the time I see games that are made using like 9, but 9 is old enough as it is, so i just chose 10.
It's not exactly like that. DX9.0c is the highest DX version supported by WinXP, which at the moment is the most popular OS on this planet. It makes sense to learn it (if you are going to release anything today or year from today that's a must to have a WinXP compatible version, whci means either DX9 or OpenGL.
On the other hand, learning DX10 makes no sense at all, it's just an outdated version for Vista/Win7 OS. It's better to go all the way for the newest DX11.
[/quote]
So DX11 is the right way to go then. O.o
If i learn DX11, can i make the game compatible with DX9? I'm guessing you can but it's worth asking. I mean i'm sure its close enough syntax wise so i wont be super lost but.
If i learn DX11, can i make the game compatible with DX9? I'm guessing you can but it's worth asking. I mean i'm sure its close enough syntax wise so i wont be super lost but.
Nope, you would need to make two separate versions.
Personally, assuming you plan to release the game in a few next years, I would ditch DX11 and go for DX9. DX9 is good enough and all games are written for this version anyway (sometimes with optional DX11, enchanted, version), so your games won't look inferior.

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube


[quote name='Inuyashakagome16' timestamp='1343488668' post='4963983']If i learn DX11, can i make the game compatible with DX9? I'm guessing you can but it's worth asking. I mean i'm sure its close enough syntax wise so i wont be super lost but.
Nope, you would need to make two separate versions.
Personally, assuming you plan to release the game in a few next years, I would ditch DX11 and go for DX9. DX9 is good enough and all games are written for this version anyway (sometimes with optional DX11, enchanted, version), so your games won't look inferior.
[/quote]

That is plain wrong. DX11 has feature sets that let you target DX9, DX10, DX10.1 or DX11 hardware. So yes, you can use DX11 to target DX9 class hardware... of course that still won't work on WinXP.

It makes no sense to use DX9 anymore, DX11 is a far superior and more elegant API. Many new games coming out these months are already DX11 only, I'll be surprised to see a DX9 game coming out in 4-6 months.

XP is not relevant anymore (just have a look at the steam hardware survey) and if the trend is confirmed it is going to disappear in few months.. unless you are producing budged games for very old hardware, but in that case, there are much better options than using a native DX9 engine.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

All these are valid points in some way but it all depends how YOU want to approach it, and here is what I think:

If you actually planning on making a game I say use DX11 which is the latest of course, a lot recent games are using it so it would make sense, and it like kunos said it targets dx9,10 hardware as well

If you really want to understand dx in depth then start from dx9, this way you can understand the CHANGES/DIFFERENCE as dx went from 9 to 10 and then to 11. It's all up to you though

This topic is closed to new replies.

Advertisement