Jump to content

  • Log In with Google      Sign In   
  • Create Account


Visual C++.net vs Visual C#.net


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
50 replies to this topic

#1 shrek2   Members   -  Reputation: 122

Like
0Likes
Like

Posted 14 May 2007 - 11:56 PM

1) which is the best for game programming? 2) which is easier to learn for game programming?

Sponsor:

#2 HansDampf   Members   -  Reputation: 106

Like
0Likes
Like

Posted 15 May 2007 - 12:12 AM

This cannot be answered in one sentence (or even 15.)
Try both and decide for yourself.
If it would be a matter of one being simply better, wouldn't you think you wouldn't have heard of the other?

#3 shrek2   Members   -  Reputation: 122

Like
0Likes
Like

Posted 15 May 2007 - 12:16 AM

well i'm currently learning c++ for game programming and i can't believe how much code you need to write in c++ just just to create a simple windows program. i like the forms in .net much better. care to spend more that a few sentences describing your views?

#4 Ahnfelt   Members   -  Reputation: 176

Like
0Likes
Like

Posted 15 May 2007 - 12:26 AM

HansDampf: Have you heard of Brainfuck? ;-)

Shrek2:
1) Both of the languages are currently used to develop games by hobbyists and proffesionals alike. None of them have game specific features, so I'd say they're equally good or bad. C++ allegedly has some more options for manual optimization.

2) C# (probably with the XNA framework)

It's generally easier to learn and use a modern language (implies automatic memory management) like C#, Java, or any of the scripting languages like Python, etc.

You will be productive in those languages much faster than you will in C++, and your productivity is likely to stay higher too.

#5 shrek2   Members   -  Reputation: 122

Like
0Likes
Like

Posted 15 May 2007 - 12:33 AM

why do industry professionals use c++ when c# seems much easier? almost all the programming job advertisements want c++. is the reason simply because there's a lot of legacy code and people don't want to reinvent the wheel? will most professionals choose c# if they can start all over again?

#6 rvdwerf   Members   -  Reputation: 102

Like
0Likes
Like

Posted 15 May 2007 - 12:50 AM

C# isnt crossplatform and/or the code is not as secure as C++
C# its more like java it works on the .net framework.

Preferably i like C++ you have much more control over stuff.
If you want to program easy C# is the way to go

#7 RyanZec   Members   -  Reputation: 124

Like
0Likes
Like

Posted 15 May 2007 - 12:50 AM

C++ is still the industry standard because alot of the APIs are still written in C/C++ and C++ is still a little bit faster than C#. Also I don't believe C# was designed to become the industry standard in gaming programming. Each programming language has it purpose and even tho C#, because of the XNA framework, can do game programming, does not mean it should be the standard. This also does not mean you should not use it for you game programming. Use whatever works best for you.

#8 Plasmana   Members   -  Reputation: 151

Like
0Likes
Like

Posted 15 May 2007 - 12:51 AM

1) You first question is not easy to answer, however this is my opinion... C++ is currently the path of least resistance to create games that meet todays expectations regarding game performance. It also has overwhelming momentum in the commercial games industry. .NET managed code is the future. A hybrid transition period where native C++ and C# are both used (think platform developers vs. content developers) will probably exist for a while. Eventually C++ will be marginalized to the lowest of levels; just like Assembly Language has been.

2) You second question is easy.. C#/XNA is much easier to learn than C++/DirectX.

#9 RyanZec   Members   -  Reputation: 124

Like
0Likes
Like

Posted 15 May 2007 - 12:52 AM

From my understanding C# is cross platform with the MONO framework for Linux.

Also, One point about what I do like about C++ is that you do have more control and have the ability to add ASM code with in your project to gain a little extra speed.

#10 Evil Steve   Members   -  Reputation: 1959

Like
0Likes
Like

Posted 15 May 2007 - 01:00 AM

The reason I use C++ rather than C# is that C++ doesn't run on anything but Microsoft operating systems (Except Mono). That means no consoles except the 360, and even then the C# code is much less efficient.

#11 Evil Steve   Members   -  Reputation: 1959

Like
0Likes
Like

Posted 15 May 2007 - 01:02 AM

