C++ or C# for learning game programming?

Started by
60 comments, last by Dave FF 18 years ago
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
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.
llloyd
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.
hippopotomonstrosesquippedaliophobia- the fear of big words
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#.

Beginner in Game Development?  Read here. And read here.

 

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]

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

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

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# :).
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...
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.

Beginner in Game Development?  Read here. And read here.

 

This topic is closed to new replies.

Advertisement