DX9 vs XNA

Started by
10 comments, last by remigius 17 years ago
I've done enough research to know that I'd personally prefer DirectX9 in comparison to 10 at the moment, but I'm still a little curious about XNA. I've watched a few videos, seen the slide shows Microsoft offers, and read a little bit of user input.. but I thought I'd go ahead and directly ask the community here in hopes of an individual that's used DirectX and XNA both and prefers one to the other. So, anyone in deep enough with XNA (with a DirectX background) to say they love it or hate it? I'm learning C# pretty quick and hope to start putting it to actual use in a week or so, and although I've seen a little of DirectX8, I was just wanting to get a better user standpoint on XNA vs DX9 where-as just reading about it on Microsoft's website makes me think it's getting pretty glazed over with a VERY thick layer of icing. Either that, or reading Microsoft's information is glazing me over a little.
Advertisement
XNA is a .Net wrapper over DX9. Managed DirectX is also a similar .Net DX9 wrapper, but it uses .Net 1.1 syntax instead of 2.0 like XNA. XNA also has the Content Pipeline and will work on Windows and XBOX 360, where MDX only works under Windows.

I know you didn't ask about MDX, but I thought I'd throw it in there(it doesn't get enough love these days). Seems I might be the only person that doesn't use Visual C# Express and prefers MDX.
Quote:Original post by Scet
XNA is a .Net wrapper over DX9. Managed DirectX is also a similar .Net DX9 wrapper, but it uses .Net 1.1 syntax instead of 2.0 like XNA. XNA also has the Content Pipeline and will work on Windows and XBOX 360, where MDX only works under Windows.

I know you didn't ask about MDX, but I thought I'd throw it in there(it doesn't get enough love these days). Seems I might be the only person that doesn't use Visual C# Express and prefers MDX.


Just getting into .Net, what's the difference between 1.1 and 2.0?

Also, your description kinda leads me to think XNA would be the better... yet you say you prefer MDX?

What do you use? VB.Net?

Edit:
I just looked a little deeper into the content pipeline within XNA and.. well, I'm being pushed pretty hard into XNA. Going C# of course gives me that option, and it looks like a pretty good one to me.
There are lots of differences between .net 1.1 and 2.0, but for most users, the most important one is the introduction of generics in 2.0. They're .net's equivalant to c++ templates, and are a joy to use. I believe 2.0 had a performance boost too. VB.net 2.0 also had a lot of much needed improvements to the language. Overall, you definately want to use 2.0.

Xna is a very nice API, but it has cons. One is that it has no fixed function pipeline. Meaning that a lot of things that are done automatically in direct3d9 must be done by you in a shader. That can be a pain in the butt, and daunting to a new programmer.

Xna isn't as feature complete as managed directx either, though it's going to get there. It's missing video playback, 3D audio (which will be in the next xna release), networking, and one or two other things I can't think of at the moment.

I'm with Scet. For me personally, if I didn't care about the xbox, and just wanted to develop for windows, I'd stick to managed directx, hands down. It's feature complete, fast, and it's api is very similar to the c++ api, so it's easy to find lots of usable directx sample code.

VB.net is only slightly less powerfull than c#, and is a perfectly viable route for game development. You just won't be able to port to the xbox (the likelyhood of xna ever supporting vb.net doesn't sound promising).

Keep in mind that you can use opengl from .net languages too.

[Edited by - gharen2 on April 6, 2007 9:32:15 PM]
Comparing the XNA Framework with DX9 is pretty difficult, heck comparing the XNA Framework to MDX 1.1 can be pretty difficult [smile]

Quite simply, the XNA Framework is not DX9, it does have D3D9 under the hood sure, but the rest of those X parts of DX9 in general are pretty much not there or changed so much it can really be said to be apples and oranges.

I come from a DX9 background, both native with C++ and managed with C# and MDX 1.1 (which as Scet rightly pointed out, doesn't get enough love these days as it still rocks) and I really do love the XNA Framework ...most of the time [wink]

It is rarely plain sailing though and a lot of the things I take for granted being in DX9 are sometimes missing as the XNA Framework is still very young. I was seriously almost ready to completely stop using it when I found out occlusion queries weren't in it yet (...hopefully "yet" cause there has still been no word on these) [lol]

Despite this love/hate relationship I have with the XNA Framework, it has a lot of cool parts to it that can make it really enjoyable to work with, and the parts to it that are done are done really well (it is a lot better designed than MDX 1.1).

I still love DX9 and MDX 1.1 though [smile]

Regards,
ViLiO
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
Why would you prefer DX9 over 10? The only reason I can see is that no one is able to use 10, which is a pretty good reason I suppose. If I had a DX10 capable card and was just working on side projects, I'd definately be making DX10 apps.

I'm using both MDX and Xna at the moment for various things, and I don't really like Xna too much at the moment in comparison to MDX. First of all, if you're experienced in DX and managed programming, MDX comes naturally. I find Xna too complex for new users and too simplified for more experienced users - not a good place to be in. For example, a lot of handy utility functions I took for granted in D3DX don't seem to be around. Data types are a little different too. DX has a nice ColorValue struct with floating point components. What happened to it in Xna?

I'd really like to put things on the Xbox360 though, I just need to get one first.
The most interesting point of XNA imho is that it's being ported to mono, which means Linux (and hopefully other consoles as well). Never heard of anyone trying to port DirectX.

I've never tried XNA, but judging by their migration guide, they've removed and changed some things that just should've been left alone (fixed function for example).
Quote:Original post by stanlo
Why would you prefer DX9 over 10? The only reason I can see is that no one is able to use 10, which is a pretty good reason I suppose. If I had a DX10 capable card and was just working on side projects, I'd definately be making DX10 apps.

I think that for a lot of hobbyists, dx9 would still be favorable over dx10 because it has a fixed function pipeline.


Once dx10 hardware is found in most homes (in a couple years I bet), dx10 will definately be favored by commercial developers. But even then, I bet a lot of hobbyists will use dx9, because it has a fixed function pipeline, and full exploitation of the advantages of dx10 requires a high level of knowledge and skill. And Vista does support dx9 alongside 10 after all.

Quote:Original post by DvDmanDT
The most interesting point of XNA imho is that it's being ported to mono, which means Linux (and hopefully other consoles as well). Never heard of anyone trying to port DirectX.


I've been following mono.xna, and they're doing good work. I do feel that porting 2D sprite xna games to linux and osx will be trivial, and I believe they're well on their way to accomplishing that. However, making the 3D stuff portable will be very unfun, due to the differences between opengl and d3d, and because d3d shaders aren't guarenteed to work in opengl, even if you use cg. They seem to be a pretty professional bunch though, so I'm sure they'll pull something off.

But whatever they do, for a 3D xna game to be portable, it'll have to be designed from the start to meet hatever design requirements mono.xna has. Making an existing 3D game run on mono.xna will probably require a lot of ugly hacks.

I suspect many people will still prefer to use opengl to create crossplatform 3D games.

[Edited by - gharen2 on April 6, 2007 9:52:15 PM]
Quote:Original post by stanlo
Why would you prefer DX9 over 10? The only reason I can see is that no one is able to use 10, which is a pretty good reason I suppose.


I've just always been of the nature that if it's just under the top of the line, it's most likely safer than the top of the line itself. Vista for example, I'll be giving it another year probably before I even bother with it at all. Too few companies will be using it widespread for a long while, especially the one I currently work for.

Besides that, yeah.. My hardware is semi-decent, but not anything like what DX10 needs/can utilize.
One thing to keep in mind is that XNA is not just an API like DirectX9 and Direct3D10 rather XNA is an entire framework for making games. Think MFC. Also if you are a hobbiest or an indie and want to make Xbox 360 games then XNA is the only way to go short of shelling out for an XBox dev kit.
http://www.dhpoware.com

This topic is closed to new replies.

Advertisement