Quote:
Original post by RyanZec
Also, One point about what I do like about C++ is that you do have more control and have the ability to add ASM code with in your project to gain a little extra speed.
The option is there, yes. But I'll be very surprised if you can show me any assembly you've written which turns out to run faster than C/C++ code generated by the compiler (Not MSVC 6, don't even go there) [smile]

#12 stormwarestudios   Members   -  Reputation: 215

Like
0Likes
Like

Posted 15 May 2007 - 01:09 AM

Should be ...
Quote:
Original post by Evil Steve
The reason I use C++ rather than C# is that C# doesn't run on anything but Microsoft operating systems (Except Mono). That means no consoles except the 360, and even then the C# code is much less efficient.


I would completely recommend C++, simply due to the sheer amount of support, libraries, IDEs, APIs, and sheer amount of information available for it that don't exist in C#.

#13 Paulius Maruska   Members   -  Reputation: 566

Like
0Likes
Like

Posted 15 May 2007 - 01:10 AM

Bah! All this talk about speed, more control, efficiency...

Isn't there more people like me, who choose to code in C++ because they simply *love* C++ ?
Yes, you heard me right! I *love* C++!

#14 RyanZec   Members   -  Reputation: 124

Like
0Likes
Like

Posted 15 May 2007 - 01:18 AM

Quote:
Original post by Evil Steve
Quote:
Original post by RyanZec
Also, One point about what I do like about C++ is that you do have more control and have the ability to add ASM code with in your project to gain a little extra speed.
The option is there, yes. But I'll be very surprised if you can show me any assembly you've written which turns out to run faster than C/C++ code generated by the compiler (Not MSVC 6, don't even go there) [smile]



I could not because I can't write ASM code but from what other programmers tell me they can write math libraries in ASM that would be faster than C++, not much faster minf you, but faster.



#15 T1Oracle   Members   -  Reputation: 100

Like
0Likes
Like

Posted 15 May 2007 - 02:16 AM

Quote:
Original post by Paulius Maruska
Bah! All this talk about speed, more control, efficiency...

Isn't there more people like me, who choose to code in C++ because they simply *love* C++ ?
Yes, you heard me right! I *love* C++!

I'm like that. I love C++, but I think my addiction to template metaprograming keeps me from picking up a C# book. I need to learn it, but I find the flexibility of C++ much more alluring than the ease of C#. It probably doesn't help that I tend to be masochistic when it comes to working on projects.

I also have invested much more time into it and have just gotten into using Boost. The fact that you can only us MS constructs to program C# turns me off. I don't like MFC at all, Direct X code look overly convoluted to me, and I don't trust MS to make an interface that respects any standards other than their own. I'd prefer to use libraries whose design influences entail the largest group of brilliant minds. Thus far, C# is only derived from MS thinking with zero room for any outside input.

If I need to make ordinary Windows applications or program a web server running windows, then C# is what I would look into. Else wise the motivation for me, is lacking.
Programming since 1995.

#16 Josh Petrie   Moderators   -  Reputation: 3104

Like
0Likes
Like

Posted 15 May 2007 - 02:33 AM

Quote:

why do industry professionals use c++ when c# seems much easier? almost all the programming job advertisements want c++. is the reason simply because there's a lot of legacy code and people don't want to reinvent the wheel? will most professionals choose c# if they can start all over again?

The reasons are generally (a) legacy code, (b) lack of platform support (CLR implementations for consoles), © fear and resistance to change due to the nature of the industry and skepticism about the viability of C# (mainly due to bad benchmarks since C# is relatively young), and (d) lack of expertise (not all knowledge, idioms, and techniques that are valid and efficient in C++ transfer to C#, which partially accounts for the poor benchmarks noted in ©...) and so on.

Quote:

C# isnt crossplatform and/or the code is not as secure as C++

Wrong and wrong. C# is (arguably) more cross-platform as it compiles to an intermediate language that is JIT-compiled; this results in many cases in an executable that can run on multiple platforms without recompiling the C# code (this is not possible with C++, you must recompile for each target). Furthermore, C# is vastly more secure, supporting code security features in-language and providing automatic handling of potentially dangerous scenarios (memory management) and sandboxing environments.

Quote:

The fact that you can only us MS constructs to program C# turns me off.

You can write complete C# applications without touching a single bit of Microsoft's products (although, yes, Microsoft's tools for C# development are still the most robust and powerful).


#17 ejele012   Members   -  Reputation: 100

Like
0Likes
Like

Posted 15 May 2007 - 10:16 AM

With C# and XNA, what Microsoft call Cross Platform is just that you can write a game that can be run over windows and Xbox 360. More info at:

http://msdn2.microsoft.com/en-us/xna/default.aspx

The .NET technology was develop by Microsoft, it runs only on Windows and Xbox 360 and they have a variety of projects with it. You need MONO to be able to use it on other systems. The Mono Project is an open development initiative sponsored by Novell to develop an open source, UNIX version of the Microsoft .NET development platform. So, it can't be 100% compatible. More info at:

http://es.wikipedia.org/wiki/.NET

http://www.mono-project.com/Main_Page

You have more control over C++, you can make unmanaged and managed code with it.

And if you want to use C# with XNA you'll be tied with Microsoft C# Express Edition. Is good, but you don't have more choices.

#18 gharen2   Members   -  Reputation: 520

Like
0Likes
Like

Posted 15 May 2007 - 04:45 PM

Shrek2: First rule of deciding a language is good or not: try them both and see what you think. If you ask 10 other people what their favorite languages are, you'll get 10 different answers.

In regards to a few of the comments made so far: people seem to be pretty Xna crazy these days. Not that that's a bad thing mind, it is a very nice api. But lets not forget that managed directx is still supported by microsoft, and you can use opengl from the .net languages. So you're hardly limited in how many platforms you can support with c#, and Xna is hardly the only graphics solution for c# out there. Arguing that you can support consoles other than the xbox 360 with c++ is kind of moot, as 99% of the people here will never be able to develop for them, at least not legally.

Anyways, here's my 2 cents: I'd use c++ if I were a professional programming half life 3 or doom 4, but c# is perfectly adequate for just about anything else. There's absolutely no reason for a hobbiest to not use c#.

[Edited by - gharen2 on May 16, 2007 6:45:11 AM]

#19 shrek2   Members   -  Reputation: 122

Like
0Likes
Like

Posted 15 May 2007 - 10:38 PM

where can i find good tutorials on c#.net for game programming? i looked at Game Institute. i think they only use c++.

#20 JobbyKrusT   Members   -  Reputation: 122

Like
0Likes
Like

Posted 16 May 2007 - 01:07 AM

If you want to use C#, use XNA.
You can find enough tutorials if you google for "xna tutorials" or on www.xna.com.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS