why is c# better for game development than c++(you can be vague)

Started by
298 comments, last by normalme 19 years, 12 months ago
quote:Original post by tri-thanatos
I really dont think there are going to be that many compatability errors, and users kept switching platforms/upgrading software when it came time to upgrade to win98, then 2000, then now XP, the consumer = dumb .


Actually you are completely wrong here when speaking about future OS''s from Microsoft.

I mean sure going from 98->2000->XP was simple, as the core APIs virtually stayed the same or at least co-existed.

BUT

Please speak to people who have been developing a long time. The shift from DOS->Win95 is what you want to look at here. You could still run the old DOS apps on Win95, they just had bad performance.

Longhorn is another one of those paradigm shifts such as the DOS->Win95 shift.

This means that, yes, native C++ will take a performance hit because it will be working almost exactly to a tee how DOS applications worked in Win95. Does this make C++ bad? Not at all.. as it is still used for drivers and other low-level duties.

What you need to do is analyze the numbers of ASM programmers that switched to C\C++ just because those languages were the primary languages to develop on Windows. Microsoft has built C# to be the primary language on their future OS for applications.

Advertisement
quote:Original post by ivashkin
C++ offers better performance, which is really crucial in computer games development.


I see this in a lot of places. Sure with little samples and the such I have seen C# score only 95-98% of the C++ application's speed.

BUT

WHY ARE YOU DISMISSING THE PROOF? Axiom engine, the C# port of the OGRE engine is beating OGRE in performance.. please explain to me how C# is slow again?


quote:
It is being developed as a language to be used java INSTEAD. It's a Java-Killer. And I beleive Microsoft(r) has enough money for C# to defeat Java almost completely.


Please stop spreading this bad information. This is simply NOT true, and has not been stated anywhere. If you knew anything about the C# language you would know it was designed to be the "perfect" language for future Microsoft platforms.

C# was NOT created to be a Java-Killer, and Microsoft is not using it to "defeat Java almost completely". Please note that Microsoft has it's own Java implementation in Visual Studio.NET 2003 called J#.

Also good luck on knocking out Java no matter what you do. In the corporate world Java actually has a larger userbase and application pool than C++ applications.. so don't think Java is going anywhere anytime soon.


quote:
P.S. Topic is named "why is c# better for game development than c++". I gonna answer - I see NO reasons. For game development C# is worse than C++, mostly because of its performance.
In others fields C# is going to be better than C++.


Again you are spreading pure speculation and misinformation UNTIL you can prove me wrong!

