Sign in to follow this  
maennj

XNA or DirectX ?

Recommended Posts

Hello all Guys, I'm intending to start game programming and want to start learning But I'm wondering what should I learn XNA or DirectX.. I mean is XNA enough to develop a professional games or I should learn DirectX ?

Share this post


Link to post
Share on other sites
I would certainly recommend a managed approach with XNA, because it will be much easier for you to learn. Many things have been simplified, and some of the quirks of DirectX have been fixed up.

XNA is built upon DirectX, so it is more like choosing between low-level DirectX and a more high-level wrapper. It's your call, but XNA will be much easier for you to learn.

One thing you will have to consider however, is the language in which you will be developing. If you only know C++, DirectX or even OpenGL would be a better choice than XNA. If you know C#, or want to learn it, than XNA or MDX would be appropriate for you.

Share this post


Link to post
Share on other sites
I have a thread in the DirectX forum asking almost the same question. I'd suggest taking a peek at the replied I had recieved.

I am, however, a little curious as to understanding the differences between MDX and plain DirectX. MDX I understand to be a wrapper of sorts for the .Net framework, but is it a requirement for .Net if you wish to use DirectX9?

Share this post


Link to post
Share on other sites
Quote:
I am, however, a little curious as to understanding the differences between MDX and plain DirectX. MDX I understand to be a wrapper of sorts for the .Net framework, but is it a requirement for .Net if you wish to use DirectX9?


You have a few different routes when using DirectX from a managed language:

1. Use MDX version 1, which is basically a managed wrapper around DirectX. It doesn't provide any extra functionaly really, so if you use DirectX in C++ and then use MDX in C#, for example, you will notice that the experience is almost identical. There was an MDX version 2, which was an effort by Microsoft to add more functionality not found in unmanaged DirectX, but this was deprecated and renamed XNA.

2. Use XNA, which is more like a high level engine built over MDX. It is more like a game engine over MDX, with more features and simpler interface.

3. You could always import the DirectX functions yourself using P/Invoke, but in the end after you did all that work you would basically end up with MDX anyways, so there is really no point in taking this method.

Share this post


Link to post
Share on other sites
I refer you to this thread in the DirectX forum

The search option is your friend :)

Quote:
Original post by ussnewjersey4
2. Use XNA, which is more like a high level engine built over MDX. It is more like a game engine over MDX, with more features and simpler interface.


Xna isn't a high level engine in any shape or form. It's only higher level than mdx in one respect: simpler graphics device management. Otherwise, it's just as low level as mdx (maybe even more so, since you have to use shaders for things that mdx would do for you automatically). Xna does have a simpler api, but it does NOT have more features. It actually has fewer, and will for some time.

Quote:
Original post by Mythics
I am, however, a little curious as to understanding the differences between MDX and plain DirectX. MDX I understand to be a wrapper of sorts for the .Net framework, but is it a requirement for .Net if you wish to use DirectX9?


DirectX9 is native c++ and does not require the .net framework.

As you said, managed directx is a thin wrapper around directx that allows you to use it from the .net languages. Xna also wraps directx9, but has a cleaner, revamped api, while managed directx tries to stay close to the c++ api.

Share this post


Link to post
Share on other sites
thanks all for information.
one more question, where does XNA really go ?
I mean after years of experience with XNA, will I ever create games with high graphics and performance using XNA and C#.. or if I wanted to work with company is my experience in XNA enough or I have to learn DirectX with C++ in the end ?
I don't know but I feel programming a game in C# doesn't feel right.. is it really good for game programming ?
last question, will I face issues in XNA that will force to move to DX ? if yes, is it easy to move to DX or I have to learn from zero ?


Regards

Share this post


Link to post
Share on other sites
Quote:
Original post by maennj
thanks all for information.
one more question, where does XNA really go ?
I mean after years of experience with XNA, will I ever create games with high graphics and performance using XNA and C#.. or if I wanted to work with company is my experience in XNA enough or I have to learn DirectX with C++ in the end ?
I don't know but I feel programming a game in C# doesn't feel right.. is it really good for game programming ?
This past GDC, the first commercial game using XNA was announced - it's an Xbox Live Arcade title. I can't remember the name of it off the top of my head, something like Torpex?

In the long run, you'll probably find yourself in a situation where XNA isn't suitable (e.g. non-Microsoft platforms like the Playstation), but don't worry about that situation now. You can learn other technologies when you have to. For now, XNA opens up a very large range of games for you to create.

Quote:
last question, will I face issues in XNA that will force to move to DX ? if yes, is it easy to move to DX or I have to learn from zero ?
It's fairly easy to move to DirectX from XNA. You certainly won't have to learn from scratch - even if the names for some things are different, it's all going to the same graphics card at the end of the day, so the core concepts are the same.

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