Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
17 replies to this topic

#1 Thomas Wiborg   GDNet+   -  Reputation: 867

Like
0Likes
Like

Posted 28 January 2013 - 01:04 PM

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, 28 January 2013 - 01:05 PM.


Sponsor:

#2 ColinDuquesnoy   Members   -  Reputation: 1104

Like
3Likes
Like

Posted 28 January 2013 - 01:45 PM

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.



#3 cozzie   Members   -  Reputation: 1581

Like
0Likes
Like

Posted 28 January 2013 - 02:59 PM

I agree, if you want to go from scratch, start with c++ and directx/d3d11

#4 CC Ricers   Members   -  Reputation: 623

Like
1Likes
Like

Posted 28 January 2013 - 03:08 PM

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.


My development blog: Electronic Meteor

#5 Karsten_   Members   -  Reputation: 1574

Like
2Likes
Like

Posted 28 January 2013 - 06:51 PM

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.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#6 laztrezort   Members   -  Reputation: 959

Like
0Likes
Like

Posted 28 January 2013 - 07:14 PM

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.

#7 Thomas Wiborg   GDNet+   -  Reputation: 867

Like
0Likes
Like

Posted 29 January 2013 - 02:03 AM

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?

#8 Karsten_   Members   -  Reputation: 1574

Like
0Likes
Like

Posted 29 January 2013 - 04:10 AM

Allegro is about the same level as XNA (Made by the same guy infact before he went to work at MS).

Any higher level and you are starting to get into complete game engines anyway.

DarkGDK (C++ version)
Irrlicht
AngelEngine (http://code.google.com/p/angel-engine) is mostly 2D.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#9 Thomas Wiborg   GDNet+   -  Reputation: 867

Like
0Likes
Like

Posted 29 January 2013 - 04:51 AM

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.

#10 Karsten_   Members   -  Reputation: 1574

Like
0Likes
Like

Posted 29 January 2013 - 09:10 AM

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.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#11 mhagain   Crossbones+   -  Reputation: 7812

Like
1Likes
Like

Posted 29 January 2013 - 11:33 AM

...not like XNA which i heard has a dark future....

 

Just correcting this, XNA may very well be going to "deprecated" status but that doesn't mean that you have to stop using it!  The runtimes and development tools are still available (in the latter case you should grab them before MS pull the downloads) and anything you develop now will still work on all Windows PCs for the foreseeable future.  The worst that can happen is "no more updates", but it still remains a viable platform for learning on.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#12 Karsten_   Members   -  Reputation: 1574

Like
0Likes
Like

Posted 29 January 2013 - 12:57 PM

Since MonoGame has been released and is open-source, then it is likely XNA will live on long after DirectX 11 (12, 13... etc..) have long been deprecated ;)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#13 Thomas Wiborg   GDNet+   -  Reputation: 867

Like
0Likes
Like

Posted 29 January 2013 - 12:57 PM

But what about C# compared to C++11. Is it easier than previous C++ versions?

#14 mhagain   Crossbones+   -  Reputation: 7812

Like
0Likes
Like

Posted 29 January 2013 - 02:37 PM

But what about C# compared to C++11. Is it easier than previous C++ versions?

 

Using C++, even C++ 11, you are always going to encounter pointers.  Something as fundamental to game development as Locking (or Mapping) a vertex buffer will throw you from the nice safe pointer-less world into an alternate dimension where pointers and the reality of having to deal with them exists.  OK, they're not that bad, but they do require you to know about what they are, how they work, how to use them correctly, and what kind of things can go wrong (and how to identify and fix those things) when you don't use them correctly (which will happen).

 

If you were going to use C++ then I'd strongly advise that you split your learning in two - do C++ first, then do game development.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#15 Thomas Wiborg   GDNet+   -  Reputation: 867

Like
0Likes
Like

Posted 29 January 2013 - 04:56 PM

