Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Learning Direct X 10


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 28 July 2012 - 02:48 AM

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.

Edited by Inuyashakagome16, 28 July 2012 - 02:49 AM.


Sponsor:

#2 SamiHuutoniemi   Members   -  Reputation: 259

Like
0Likes
Like

Posted 28 July 2012 - 04:03 AM

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! =)

Edited by SamiHuutoniemi, 28 July 2012 - 04:03 AM.


#3 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 28 July 2012 - 04:09 AM

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.

#4 SamiHuutoniemi   Members   -  Reputation: 259

Like
2Likes
Like

Posted 28 July 2012 - 04:47 AM

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.

#5 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 28 July 2012 - 05:27 AM

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.

#6 Acharis   Crossbones+   -  Reputation: 3897

Like
0Likes
Like

Posted 28 July 2012 - 07:11 AM

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 Posted Image 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.

Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)


#7 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 28 July 2012 - 09:17 AM


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 Posted Image 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.

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.

#8 Acharis   Crossbones+   -  Reputation: 3897

Like
-2Likes
Like

Posted 28 July 2012 - 11:29 AM

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.

Europe1300.eu - Historical Realistic Medieval Sim (RELEASED!)


#9 kunos   Crossbones+   -  Reputation: 2207

Like
1Likes
Like

Posted 28 July 2012 - 12:05 PM

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.


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.

Edited by kunos, 28 July 2012 - 12:10 PM.

Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#10 mohq07   Members   -  Reputation: 100

Like
-3Likes
Like

Posted 28 July 2012 - 09:18 PM

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

#11 kunos   Crossbones+   -  Reputation: 2207

Like
0Likes
Like

Posted 29 July 2012 - 12:21 AM

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


why not start from DirectX 1.0 then? Posted Image
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#12 JWalsh   Moderators   -  Reputation: 463

Like
3Likes
Like

Posted 29 July 2012 - 02:17 AM

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.


That's not actually true any more. People had a hard time transitioning to Vista, and rightly so, but today there are significantly more people on Windows 7 than on XP.

Inuyashakagome16, on 28 July 2012 - 11:17 AM, said:
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.


As Kunos pointed out, it depends on what you mean by compatible. Direct3D Feature Levels introduced in DX11 allows you to write D3D code written with the DX11 API that behaves like DX9 and it will be compatible with any DX9 hardware. To add to his points, when writing Windows 8 Apps, D3D9 is not supported. You can continue to use it for desktop applications, but if you plan to make games for Win8 Metro, ARM Surface devices, or Windows Phone 8, you're going to need to use D3D11. DirectX 9 is dead.

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 is undesirable. Understanding the changes between DirectX 9, 10, 10.1, 11, and 11.1 is only useful if you'll be migrating applications from a previous version of DirectX to a newer version. This is because the primary difference between these versions was A). removing the fixed-function pipeline in favor of a pure shader-driven API. B) exposing more stages in the graphics pipeline for use by developers, and C) implementing better scalability through multi-threading and parallelism. In the case of A, we don't want people using the fixed-function pipeline. In the case of B, you can just use the basic vertex and fragment shaders used by DX9, without having to actually use DX9. In the case of C, the benefits are largely transparent to users. Now, I'm not saying there weren't other specific feature updates between version, but from version to version Microsoft mostly added without taking away. So it's entirely possible to start learning a subset of DX 11 functionality without having to regress to DX 9.
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints

#13 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 30 July 2012 - 08:04 AM

All of the posts. o.o After reading through all of this, I've decided to start over (kinda of?) with DX11. I'm still using the same site at least for now till I'm more settled. I'm looking for better books for after I understand the basics at the moment. So if anyone can think of one, let me know. :)

#14 Memories are Better   Prime Members   -  Reputation: 769

Like
0Likes
Like

Posted 31 July 2012 - 12:17 PM

All of the posts. o.o After reading through all of this, I've decided to start over (kinda of?) with DX11. I'm still using the same site at least for now till I'm more settled. I'm looking for better books for after I understand the basics at the moment. So if anyone can think of one, let me know. Posted Image


I havent checked that site but that "Beginning DX10" book imo is not that great and does not deserve even being called beginner. The books I used for DX10 to understand the pipeline and structure were:


Ultimate programming with DX10 - a fairly decent beginner book, explains really nicely but isnt 'ultimate' at all, missing out stream out which is somewhat odd.
Introduction to DX10 - practically a rewrite from the DX9 version, it is a decent book but some things just arent explained at all and you have to work out yourself why it was used.

As for rendering and making things pretty

Real-time rendering - This book has A LOT of theory and deals heavily with rendering, I havent read the whole book but from what I read I loved it, word of advice, dont bother reading this until you are comfortable with the pipeline stages as this doesnt explain anything about directx
GPU Gems 1 -> 3 - Same applies above, full of useful theory and examples, a very nice collection of free books to work with
DX SDK Examples - The DX examples are useful too and gives some theory / examples, it also explains DXUT I guess in a bit more detail which other books lack in

That may seem a lot but to be honest when you get really into graphics programming you will fly through those books

Other books to have a look at.

Physics = Real time collision detection
Sound = FMOD alone should cover all your sound needs imo

I know I have quoted DX10 books but honestly migrating from DX10 to DX11 is simple, the only thing that I truly had to change was my 'Font' classes which DX11 doesnt have, but then thats really where Direct2d / DirectWrite come into play which are thoroughly covered in the DX SDK




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS