VC++ or C# ???

Started by
28 comments, last by thedo 19 years, 6 months ago
I am interested in game programming and i have started working on it. i have read loads of tutorials on the net and a couple of books on directx and openGL . All this while i have been using VC++ . But as i browsed through the forums here at gamedev , i noticed that many use C#. My question is that should i switch over to .NET( C#) ? I have not yet yet mastered VC++. I am working on it. So now should i work on increasing my VC++ knowledge or should i switch to C# ? Also i have heard that the new directx SDK doesnt support VC++ ? is that true ? What else could u suggest me to work on ? here is some details about me i started with qbasic - then i played with vb for quite a while and also made a sports simulation management game (very small one) in it - then i started c then c++ and then VC++ - finally i have arrived at directx and openGL. - I want to develop yet another sports management simulation using directx this time and my genre of interests are simulation and RTS. Also to tell you the books and tutorials that i used for directx covered up right from the initialization to the more advanced stuff like terain renedering and stencil buffering. I understood all the semi-advance / advance stuff, but when i sit without a book, i am not comfortable reproducing this all alone. but i think thats because i need more practice and experience. isnt it ???
Advertisement
Quote:Original post by hanifv
My question is that should i switch over to .NET( C#) ? I have not yet yet mastered VC++. I am working on it. So now should i work on increasing my VC++ knowledge or should i switch to C# ?
Only you can answer that question. Why do you think you should or shouldn't switch, or are you merely going where you think everybody else is going? You should learn both, because both will be in heavy use for a good while to come. But that's just my opinion and perspective.

Quote:Also i have heard that the new directx SDK doesnt support VC++ ? is that true ?
Whenever you "hear" something (where do you guys hear this stuff anyway?), go to the source.
IMHO the language is only a tool for me to express myself - I use whatever makes sense. AFAIK, C++ is your best bet followed by C for the single reason that there is more sample code in these formats that anything else. If you are going to do mobile stuff - then Java or another appropriate selection is probably a better bet. C# is definitely a cool language with some very nice upgrades but the lack of multiple inheritance and operator overloading does not make it much of a candidate for big project IMHO. However, I would DEFINTELY consider it a great candidate as a scripting language.

If you like VC++ - stay with it. Its a nice IDE that pretty easy to use (although I would install all the service packs and the processor pack for it..). My only strong suggestion here is that you update the compiler as the .NET stuff (even if you are coding in C++) is much much better and worth you time to update. If you want you can buy Intel’s complier (expensive, but produces pretty nice code) or just update the complier free from Microsoft... either with the Driver SDK trick or just downloading it. Personally I use the .NET IDE - it has some nice features but it is a pig, and a lot of the configurations are completely unorganized IMHO.

I have not heard that DirectX is not going to support VC++ in the future, perhaps they mean they will not be able to completely support it (IE - managed code...)? Someone else will have to offer their expertise there.

A really good set of tutorials is the NeHE (hosted here). Although this is an OpenGL exercise, you could easily translate the ideas over to DirectX as well. The lessons are well written (have a snazzy font) and are nicely focused. In addition there are some forums for discussion to - so its very well supported in the community.


Mainly just opinions.. but I hope that helps...


#dth-0
"C and C++ programmers seem to think that the shortest distance between two points is the great circle route on a spherical distortion of Euclidean space."Stephen Dewhurst
well, i don't think MS can afford to not support c++ in their dx sdk...
I agree with most of what xiuhcoatl said, save the operator overloading thing with C#. From MSDN we have:

All unary and binary operators have predefined implementations that are automatically available in any expression. In addition to the predefined implementations, user-defined implementations can be introduced by including operator declarations in classes and structs (Section 10.9). User-defined operator implementations always take precedence over predefined operator implementations: Only when no applicable user-defined operator implementations exist will the predefined operator implementations be considered.

I haven't used C# a ton, but I do like what I've seen. I thought that operator overloading was possible, so I looked it up and that's what MSDN told me. Someone feel free to correct and educate me if I'm wrong ;)
"Game Programming" in an of itself does not exist. We learn to program and then use that knowledge to make games.
C# is RAD - so you can knock up a prototype relatively quickly - get the design in place. If it doesn't meet your needs you can swap then to something else, but at least then you've proven your idea.

C++ and C# are just tools - in the right hands they can both achieve the same thing.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
thanks for ur advice guys.

I think i am comfortable with VC++, and i will continue with it. But i have some more questions

1)Can we do normal VC++ compilation in C# ??

2)How important is mfc in game development ? do i need to completely master it or is the basic knowledge that i have good enough ?

3)also is there some site for directx (good enough) like there is Nehe for opengl ?




As far as Im aware you cannot compile C++ code in Visual C#.

What you might want to do is go to microsofts site and order the beta dvd of visual studios 2005 (or download the versions they have for download).

Granted its beta but it will give you both Visual C++ and C# for free, try it out then make your choice for which you want to put your time (and money) into.
well.... i guess i try to answert the starting question. C is simpler to learn, but C++ is more powerfull... i know its a short post, but thats the most important differece. choose for yourself.
MFC was an option for tool development, but I don't think it's used much anymore. Cross platform UI libraries like wxWindows are taking over (see UnrealEd) and WinForms (Managed C++/C#) is even better suited for that purpose.

I wouldn't mind MFC anymore, not even MS itself is supporting it much these days.

This topic is closed to new replies.

Advertisement