Jump to content
  • Advertisement
Sign in to follow this  
Aspirer

Stick with C++ or venture into C#?

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

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.

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by Karsten_

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

 


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

Edited by mdias

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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++

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!