DirectX vs XNA

This post is directed toward my direction in my 3D education. My first step started with Managed DirectX 1.1. I read Tom Millers first book, and I read a bunch of articles online for it. I absolutely loved MDX. I started playing with MDX 2.0 when that started coming out, but unfortunately it's been discontinued. However, in it's doom came XNA to bring back the light.

XNA is a wonderful step toward bringing game development to the masses. However, it's a step. It has a long ways to go to allow somebody starting out with game development to make a 3D game. For 2D game development it's amazing. The coolest part about it though is the fact that you can put your games on the XBox 360 for other people to play. Then the little downfall of that comes in. In order to share your game, the other person has to be in the game creators club. The main reason you'd be in the game creators club? So you can create games that can go on the the 360. Why would you share your game? So your friends could play them, and enjoy it. I have a few friends that are also programmers, not all of them are game programmers either though. But I also have a lot of friends that have no desire to create games because they don't want to do the coding and therefore won't be willing to spend $100 to get a game creaters club license. So what does that mean? You're developing for the PC if you want all of your friends to be able to play your games. Which for XNA, that's great! It's an excellent and amazing platform for development, especially for 2D games.

Now, what about DX10. XNA is dedicated to working on the XBox 360. Which means that it will always be restricted by the video card in the xbox 360. That means no shader 4.0, and for that matter no DX10 support. XNA is stuck where it is technology wise. Whereas DirectX is still moving forward. It's a much more complex system to work with though. C++ isn't nearly as fun to work with as C#. It's a challenge.

This last weekend I start learning DirectX9 and C++. The last time I dealt with C++ I was 13 years old. To say the least I didn't understand much of it at the point. Now, here I am concerning myself with pointers and memory management and obscurely unfriendly CAPS. Do Micorosft employees have sticky Caps Lock keys? To say the least, it's a challenge, but I'm loving it! There are lots more PC's out there than Xbox 360's. You can use an Xbox 360 controller on a pc. There's not much of an advantage to XNA or DirectX aside from the wonderful XNA system. Yet, XNA is technologically stuck. DirectX still has a long future in gaming and it'd be well worth the effort to learn it.

Not only that but Managed versions of DirectX possibly won't come, and if they do it won't be for a while. Plus, given the rep sheet, if it does come, it probably won't support everything the C++ side does. So, for now, I'm going to start learning C++, and DirectX9, and then move to DX 10 as soon as I get a compatible card and Vista.

So, that's my direction. C++ and DirectX. What do you guys think?

Print | posted on Sunday, January 07, 2007 11:17 PM

Comments on this post

# re: DirectX vs XNA

Requesting Gravatar...
As you have already discovered, C++ can be a daunting learning experience, especially when you are managing your own memory. If you are starting to learn C++ now, I suggest you learn C++/CLI. This is the managed version of C++. In other words, no more pointers!

It can even be argued that you should learn C# instead, especially if you are just starting out.

Good luck to you...
Left by Bob on Feb 13, 2007 6:15 AM

# re: DirectX vs XNA

Requesting Gravatar...
DO NOT GO FOR THE C++/CLI, go for the Win32 version of C++. This is what C++ is for.

When it comes to XNA/DX, this issue you pointed out - XNA is tech frozen - a very good point there.
But think about it this way - anybody that does not have a multimullion budget will be happy to let go a few flashy features in the DX, in exchange of a double/triple speed in the actual developmental process, that the C# brings over unmanaged coding.

In short - XNA is for the low level of game programmers and studios, and it seems it is there to stay. Unless there is some extension mechanism to allow it to adopt the new DX, that is.
Left by peer2000 on Apr 13, 2007 5:25 PM

# re: DirectX vs XNA

Requesting Gravatar...
I think you should get a life!
Left by Kev on Oct 22, 2007 5:47 PM

# re: DirectX vs XNA

Requesting Gravatar...
What about the non game developer? I am interested in 2D and 3D acceleration for visualization purposes and it's also important for me to be able to nest my view port on something like a resizeable panel (ie. combined with win forms). I am more interested in things like anti-aliasing than fancy shaders. GDI+ is not hardware accelerated as far as I know; which one of these two would suit me best?
Left by Eon on Nov 16, 2007 12:38 AM

# re: DirectX vs XNA

Requesting Gravatar...
As of right now DirectX or Managed DirectX, and maybe even OpenGL would suit you best. XNA as of now doesn't support WinForms and won't support it in version two. However, later down the road I'm sure that XNA will be inside a WinForm, it's just a matter of time.
Left by Garrett Hoofman on Nov 16, 2007 9:11 AM

# re: DirectX vs XNA

Requesting Gravatar...
It is possible to combined winForms and XNA, you just need to pass in a panel handle to the XNA present call.

It is good to learn c++ directX, and in time you will like the usage of pointers. I come from a C++ bkground and have started learning C# XNA, and i find that it has a very easy learning curve, but due to that i am used to handling the deletion of memory myself, i find it all abit :S when just leaving it to the program to clean up.
Left by John Brayker on Feb 28, 2008 6:48 AM

# re: DirectX vs XNA

Requesting Gravatar...
great insight for a budding game developer.
Left by nowitwiz on Aug 28, 2008 4:13 PM

# re: DirectX vs XNA

Requesting Gravatar...
Nice jobs for wide spread discussion for game development. I appreciate it.
Left by Sazzad Ahmmed on Sep 05, 2008 7:16 PM

# re: DirectX vs XNA

Requesting Gravatar...
I start programming for C++ and OpenGL in many years. The Clean up could be a tricky if you not used with it. But its not "hard". Then i discovered C# lately, and DirectX9 and i think that is a very nicely and good combination, "relative" easy to use, DirectX9/X10 is not so horrible/hard as the DirectX5 was many years ago, things has change a bit i guess.

Now than, XNA, i could agree with Garret that its good for 2D, but im not proberly not recommended that, its not so hard to do the framework by your own or even find routines that can help you build "cool" effects up if you want.

Good luck with your missions.
Left by Betzie on Sep 15, 2008 6:03 PM

# re: DirectX vs XNA

Requesting Gravatar...
Hi :) I'm coming from a C++ background - doing it more than 15 years now. My job does not involve Games, but I decided to learn some Direct3D. I haven't done any DX10 so far, but things seem to have changed on a more fundamental level compared to DX8 and DX9. I'm wondering wether I should give XNA a try or proceed to DX10.

The idea of doing potentially time-critical stuff with CLI seems questionable to me: I simply don't believe JIT compilation will produce highly optimized code. I love C# for it's simplicity though.

So basically my vote goes for native C++ with DirectX. Laugh if you want, but it's the pointers that tip the balance for me ;)
Left by cateye on Jan 13, 2009 7:30 PM

# re: DirectX vs XNA

Requesting Gravatar...
yeah, i think xna, as an xbox tool is more acceptable for game hobbyist than commercial programmers. Just simply say: we build our game for our console. we are paid if and only if it's worthy enough and if we want to pay membership for what we have paid and we have done. I wonder if someday there will be another XNA marketplace. the only reason i learn XNA is to examine its design pattern for a better directx game programming, since i have not found a free membership marketplace for PC/XBox XNA game. I need more marketplace.
Left by byus on Feb 12, 2009 2:11 PM

# re: DirectX vs XNA

Requesting Gravatar...
This may be revisiting the same thing, but I'm still a bit lost. Is there no way to use C# with DX10?

Left by Jamie on Jun 22, 2009 9:40 PM

# re: DirectX vs XNA

Requesting Gravatar...
You can use SlimDX if you want to use DirectX 10 with C#.
Left by mmm... on Sep 12, 2009 7:00 PM

# re: DirectX vs XNA

Requesting Gravatar...
SlimDX is a great project and beginning to show "maturity" (relatively) with the March 2009 release. However, I came from a short dip into MDX/C# and no real DX/C++ and the lack of SlimDX documentation can be fustrating (DX docs can help but I find you need to know DX to make sense of them). A good book on SlimDX would be nice. I'm going to stick with SlimDX along with XNA for managed game dev.
Left by Hulker69 on Sep 17, 2009 6:29 AM

# Wanted Urgently: A book on SlimDX

Requesting Gravatar...
I left C++ after seeing how easy life can be with C# and the .NET framework. I am new to DirectX. MDX and SlimDX allow you follow the excellent simplicity of coding that makes C# stand out. Life is too short to be shooting around with pointers for memory leaks!
SlimDX is really very slim indeed when it comes to documentation, tutorials and examples. The advice that you can get the help you need from DirectX SDK is not always very helpful. For one thing, SlimDX tidies a reasonable amount of DirectX stuff in encapsulated data and obviates the necessity for pointers and unmagaged development. There are sometimes no one-to-one mapping of the SlimDX classes and structures in DirectX from the point of view of the user.
Is the user base so small that none of the experts is writing a book on SlimDX? If there is any project in this direction known to anyone, I will be grateful to be informed! A book on SlimDX is urgently needed!

Please dont advice me to go to DirectX SDK! I have half a Gig of it already!
Left by oafak on Oct 08, 2009 11:36 AM

# re: DirectX vs XNA

Requesting Gravatar...
I'm glad and appreciate how this didn't turn out to be some flame war.
This was helpful and informative.
Left by Andrew on Oct 10, 2009 3:57 PM

Your comment:

 (will show your gravatar)