Advertisement

Stick with C++ or venture into C#?

Started by September 08, 2013 04:48 PM
19 comments, last by Aspirer 11 years, 5 months ago

I don't mean this to come off like the typical "What's the best language to create a game" question, so bare with me please.

I know a lot more about C++ than C#, I've created an installer/updater with C++, so I think I can call myself at least a novice in it's use. C#, I've really only used in the classroom.

Now, my question is for the purposes of starting off on developing games, would I be better served by sticking with C++, something I know more about and is considered the "omnipotent" language by most, or switch to C#, something more modern, less touchy, etc.? Does C# have enough resources/support to warrant trying to pick up a second language this early in the game, or would I be better served just sticking with what I know more about and tackling the steeper learning curve? Any comments on tools/libraries, etc. available to each would also be appreciated.

I know there's no definitive answer to this, just looking for some opinions from people who may have been down this road before.

I personally have a lot less aggravation using C# than C++. Games are hard (and frustrating) enough that adding to that is unwise.

Advertisement

Well C# is much much faster the develop than C++ (especially the compilation time) and provide better warning/error messages and provides tools like LinQ to do quick container manipulation that I miss in C++. On the other hand, you can't use every libraries in C#. If you plan to interface directly with DirectX/OpenGL or other C++ libraries you can't except by using wrappers like SharpDX and such. C# code is also easier to hack and disassemble unless you obfuscate it.

I am a fairly advanced C++ programmer, and recently picked up basic/intermediary C# by using it (through Mono) as a scripting language for my engine through the means of an API much like Unity3D's.

I have found that for high-level algorithms (game logic etc) C# really helped boost the development speed.

I'd say it really depends on what you're about to develop. C# does have enough resources online to help you make just about anything you want. However, sometimes you'll find bindings for libraries (originally for C/C++) that can be outdated, and that could be a problem. If you plan on developing a big application/game you should really plan it well and make sure you'll have everything (libraries and so on) updated and at your disposal.

Without a concrete example on what you plan to develop, it's hard to give a better advice.

A typical programmer will certainly need to know a few languages so it is always worth improving your knowledge of a language. I guess just try to avoid falling into the trap of always flittering between different languages and never specializing in any.

I only ever choose to use C++ (and it has paid off since I like to think I am pretty good at it now ;). However I still need to know C# so I can understand example algorithms that are written using it. I also need to know C# so I can implement glue code between Microsoft technologies.

For example, I also needed to know enough Java so I could kickstart my native C++ game on Android. I also needed to know enough Objective-C to kickstart the same game on iOS.

Programming languages are like cars. Once they crash and burn, you need to be able to move onto something else in order to get to your destination.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

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


Without a concrete example on what you plan to develop, it's hard to give a better advice.

Well for now, I'm going to just be running through the standard "Learn to make games" line-up. Pong, snake, pac-man, mario, etc. which I'm assuming would be done just as easily with either language. I would mainly be focused on Windows platform, but would eventually like to go into mobile gaming for both Android and iOS.

Advertisement


Without a concrete example on what you plan to develop, it's hard to give a better advice.

Well for now, I'm going to just be running through the standard "Learn to make games" line-up. Pong, snake, pac-man, mario, etc. which I'm assuming would be done just as easily with either language. I would mainly be focused on Windows platform, but would eventually like to go into mobile gaming for both Android and iOS.

Since you're starting with smallish game projects, I'd say you should jump into C# since those will be the perfect candidates to learn the language.

It appears that MonoGame would be everything you need to get those done for the platforms you're aiming for.

Edit: I just noticed that depending on your needs, developing for certain platforms using MonoGame might not be free.

Don't overthink the decision to choose a language. The important thing about programming is not the language or syntax, but how well you implement the algorithms needed to solve your problems, and that knowledge will be reusable in just about any language you may choose for game making.

Good luck smile.png

Considering the amount of request for C# programmers around here, I'm inclined to suggest you to learn C#.

Previously "Krohm"

It's not an either-or situation. If you have a good primary language, then pick up other languages that interest you. It can't hurt, and it can certainly help, since you're expanding the number of tools available to you.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Well you could support other os with c# through Mono, but I doubt this to be a good solution. Well that was my main reason (among many others) to use C++

This topic is closed to new replies.

Advertisement