Sign in to follow this  
NathanRidley

8yr+ .Net developer interested in game programming - should I learn C++?

Recommended Posts

[color=#333333][font=Tahoma, Geneva, Arial, sans-serif][size=4][size=4]I've been writing .Net code since 2003 and so I am very comfortable with it now and have a fairly deep knowledge surrounding the .Net framework that I have built over the years, plus feel very comfortable with advanced programming concepts and programming in general.[/size]

[size=4]I want to get into some game programming, but the last C++ I wrote was at a beginner-to-intermediate level around 2001-2002. I know that there is a lot of support for game development in .Net languages these days, but I also know that there are a lot of game libraries, resources and commercial products built on or around C and C++.[/size]

[size=4]Would learning C++ at this stage be a practical endeavour for me, or would the amount of time required to become competent with C++ outweigh the productivity advantage I'd get from sticking with .Net?[/size]

[size=4]One of my considerations is that I'm concerned about the massive and growing impact Apple is having on the tech world and the general complacency Microsoft seems to have with winning consumer and developer mindshare these days, which leaves me wondering, if I were to focus my efforts on .Net technologies (particularly in view of the fact that the Mono team was recently laid off after Novell's acquisition), am I probably severely limiting my potential future audience for any games I create?[/size]

[/size][/font][/color]

Share this post


Link to post
Share on other sites
[quote name='axefrog' timestamp='1305474225' post='4811103']
[color="#333333"][font="Tahoma, Geneva, Arial, sans-serif"][size="4"][size="4"]I've been writing .Net code since 2003 and so I am very comfortable with it now and have a fairly deep knowledge surrounding the .Net framework that I have built over the years, plus feel very comfortable with advanced programming concepts and programming in general.[/size]

[size="4"]I want to get into some game programming, but the last C++ I wrote was at a beginner-to-intermediate level around 2001-2002. I know that there is a lot of support for game development in .Net languages these days, but I also know that there are a lot of game libraries, resources and commercial products built on or around C and C++.[/size]

[size="4"]Would learning C++ at this stage be a practical endeavour for me, or would the amount of time required to become competent with C++ outweigh the productivity advantage I'd get from sticking with .Net?[/size]

[size="4"]One of my considerations is that I'm concerned about the massive and growing impact Apple is having on the tech world and the general complacency Microsoft seems to have with winning consumer and developer mindshare these days, which leaves me wondering, if I were to focus my efforts on .Net technologies (particularly in view of the fact that the Mono team was recently laid off after Novell's acquisition), am I probably severely limiting my potential future audience for any games I create?[/size]

[/size][/font][/color]
[/quote]


With 8 years of C# experience, picking up C or C++ would be a relatively trivial task. Many of the concepts are the same. Syntax wise, and even thought process wise, I can switch back and forth between C# and C++ with relative ease. That said, when I do my productivity is absolutely smashed and it has very little to do with missing language features or memory management... it's the standard libraries. It's like teleporting back in time to 1990. That said, some of those missing language features are damned handy and are missed! :D



So, frankly no, it should take you minimal effort to "learn" C++ and yes, you will see a massive drop in productivity, C# ( and even Java ) are simply more productive languages. As to trends in the industry, it really all depends on your goal. Trying to create a viable game? C# is easily viable enough to create a good game, perhaps even an AAA game. Trying to get a job in the industry... well yeah, they still look for C++ programmers, so it would be a worthwhile skill.

As to worrying about Microsoft's complacency in the development world, that is misplaced, they are easily the leader in development tools and are advancing at a steady rate. Windows 7 is selling like hotcakes, their developer tools are getting better every day, their development community has become much more agile and responsive and quite frankly, from a developer perspective they are advancing the industry at a rate wayyyyyyyyy faster than any other company.

Apple on the other hand makes damned good devices. From a developer perspective, they move at a glacial pace and given the way they often treat their developers, don't expect them ever to be more than a niche player. Fortunately they overturned that stupid rule against non-Apple languages, so there are viable alternatives.

