Sign in to follow this  
Willybood

Difference between managed directX9 and XNA

Recommended Posts

Willybood    122
Im fairly new to game programming, and was wondering (after flicking through some online tutorials and textbooks) what the difference between managed directX9 and XNA is (aside from XNA being able to output xbox 360 compatable executables)? At first glance they seem fairly similar, and I've been having trouble getting XNA running (crappy laptop :-( ). If there isn't much in it I might just go for directX9. Thanks for your help forum peoples

Share this post


Link to post
Share on other sites
remigius    1172
Basically Managed DirectX and XNA will allow you to accomplish pretty much the same things, so they do offer you similar (nearly equivalent) functionality. The main difference is that XNA is fluffed with all kinds of useful utilities, like the content pipeline, built-in fonts etc. that *may* make your life easier (sometimes they actually do tend to get in the way). This here migration guide gives you a quick rundown of the architectural differences between MDX and XNA.

On a side note, you can set the minimum required shader profiles on the graphics object in the contructor of your XNA game project. IIRC these are set to shader model 2 by default, so by lowering these settings to something your laptop supports, you might be able to get XNA stuff running on it. This is mainly useful when you're working with sprites or use simple shaders only though.

Share this post


Link to post
Share on other sites
gharen2    520
Quote:
Original post by remigius
The main difference is that XNA is fluffed with all kinds of useful utilities, like the content pipeline, built-in fonts etc. that *may* make your life easier


This isn't quite right. Direct3D has font support, so that isn't anything special about Xna. Xna isn't more fluffed out with features, it actually has fewer features than Direct3D, though the gap between them is narrowing. I wouldn't call the content pipeline an advantage either. The only reason it's there is that consoles require one. Otherwise it's a bit of a hindrance. Having to write custom content loaders and processors is a bit annoying.

Here's my rundown of Xna:

Pros:
- Revamped api that's cleaner and slightly higher level.
- Simplified graphics device management.
- Under active development.
- Can run on the Xbox 360.

Cons:
- Lack of a fixed function pipeline (some would call this a pro, but I suspect most hobbiests consider it to be annoying).
- The simpler api can sometimes actually be a hindrance.
- Less feature complete than Direct3D.
- Can't use unmanaged libraries on the 360. Personally, this is one of the biggest things that keeps me from making the switch from mdx to xna.
- Audio has to be converted to the XACT format.
- Only xbox 360 controllers are supported. You can get around this by using managed directinput in windows, but that's kind of a point in favor of mdx :P

Here's my rundown of Managed Direct3D:

Pros:
- Api that's deliberately similar to the c++ api, which allows you to use c++ documentation and makes porting c++ code trivial.
- Feature complete.

Cons:
- Api that's deliberately similar to the c++ api. Yes this is both a pro and a con, because it results in the api being a bit messy.
- Not under active development (though it hasn't been abandoned, and given how feature complete and stable it is, this isn't a huge deal).
- You have to manage the graphics device manually.

[Edited by - gharen2 on May 3, 2007 1:14:55 PM]

Share this post


Link to post
Share on other sites
Willybood    122
Wow, thats a pretty damn good answer!

I think I'll be ok with managed directX then. At the end of the day it'll look better on my CV if I decide to go for a game programming position, and means I won't need a new machine with a better graphics card for it.

Thanks forum peoples!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this