Jump to content
  • Advertisement
Sign in to follow this  
Dave FF

C++ or C# for learning game programming?

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

Hi everybody, I'm a total newbie starting to learn about programming, and I would like to learn to write simple games for the Windows O/S. I read some of the FAQ articles for beginners and saw a lot of discussion about C/C++ as a good language for games. But there was no mention of C#. (Maybe those FAQ articles are dated.) My question: What about C# as a starting language to learn about programming and games? What are its pros and cons compared to C++? Would appreciated any comments or suggestions. Thanks. Dave

Share this post


Link to post
Share on other sites
Advertisement
I liked C# since it allowed me to focus on the game theory stuff and less on worrying about the actual code. The biggest con when i started a couple years ago was the lack of books but now there are plenty and some good websites that focus on managed code too. Managed DirectX 9 Quick Start by Tom Miller was my favourite.

Share this post


Link to post
Share on other sites
C# is more abstract, and thus will be easier to learn with. While the industry is CURRENTLY using C++, there is no reason to worry. After you get the hang of C# you can always go and learn C++ as well.

Share this post


Link to post
Share on other sites
Actually since all you're doing is starting out and making "little" games then C# has virtually no disadvantages to C++. So yeah, go ahead and use C#.

Share this post


Link to post
Share on other sites
C# is a much cleaner and more intuitively consistent language than C++. While C++ has a long and (sort of) venerable history, it also has a lot of historical warts and leftovers of design concerns that have long since stopped making sense. C++ is a minefield of obscure syntax rules, weird magic, and a strong dose of arbitrary quirkiness. It isn't an easy language to master, and in many cases, just trying to get something simple done in C++ can be a lot more complex than it seems like it should be.

By contrast, C# is intended to promote quick development. This is done in two ways: by giving you a huge amount of prefab code to work with (the .Net framework, which is absolutely excellent), and by removing a lot of mundane little details about how your program works so that you can quit worrying about technical issues and focus on getting things done.

Overall, C# is definitely a better place to start than C++. Once you get used to the concepts and mental processes of programming, it isn't a big deal to pick up C++, although to be honest you'd have to be insane to prefer C++ to C# [wink]

Share this post


Link to post
Share on other sites
Thanks to everyone who posted a response to my question regarding C# vs. C++ as a language for game programming. It looks (to this point at least) that the posts are unanimous in support of C# for my particular situation. I thought that there would be at least one die-hard supporter of C++.

I will start looking for a good first book to learn C#. Any suggestions?

Dave

Share this post


Link to post
Share on other sites
If you want a good book to start with I would read "C# Primer Plus" by Klaus Michelsen. I know this book came out in 2001 and only covers C# 1.1, but it will give you a really good basis to work from. This book will give you in depth code explanations and training.

From there I would look at Jesse liberty's developers notebook to find out what has changed in C# 2.0

Hope this Helps
T!

Share this post


Link to post
Share on other sites
Im am by majority a C++ programmer. I have learned my share of C# though, and I can say both languages have their merits. I absolutely love C++ programming, mainly because it is easier working with low level memory constructs, hardware access, casting, as well as some of what people are refering to as the "hacks". On the other hand, for 90% of the apps, C# is quicker to use, and nearly if not just as fast, so why not use it? Just if you are doing Interprocess communications via dll hooking, DONT use C# :).

Share this post


Link to post
Share on other sites
Quote:
Original post by Long Dog Studios
If you want a good book to start with I would read "C# Primer Plus" by Klaus Michelsen. I know this book came out in 2001 and only covers C# 1.1, but it will give you a really good basis to work from. This book will give you in depth code explanations and training.

From there I would look at Jesse liberty's developers notebook to find out what has changed in C# 2.0

Hope this Helps
T!


Or y'know, you could just start with Liberty's book which includes 2.0...

Share this post


Link to post
Share on other sites
Quote:
Original post by PaulCesar
Im am by majority a C++ programmer. I have learned my share of C# though, and I can say both languages have their merits. I absolutely love C++ programming, mainly because it is easier working with low level memory constructs, hardware access, casting, as well as some of what people are refering to as the "hacks". On the other hand, for 90% of the apps, C# is quicker to use, and nearly if not just as fast, so why not use it? Just if you are doing Interprocess communications via dll hooking, DONT use C# :).

Translation: if you're not doing anything too involved or overly complicated use C# [lol] [grin]; much later on decide and compare what language fits the bill.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!