Jump to content
  • Advertisement
Sign in to follow this  
jon211

Which direction to go in? DirectX vs XNA

This topic is 3716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK, I'm looking at getting started with a bit of game development and would like some advice about which direction to go. I have a background as a professional C# developer (though just boring enterprise apps at the moment!) and have a degree in mathematical physics so hopefully I've got the right attributes to get involved in the gaming world. Anyway, I'm undecided about whether to use C# and XNA to get up to speed, or try my hand at C++ and DirectX. Obviously with the C# route I wouldn't have to learn the language at all, just the XNA framework. I have a little C++ experience, but I'm nowhere near as fluent as I am with C# so there would be the language learning curve, plus I imagine DirectX is more complex than XNA too. What are the advantages of going down the DirectX route? Would there be any real benefit to this or should I stick to XNA? I should point out that I have no real desire to become a professional game developer, just doing this from a hobbyist point of view really.

Share this post


Link to post
Share on other sites
Advertisement
I do c++ directX, and there is a lot you need to think about that you can ignore in c# (i just found out that XNA has it's own resource manager built in behind the scenes, too. How awesome is that, no worrying about multiply loading textures) Unless you want to go platform independant, and if you only want to keep it a hobby, then AFAIK there is no reason for you to learn c++/anything (which would need to be OpenGL of course), XNA will let you do everything you want to in a third of the time, with a quarter of the learning curve, I guess, given you are already familiar with c#.

Share this post


Link to post
Share on other sites
From the sounds of things, you'll be much happier with XNA. You get to use all the same .NET code you're used to using and have a simplified starting point. XNA is capable of all the fancy 3D effects (if that's your sort of thing) and helps out where you don't want to spend all your time (managing the game loop and graphics device). It lets you easily and quickly make games which is pretty much everything you want if you're a hobbyist. Most hobbyist games never hit that 100% CPU utilization so any speed differences between C# and C++ are basically irrelevant.

Check out creators.xna.com. There are XNA-centric forums, starter kits, samples, and tutorials. Should get you up and running fairly quickly with it.

Share this post


Link to post
Share on other sites
Since you are good at C# i dont see a reason to swich that to learn c++.

XNA is decent, but its made for XBox/Windows cross compability, so if you want to have access to newest technologi like DirectX10, you shoudnt use it.

SlimDX is also a way to go, it supports DX9, DX10, and more or less every single DirectX lib (D3D, DX Sound, DX Mouse ect ect).

Tho you wont get the "fancy" content loader and so forth in XNA.

SlimDX documentation is kinda sparse, but as some people stated in other posts, if you skim the surface of the C++ DirectX SDK code samples, you will get an idea about how to use it, since its very similar.

I guess in the end its up to how much time you are willing to invest in it.

Share this post


Link to post
Share on other sites
Yup this a no-brainer IMO.
I forgot where I heard this but I agree that "you are most productive in the language you are most familiar with".
So in your case this would be C# and XNA and C# is a match made in heaven-LOL!
XNA is a wrapper around directx so you are going down the directx route. If you meant the C++/DirectX combo the advantages for that would be access to the latest and greatest and the only one that really stands out at this point is SM4.0 and DirectX 10 stuff. If you download the latest DirectX SDK all the DirectX 10 samples use C++ so if you planning on using that better get started on learning C++ first!
IMO you'll by fine as a hobbyist with C#/XNA and I've even seen some professional looking games using it aka Nitchske book.
The only other reason you might want to go with C++, as I have, is that you have a ton of game programming books that all use C/C++. When I first started with XNA there were few books and I actually used my older managed dx books at first but now they are coming out with quite a bit of XNA books so that shouldn't be such a big issue anymore.
I plan on switching back to C#/XNA in the near future after I finish working through my C++ books and am comfortable enough with C++ and C# to port my existing C/C++ games to C#/XNA.
I should probably already giveup since it's taking way longer than expected but it's kinda hard when you've already invested a bit of time and money in my case:(


p.s. One of the caveats with current version of XNA though is that you need to use VS 2005 since 2008 isn't supported yet.

[Edited by - daviangel on June 14, 2008 3:19:37 AM]

Share this post


Link to post
Share on other sites
Thanks for all the replies, you've pretty much confirmed what I was assuming - that XNA will be fine for what I want to do.

I've just downloaded XNA Game Studio 2.0 and having a look at the standard Spacewar project it seems reasonably straightforward.
Hopefully I'll have something I can share here before too long!

Share this post


Link to post
Share on other sites
best of luck, one thing the guys didn't mention is that going to an unmanaged language especially coming from a managed background isn't the easiest thing.

think of c# as a paintball gun, even if you manage to shoot yourself its stings a bit, c++ is more like a old rusty 12gauge, quite easy to hurt yourself with and if you do its gonna hurt.

:)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!