Why does the Axiom (C#) engine beat the OGRE (C++) engine in performance since Axiom is a port of OGRE.

Why is RunUO (www.runuo.com) more robust with better scripting support, as well as THREE TIMES the performance of it's old C++ couterpart?

You people really need to get some experience with both languages before you start making things up.

Also please note that it has been stated, shown, benchmarked, etc that C# gains ENORMOUS performance benefits when using C# 2.0 (VSNET Whidbey) and running on Windows Longhorn, it has even been shown to run 20-30% faster than it's native unmanaged C++ counterpart... so please bring evidence to the table before you post lies and garbage.



[edited by - Imperil on January 14, 2004 12:16:37 PM]
2Imperil:
quote:I see this in a lot of places. Sure with little samples and the such I have seen C# score only 95-98% of the C++ application's speed.

BUT

WHY ARE YOU DISMISSING THE PROOF? Axiom engine, the C# port of the OGRE engine is beating OGRE in performance.. please explain to me how C# is slow again?

I don't state, that C# is ALWAYS slow compared to C++. I'd rather state it tends to be slower.


quote:
If you knew anything about the C# language you would know it was designed to be the "perfect" language for future Microsoft platforms. C# was NOT created to be a Java-Killer, and Microsoft is not using it to "defeat Java almost completely".

And if you knew something about Microsoft and Sun relationships you would not argue...

quote:
Please note that Microsoft has it's own Java implementation in Visual Studio.NET 2003 called J#.

Sure, I know that. And do you know, that this implementation didn't receive Sun's certificate? So, this is non-official Java implementation.

quote:so don't think Java is going anywhere anytime soon.

And I don't think so.

quote:
Again you are spreading pure speculation and misinformation UNTIL you can prove me wrong!

Why does the Axiom (C#) engine beat the OGRE (C++) engine in performance since Axiom is a port of OGRE.

How should I know that? Have you encountered cases, when complex system acts unnaturally. I mean trivial changes in source code can sometime cause nearly unpredictable behaviour and so on. If Axiom and OGRE worked under the same conditions (I mean program environment), could this effect be seen?

quote:
Why is RunUO (www.runuo.com) more robust with better scripting support, as well as THREE TIMES the performance of it's old C++ couterpart?

I guess it was optimized.

quote:
Also please note that it has been stated, shown, benchmarked, etc that C# gains ENORMOUS performance benefits when using C# 2.0 (VSNET Whidbey) and running on Windows Longhorn, it has even been shown to run 20-30% faster than it's native unmanaged C++ counterpart... so please bring evidence to the table before you post lies and garbage.

If managed code is faster, than unmanaged... Oh, yeah. That's pretty nice. No comments...
Note also, that samples are always specially designed to demonstrate needed results.

Also, can you name any FPS or RTS implemented in Java or C#?

P.S. Thank you for untrivial discussion, and... take it easy.

[edited by - ivashkin on January 15, 2004 3:45:37 AM]
Si vis amari, ama
Imperil:
All be it from me to dispute a fellow C# lover, but you keep running on about all of these benchmarks and/or programs that prove how C# is just as fast if not faster than C++.

No offense, but where are the links to these benchmarks? And the programs you claim that are faster than their C++ counterparts, perhaps you could enlighten us by showing us the benchmark results that compare the two apps.

Your words are not proof, but rather speculation just like all those who are running down C# and praising C++.
quote:Original post by wyrd
Imperil:
All be it from me to dispute a fellow C# lover, but you keep running on about all of these benchmarks and/or programs that prove how C# is just as fast if not faster than C++.

No offense, but where are the links to these benchmarks? And the programs you claim that are faster than their C++ counterparts, perhaps you could enlighten us by showing us the benchmark results that compare the two apps.

Your words are not proof, but rather speculation just like all those who are running down C# and praising C++.


agreed, id like to see as well.

on another note
quote:Why does the Axiom (C#) engine beat the OGRE (C++) engine in performance since Axiom is a port of OGRE.


Well there could be so many factors to why that could be:

1) Oger could of easily been used as a simple diagram to follow thus allowing them to find other ways that the orignal coders of oger did not think of.

2) The coders of oger coded it yes, but that does not mean it has been compeltely optimized to its fullest.

3) When you code somthing more then 1 time it tends to be faster the second time around you have a better idea of the overall flow, if you have seen the completed result.

ect...

porting a code generally at many times does improve it because you can see any flaws that may beable to be extended, anyone can extend somthing further so that its more optimized it doesnt take much. You could even go download intels compiler and use it, its suppose to increase the performace of C++ code so thats REALLY hard to compare with. Just because a port is good does not mean with little effort C++ could be better, thats what inline asm is for

Personally though, I don't like the idea of someone decompiling my code to make some form of a game hack or worst a embbed virus. Obscures can only do so much, there is no anti piracy methods, however I like the idea of having my door more locked.

Personally I belive we wont see C# kill C++, infact its much more likely that C# will kill VB.

Not to mention id like to see benchmarks on differnt hardware sets, its much more hard to determain what is faster when you have only see it benched mark on one set of hardware. After all hardware is what drives the software.

Besides all of you are wrong C++ isn't fast nor is C#, asm all the way

I searched around on net for awhile and found a few performance comparisons:
http://www.osnews.com/story.php?news_id=5602&page=3
http://www.kuro5hin.org/story/2002/6/25/122237/078
http://www2.hursley.ibm.com/decimal/telco.html
http://www.windevnet.com/wdn/webextra/2003/0313/
http://www.javaperformancetuning.com/news/qotm028.shtml

The Great Win32 Computer Language Shootout:
http://dada.perl.it/shootout/

Source of a c-sharp benchmark I don't have a compiler :/
http://www.ocf.berkeley.edu/~cowell/research/benchmark/code/Benchmark.cs