But what about C# compared to C++11. Is it easier than previous C++ versions?

 

Using C++, even C++ 11, you are always going to encounter pointers.  Something as fundamental to game development as Locking (or Mapping) a vertex buffer will throw you from the nice safe pointer-less world into an alternate dimension where pointers and the reality of having to deal with them exists.  OK, they're not that bad, but they do require you to know about what they are, how they work, how to use them correctly, and what kind of things can go wrong (and how to identify and fix those things) when you don't use them correctly (which will happen).

 

If you were going to use C++ then I'd strongly advise that you split your learning in two - do C++ first, then do game development.

 

Looks like you are skilled with programming C++.
Does it take long time to learn those pointers? And when you have learned to program C++. Is it as easy to program and make games with it, as C# XNA?

Is the develope speed slower? and incase how much?



#16 L. Spiro   Crossbones+   -  Reputation: 13226

Like
2Likes
Like

Posted 29 January 2013 - 05:45 PM

Does it take long time to learn those pointers?

Most concepts you need to know to work safely with pointers are easy to learn but hard to make routine.
The bigger problem is not so much about how hard it is to learn, but how frustrated you will be when solving pointer-related bugs during that learning period. But everything takes practice, time, and chocolate cake.

And when you have learned to program C++. Is it as easy to program and make games with it, as C# XNA?

No. The advantage of C++ is that it lets you get closer to the metal and allows you full freedom.
If you don’t know what to do with the metal then it isn’t an advantage, and if you don’t use your freedom properly you may shoot your friend’s cousin’s mother in his or her left pinky’s intermediate phalanx, meaning this is actually a negative point rather than a positive point.

Is the develope speed slower? and incase how much?

That depends on how much reusable code you have written in the past.
If you are just starting out, that would be none, and development time will increase significantly. Easily by a factor of 3 or 4.



C++ is my favorite language and I prefer it over C# and especially over Java.
But when you are starting out you have to make decisions.
If you just want to get quick results, go with C#.
If you want to make better games and are willing to wait for that privilege, learn C++.

I personally didn’t see the world as black and white when I was growing up, so I learned C# in order to get happy results in the now while learning C++ in the background for a better tomorrow.
The options being discussed in this topic are not mutually exclusive. In fact it is trivial to learn both C# and C++ in parallel as they are so similar, which makes this topic mostly a non-issue or a false dichotomy.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#17 Thomas Wiborg   GDNet+   -  Reputation: 867

Like
0Likes
Like

Posted 30 January 2013 - 10:38 AM

Its interesting to see how many different answers i get :-) Some says C++ DX others C# XNA. But when i think about it. XNA may be the one for me. I want your advice on this:
I want to make games like diablo 2, plant vs zombies etc. Is it realy something C++ DX does better on these games than XNA? Or would C++ DX only be better if im making the new battlefield 3. Which ofc is waaaay to hard and impossible for one person. Some also say that there may be an XNA for the new XBOX. And when im done making a game in XNA its easy to port with monogame to be used on android.
OR does C++ DX have benefits on diablo 2 and plant vs zombies that XNA cant handle as good?

#18 Demx   Members   -  Reputation: 299

Like
0Likes
Like

Posted 31 January 2013 - 07:37 AM

Its interesting to see how many different answers i get :-) Some says C++ DX others C# XNA. But when i think about it. XNA may be the one for me. I want your advice on this:
I want to make games like diablo 2, plant vs zombies etc. Is it realy something C++ DX does better on these games than XNA? Or would C++ DX only be better if im making the new battlefield 3. Which ofc is waaaay to hard and impossible for one person. Some also say that there may be an XNA for the new XBOX. And when im done making a game in XNA its easy to port with monogame to be used on android.
OR does C++ DX have benefits on diablo 2 and plant vs zombies that XNA cant handle as good?

I think you are over thinking lol, I think the best way is to use C++ DX to make simple 2D games as they are easy to learn this way..






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS