Question on C#/C++

Started by
6 comments, last by daviangel 17 years, 4 months ago
I'm currently learning Java for AP Computer Science class. However, I also want to learn another language at the same time. I began on C#. Pretty simple to start with. However, I want to learn a language that would be more geared towards games. For example, 2D side scrolling platformers/shooters. Y'know. Is C# really a wise choice for things like those? Or should I check out C++ instead? I'm leaning towards C++, but I wanted to hear some opinions on this. Any help is appreciated.
Advertisement
http://msdn.microsoft.com/directx/XNA/default.aspx
Quote:Original post by Lucky Ace Card
I'm currently learning Java for AP Computer Science class.
However, I also want to learn another language at the same time.
I began on C#. Pretty simple to start with. However, I want to learn a language that would be more geared towards games. For example, 2D side scrolling platformers/shooters. Y'know.

Is C# really a wise choice for things like those? Or should I check out C++ instead? I'm leaning towards C++, but I wanted to hear some opinions on this.

Any help is appreciated.
Quote:Original post by SnprBoB86
http://msdn.microsoft.com/directx/XNA/default.aspx

What is your desired use to create games? Do you intend to do it professionally in the future? One problem with XNA besides the fact that it is not yet fully refined is that it locks you into one platform (.NET). The C# language would also lock you into one platform. For the game development industry this is a problem when trying to maximize your profits.

This could change in the future, how far into the future is still unknown. Currently C++ still is the primary language for professional game development. I recently started a thread asking how relevant is XNA in the professional industry basically.

So to put it shortly, yes XNA can be used to make games. Currently it will mostly be utilized by indie developers. For AAAA titles and the likewise it may prove to be less useful. The main reason for this is it cannot currently compile to native code. So what is your primary purpose; do you intend to be a professional game programmer or a hobbyist?
Quote:Original post by DevLiquidKnight
The C# language would also lock you into one platform. For the game development industry this is a problem when trying to maximize your profits.


It may lock you into one console (360), but not one platform. Theres atleast one OpenGL wrapper for C# which can be compiled perfectly fine using Mono(That means Linux and possibly Mac support).

That aside, knowing C++ AND C# would be the best option, eh?

I'm not really questioning you (DevLiquidKnight), but do you really think he'll be making the next Doom game? Or a AAA game at all? If what he says is true, he's barely learning how to program, he's learning Java at he same time as whatever else he chooses.

Quote:
The C# language would also lock you into one platform.


Not really true, there's mono which is a cross platform implementation of the .Net framework. And so you could use something like SDL.Net.

Learning C# is probably the only language I can think of that would be easy learning at the same time as Java, seeing as they're pretty similar. C/C++ is also possible to learn, but would probably confuse him. And he might get into a situation I did for a long time; which is, always ask questions, think about what to use/do, but never actually do anything.

Luck Ace Card, C++ would definately be useful to you in the future, but I believe we've reached the point where it's not really necessary for everything. Choose whichever you like, if you think C++ is too tricky/difficult at the moment (I think it will be, if you're barely learning how to program, plus, both languages at the same time might confuse you).

Also, it's not all about being cross-platform. You have to learn how to use various technologies at the right time. If you were really all on about being cross platform, you could use C# with SDL.Net and Gtk# for your GUIs, you can also do OpenGL in C# using the Tao Framework. But I just wanted to mention that if Lucky Ace Card really is barely learning to program, I doubt making his programs cross platform would be high on his list, if at all. I don't know why many people worry about this. Plus, another thing to acknowledge is the fact that choosing C# doesn't mean you wont be able to learn C++, or vice versa. So even if you do select C# and XNA/MDX and are 'tied' down to one platform, you can still learn C++ later (Although when you get to that point, you'd already know how to even make your C# programs/games cross platform).
Knowing both is fine, just depends on what they want to start with. I know Mono does work on other platforms I have made a few applications that use that but it does have a few rough edges. If it didn't have rough edges it would be as good as Java in terms of compatibility which it is not. So it depends on what the purpose of there development is still.

Going from Java to C++ is a quite a hard challenge. It may very well prove to be very useful though. I will agree that C# would be a much easier path to take, especially coming from a Java standpoint. The reason C++ is being pushed more in this instance is because depending on various factors C++ may prove to be more valuable. If you goal is to make hobbyist games then by all means go with C#.
Quote:Original post by Lucky Ace Card
However, I want to learn a language that would be more geared towards games. For example, 2D side scrolling platformers/shooters. Y'know.

You can make games in any of the three languages you mentioned.

If you deicide on Java, there's several libraries that you can use to display graphics, like JOGL (Java OpenGL Binging), LWJGL (Lightweight Java Gaming Library), or one of the following scenegraph engines: Java3D, JMonkeyEngine, Xith3D.

If you have never programmed before, I would not recommend an unmanaged language like C++. Go with Java or C#.
I don't know if learning 2 languages at once is a good idea?
On one hand if you choose C# it should be a nobrainer since C#/Java are like 90% similar in syntax,etc. so you should pick it up quick.
On the downside you will probably easily get mixed up since both languages are so similar that you'll be wasting time fixing dumb mistakes you could be spending actually learning single language inside/out until it's second nature.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

This topic is closed to new replies.

Advertisement