Another source of a few languages I guess:
http://rotor.cs.cornell.edu/SciMark/

Article or discussion about DirectX and C#:
http://weblogs.asp.net/jdavis/archive/2003/05/21/7344.aspx


They don't really prove that C# is as fast as people on this fourm are saying it is; but I will let you be the overall judge.

[edited by - DevLiquidKnight on January 15, 2004 6:03:34 AM]
quote:Original post by Imperil
Also please note that it has been stated, shown, benchmarked, etc that C# gains ENORMOUS performance benefits when using C# 2.0 (VSNET Whidbey) and running on Windows Longhorn, it has even been shown to run 20-30% faster than it''s native unmanaged C++ counterpart... so please bring evidence to the table before you post lies and garbage.

Was this for one benchmark in particular, or a general performance guide? Also, do you have a link or something that confirms this?
*yawn* another "my language rules, yours sucks" thread. The forum equivalent to a bar brawl...

C# is better if it fits your particular needs and want something really rapid. It''s also a good intro to programming and can be wielded nicely - it simplifies COM stuff loads. From a design persepective it forces you into good practice by disallowing things like globals.

C++ lets you have fine grain control over memory management and tends to be more complex; a good developer can do all sorts of naughty memory tricks to get that extra frame per second.

You know those safety scissors you give to little kids that are just plastic? That''s C# (and for that matter Java), safety but can still cut it. C++ is a modellers scalpel - lots and lots of control but really easy to screw things up.

There is no point switching from one or the other unless you really need too or want too; as both can potentially produce the same basic end-result - especially if your goals are modest (which they should be if you are just starting out anyway, nothing worse then a string of half-finished projects and getting into that tarpit of engine creation)...
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.
quote:Original post by ivashkin
I see this in a lot of places. Sure with little samples and the such I have seen C# score only 95-98% of the C++ application's speed.
Also, can you name any FPS or RTS implemented in Java or C#?

P.S. Thank you for untrivial discussion, and... take it easy.


Actually no there isn't an FPS or RTS implemented in C# yet (I can't speak for Java, I don't follow the community or program in that language).

BUT

There wasn't a commercial game built in C++ until 5-10 years after it's release. Please remember that C# is really a brand new language.

C# is still not complete, 2.0 is due out this year with the release of VSNET Whidbey. I know a lot of people that started using C# for game and graphics applications but stopped because they ran into boxing/unboxing issues and decided to wait for generics.


[edited by - Imperil on January 15, 2004 9:21:54 AM]
quote:Original post by wyrd
Imperil:
All be it from me to dispute a fellow C# lover, but you keep running on about all of these benchmarks and/or programs that prove how C# is just as fast if not faster than C++.

No offense, but where are the links to these benchmarks? And the programs you claim that are faster than their C++ counterparts, perhaps you could enlighten us by showing us the benchmark results that compare the two apps.

Your words are not proof, but rather speculation just like all those who are running down C# and praising C++.



Of course words are not proof.. and I am sorry but if you think it is speculation like the "C++ 4 teh ownz!" people.. gimme a break.

Here you go.. the BEST way for me to give results:

Axiom Engine (C#) - http://axiomengine.sourceforge.net/
OGRE Engine (C++) - http://www.ogre3d.org/

You can download both of them freely with source.
You can compile them on your own compiler.
You can benchmark them on your own system.

I gave all the information needed. Who cares about numbers and charts if it doens''t turn out that way on your own system.

Try it yourself and you will see the difference, considering I have built both and ran them on 4 seperate PCs with completely different specs, and I get the same results every time =]
quote:Original post by normalme
i have a few guesses,

is it the syntax of the future?

is it optimized for preformance?

is it optimized for clarity?

is it the language that you can use java with?


C++ is the defacto standard in gamecompanies for creating games.
Anything else you might have heard is nonsense.

Games are created using all languages available. Every time there is a new language there is always someone who blows the hype whistle declaring that language superior. c# is no different in that respect. You should use whatever you feel comfortable with. Later the company you work for will dictate what language preference they have and you will use that.
No no no no! :)

This topic is closed to new replies.

Advertisement