As to the death of the Mono team, nothing has been confirmed so far as I know, and that announcement was 2 weeks ago. Regardless, it's an open source project so it will be hurt for loosing its patron, but it will live on.

Share this post


Link to post
Share on other sites
Learning C++ when you comes from C# is just dropping a few concepts and learn to manage the memory efficiently. As Serapth said, switching from a language to another is trivial matter, especially for a programmer with 8years of experience you should be able to grab any C++/Java/whatever code and understand most of it right away since most concepts are the same.

It always comes down to what exactly do you want to do. "Game programming" is large. You want to make a game? Get a game engine and learn to use it, whatever language it use it shouldn't matter, as long as it support the features you want. You want to create a game engine and/or you want to learn 3d programming? The theory of 3D graphics is where you should put your efforts at, it's abstract mathematics and have nothing to do with the language. Whether you use OpenGL/DirectX or XNA, it's not initialising the library using a language or another that's hard, but actually using it correctly.

Share this post


Link to post
Share on other sites
[quote name='Dunge' timestamp='1305477659' post='4811124']
Learning C++ when you comes from C# is just dropping a few concepts and learn to manage the memory efficiently.
[/quote]

This is patently false. To use C++ effectively if you're coming from a .NET world also involves learning much of the undefined behavior, best practices regarding it's retarded compilation model, adapting to work with horrific compiler infrastructure, and learning the standard library (and hunting down some framework to provide all the things you'd expect a standard library to provide, but C++'s doesn't).

For the OP:

If all you know well is C#, it's an entirely practical endeavor to learn another language. If your goal is just to make a game (which is a good goal, since making a game; any game... is hard) then C# is a better option than C++ given what you've said. Will using C# restrict where it can run? Certainly. But let's be honest here, your first game isn't going to be any sort of profitable venture. The skills learned about tying different parts of the game together, designing it, tweaking the pacing/rules, handling graphics will all apply regardless of language used. If you're realistically looking to get into professional gamedev in the next 4-6 years, use C++. If you're looking to make games for the web or mobile, don't use C#. Until then, use what you know so you can ignore the environment and focus on the game. It's hard enough without you adding complexity.

Share this post


Link to post
Share on other sites
[quote name='Telastyn' timestamp='1305487595' post='4811184']
[quote name='Dunge' timestamp='1305477659' post='4811124']
Learning C++ when you comes from C# is just dropping a few concepts and learn to manage the memory efficiently.
[/quote]

This is patently false.
[/quote]

I couldn't agree more. In my professional experience, C# programmers tend to approach C++ by making C++ do things the way C# does. I realize that's a broad statement but it in no way discredits the value in learning C++ (or C even). Learning a new language can, or at least should, be a fun learning experience.

To OP: I would suggest doing both, but separately. If you learn C++ by making a game, you'll probably be more excited about making the game work rather than writing correct C++ code. Hell, I know I would. And, if you start running into stumbling blocks you may just get frustrated in the process and blame C++ :) Kidding, but only slightly. Make the game with C# and .NET and it will go very quickly for you and you'll have more fun with that process as well. After you have a little more knowledge in each of the separate processes you can give it a go combining them.

Share this post


Link to post
Share on other sites
What do you want to do? Learn a new language or make a game quick?

XNA is the coolest thing since sliced bread. If you already know C# I don't know why you would want to switch away from C#/XNA unless you're really interested in learning C++ for a specific reason (ie a specific tool or API you want to use).

Share this post


Link to post
Share on other sites
[quote name='Steno' timestamp='1305603882' post='4811762']
I couldn't agree more. In my professional experience, C# programmers tend to approach C++ by making C++ do things the way C# does. I realize that's a broad statement but it in no way discredits the value in learning C++ (or C even). Learning a new language can, or at least should, be a fun learning experience.
[/quote]

Yes, this.

The reverse is also true; C++ programmers try to treat C# as a 'safe C++' and write bad C# code.

If you jump languages then you should learn the correct way of coding in that language.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this