C# is not good?

Started by
55 comments, last by Keldryn 19 years, 1 month ago
Ok, guys, you make the point... Guess I'll have to tackle C++ right away, correct?
As much as I love C#, you make some valuable points :(

Oh... may I go offtopic then?
First of all, is C++ OOP as powerful as C#'s is? Cause it seems very different to me in sense of complexity...

Secondly, please reccomend some really good book about C++ for beginners (although I do know all the basics of C syntax and OOP stuff)? I have C++ From The Ground Up by Herb Schildt, is it good? Or what other books then? And also some good books on game development (DirectX and some theory) please...

And need some advice... I am just fifteen :) Will I loose anything if stick with C# right now, and maybe after I get more mature for game dev stuff I can tackle C++? Or shall I not loose time and learn C++ right away so I won't have to re-learn etc.

Please help!

Thanks!
Advertisement
Yes, but lets put it this way. If you are making a one-level, 3-gun, 5 character game with low-res graphics, you probably should stick to C# for that project. Because if it is to be EXTREMELY simple (like simple AI, no complex physics or such) then C# will help you finish your project faster. But I personally do not get C#, because I tried learning it, but the "Hello World!" programs I tried to put together just flashed on screen and disappeared. And the resources have been limited, so I could figure much out. But I heard there are some great engines for C# like RealmForge GDK (rivals most free C++ engines).

So it boils down to this: C# may be faster and simpler for small projects, and you would get instant results with it. But when you are making something that you want a language that is self-evolving and actually gets stronger, funner, and sometimes easier as you progress, go with C++. It is not that hard. In fact, I have started on it about 5 months ago and I am already creating my own game engine (sure, it sucks, but I don't care!) so I'd reccomend using C++ if you want to be recognized. Because anything complex you have to do with C++ is bound to be 3 times harder and longer in C#.
Ok, DarkBrute! Thanks!

So, as I asked above, what books on beginning C++ and DirectX 9 as well as some game design theory you all recommend?
Quote:Original post by pTymN
Also, operator overloading is something that I've missed when using C#

Indeed you have missed it

Quote:Original post by pTymN
as well as the occasional pointer/array sequential processesing speed enhancements.

Those can be done using unsafe code.
I am a professional game developer, and for the past year and a half or so we've mainly used C#.Net w/ managed DirectX. Our company doesn't make shrinkwrap games, though. We make mostly bar-top games, amusement games, phone games, etc with very quick turnarounds (which also made re-writing our engine feasible). Our development cycles are sometimes as small as 6 months.

Our games tend to be 3D, and we can pull off advanced effects pretty well in C# (we use HLSL as well). Everything runs smoothly, well, and -- most importantly for a company like us -- are quick to develop.

The key advantange of C# for an Indie developer, IMO, is speed of development. There's just a lot of built-in stuff, a lot of potential bug/problem areas that are handled for you, etc. I think if you are going to be an Indie developer and your first priority is you really want to make games, you should strongly consider C# as your language of choice. If you just want to break into the "industry" , C++ is a safer bet.
Co-creator of Star Bandits -- a graphical Science Fiction multiplayer online game, in the style of "Trade Wars'.
Quote:Original post by DarkBrute
Yes, but lets put it this way. If you are making a one-level, 3-gun, 5 character game with low-res graphics, you probably should stick to C# for that project. Because if it is to be EXTREMELY simple (like simple AI, no complex physics or such) then C# will help you finish your project faster. But I personally do not get C#, because I tried learning it, but the "Hello World!" programs I tried to put together just flashed on screen and disappeared. And the resources have been limited, so I could figure much out. But I heard there are some great engines for C# like RealmForge GDK (rivals most free C++ engines).

So it boils down to this: C# may be faster and simpler for small projects, and you would get instant results with it. But when you are making something that you want a language that is self-evolving and actually gets stronger, funner, and sometimes easier as you progress, go with C++. It is not that hard. In fact, I have started on it about 5 months ago and I am already creating my own game engine (sure, it sucks, but I don't care!) so I'd reccomend using C++ if you want to be recognized. Because anything complex you have to do with C++ is bound to be 3 times harder and longer in C#.

