Jump to content
  • Advertisement
Sign in to follow this  
Thomas Wiborg

What to choose C++/DX or C#/XNA

This topic is 1992 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

Hello,

To give some info on what i would like to do i could start out with following:
- I want a language and a API which i could continue with for quite some time, not like XNA which i heard has a dark future.
- I would like to create an RPG game similar to Diablo 2, but ofc not as huge. I would also like to create games like Plant vs Zombies, Mario etc
- I will use ALOT of time to become as good as I can get, so therefor i realy want to program in a language which i can keep on for a LONG time. And ive seen most of people on GameDev uses C++, so for me it looks like its pretty good.

Some questions.
- How hard is C++(11) compared to C#? It should also been said that im done with my computer science degree so I have been programming in both C++ and C#. Ive heard C++ 11 is alot easier than previous versions?

In XNA we can add audio, is that possible in DX?

Would it take alot more time to create games in DX compared to XNA?
And is it possible to port DX game to Android?


Best Regards

Thomas Edited by Thomas Wiborg

Share this post


Link to post
Share on other sites
Advertisement

Android (and iOS as well) doesn't support DirectX but OpenGL ES.

 

If you want to focus on creating a game you should use an existing engine such as Unity (you can program your game using C# too). If you want to learn more than "just" creating a game (that is already a big enough task imho) you can start using c++ and directx and create your own engine but that will take a lot more time.

Share this post


Link to post
Share on other sites

I've used C++ from 2005 to 2011, then moved mainly to XNA. C# for me is a big timesaver and makes you more productive. 

 

XNA is far easier to get working on a game, without dealing with much of the lower-level work of initializing devices, managing vertex buffers, etc. Each iteration of XNA seems to have pared down the complexity of writing code needed to do a given task, it seems to have gotten less verbose with each new version. Now I know that it does appear to become a dead end technology, but it is perfectly capable of producing very competent games such as the ones you described. If you don't want to learn all the underpinnings of the DX API, go with XNA.


Some frameworks allow easier porting for many kinds of XNA games to other platforms, like MonoGame.

 

There is also a library that some of the XNA devs have been working on to make transition from XNA to DX11/C++ easier, called DirectX TK.

Share this post


Link to post
Share on other sites

C# for me is a big timesaver and makes you more productive
XNA is far easier to get working on a game, without dealing with much of the lower-level work of initializing devices, managing vertex buffers, etc.

Just because you use C++ doesn't mean that you do have to do lower level work. There are loads of C++ libraries and engines out there that are higher level than XNA.

Pick the language you prefer and pick the library you feel most comfortable with. Perhaps only use DirectX or OpenGL (With either C# or C++) if you want to go into the technical stuff.

Share this post


Link to post
Share on other sites
Just to throw another option out, you can check out SharpDX, which is a .NET wrapper for DirectX (including audio IIRC). It is a thin wrapper around DX, so it is low-level, but you can use it from C# if you do not wish to move to C++. I believe it now also includes a port of the DirectX TK, offering some XNA-like higher level functionality.

Share this post


Link to post
Share on other sites

C# for me is a big timesaver and makes you more productiveXNA is far easier to get working on a game, without dealing with much of the lower-level work of initializing devices, managing vertex buffers, etc.

Just because you use C++ doesn't mean that you do have to do lower level work. There are loads of C++ libraries and engines out there that are higher level than XNA.Pick the language you prefer and pick the library you feel most comfortable with. Perhaps only use DirectX or OpenGL (With either C# or C++) if you want to go into the technical stuff.

What library is higher level than XNA?

Share this post


Link to post
Share on other sites
Is learning dx11 c++ alot harder to learn than xna c#?
Cause i see most people here use c++
And are there some benefits without memory managment with c++ and dx that give me an advantage instead of using xna. And as i said. I want to make games as diablo 2 smaller scale and plant vs zombies.

Share this post


Link to post
Share on other sites

Is learning dx11 c++ alot harder to learn than xna c#?

Learning DX is harder than XNA because it is much lower level.

I prefer C++ but there are many on these forums that prefer C#. Commercial software generally favours C++ but the indie games industry is a large mix of different languages.

Both C++ and C# have solutions to memory management if coded correctly so that shouldn't really be a deciding factor.

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!