With a few minor exceptions, such as friend classes, all high-level design constructs available in C++ are available in C#. With the absence of header files, an easier interface for including external libraries, and arguably more powerful standard libraries, I believe C# is far superior for large projects (from a design point of view, speed is another story). Not to mention the fact that Reflection is an invaluable feature when it comes to debugging.

If you can't even manage to run a Hello World program in the language (hint: try Ctrl-F5 rather than F5), please refrain from misleading new programmers about the language's capabilities.
Quote:Original post by zRED
And need some advice... I am just fifteen :) Will I loose anything if stick with C# right now, and maybe after I get more mature for game dev stuff I can tackle C++? Or shall I not loose time and learn C++ right away so I won't have to re-learn etc.

You will absolutely not lose anything if you stick with C#. The most important thing for you to do is learn language-agnostic design and implementation techniques. You should be able to solve a given problem in any language. Learning language syntax is easy (even the convoluted mess that is the C-style syntax), learning object-oriented design is quite a bit trickier. It's also the main skill employers are looking for.

As a 15 year-old hobbyist, you're likely not going to be programming anything that can compete with Half-Life 2 technically, so speed isn't the biggest issue here. If you were trying to make a Half-Life-killer, I would definitely recommend C++, but if you're just out to improve your skills and design a few small games, C# is a good start.

In any case, I recommend Googling for a few articles comparing what languages are avilable and taking everything you read (including this post and the others here) with a very large grain of salt.

Regardless of what language you choose, you'll be doing yourself a favour if you pick up books such as the GoF's Design Patterns and Steve McConnell's Code Complete.
Quote:Original post by zRED
And need some advice... I am just fifteen :) Will I loose anything if stick with C# right now, and maybe after I get more mature for game dev stuff I can tackle C++? Or shall I not loose time and learn C++ right away so I won't have to re-learn etc.


I'm not sure age matters. I'm also only fifteen (though I been programming for a few years before), and I was able to write a memory usage tracker in C++. My point is don't think that because you're fifteen, you can't make anything cool. What matters is experience. Not the age at which you started programming.
zRED,

Since you're just starting out, the problems of professional game developing are not something you need to worry about right now.

C# is a great language to start with, and you can move onto C++ later if and when you need to.

Go with whatever you feel most comfortable with.
I've gotta agree with glassJaw. I think the point is not that you can't become a guru with C++ when you're 15, it's that there's no need to. You're not going to be looking for a professional game programming job in the next year or two. So, it doesn't matter if you have a mastery of the C++ language now.

So, I'd stick with C# for now. Get good with all of the higher-level things that are important to making a game, like how to use 3D math effectively, Design Patterns and code structuring strategies for large-scale games, and so on. Then, in a few years you can move on to C++ and start to learn some of the lower-level things that can improve game performance.

In addition to, or instead of, the excellent GoF's Design Patterns book I would also suggest checking out "C# Design Patterns" by James W. Cooper. It's more of a tutorial-based book on Design Patterns, with programs that you can run, instead of the theory-based GoF book. It's not as deep, but it may be easier for you to "get it". Ideally, get both.

Another book, which I highly recommend is "Real Time Rendering (2nd Edition)" by Moller and Haines. It's a language-agnostic book that covers most of the techniques used today for real-time graphics programming.

At the end of the day, I don't see C++ being unseated any time soon as the main language for game programming. As others have mentioned, consoles are not likely to support .NET, and like it or not, consoles make up the bulk of sales in the game industry. Even beyond that though, there's a lot of people with C++ experience and a lot of C++ code that developers would like to re-use on future projects. So, it's not likely to change soon.

Still, that doesn't mean you can't learn most of the important concepts with C# now and move onto C++ when you're comfortable =)

-John

PS: I've been working professionally in the game industry for 11 years now, so I'm not just talking out of my ass either ;)
- John

This topic is closed to new replies.

Advertisement