Jump to content

  • Log In with Google      Sign In   
  • Create Account


C++ or C#?


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
51 replies to this topic

#1 Kixdemp   Members   -  Reputation: 202

Like
0Likes
Like

Posted 19 October 2006 - 02:02 PM

Hello everyone! I'm making a multiplayer game, style of Soldat and the new Liero clones... But I'm stuck, I don't know if I should do it in C++ or C#... I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#? Thanks! [grin] PS: I meant C Plus Plus, but it doesn't let me display the pluses...

Sponsor:

#2 Ezbez   Crossbones+   -  Reputation: 1164

Like
0Likes
Like

Posted 19 October 2006 - 02:07 PM

Couple things, firstly, there was a thread just a couple hours ago by the title of "C# or C++?". Before that, there have been quite litterally hundreds of threads addressing this same issue. Searching is a Good Thing.

Secondly, you've already answered your own question. You prefer C# by a large amount. Use it. Just go ahead and use it.

#3 Dranith   Members   -  Reputation: 462

Like
0Likes
Like

Posted 19 October 2006 - 02:11 PM

I'd say unless you are making some AAA title where you need to eek every last bit of performance out the machine by hand coding memory management and SIMD code .. go with what you like. For the style game you are trying to make, C# is more than enough. Going with what you are comfortable with and actually getting something done is much more important than getting a few more fps.

-Dranith

#4 Kixdemp   Members   -  Reputation: 202

Like
0Likes
Like

Posted 19 October 2006 - 02:34 PM

Sorry 'bout that... I would never have imagined that was such a popular topic... [embarrass]

But yeah, I Googled it a bit, thought about it, and yeah... C# [cool]
Thanks! [grin] (and sorry for being teh n00b)

#5 Promit   Moderators   -  Reputation: 6590

Like
0Likes
Like

Posted 19 October 2006 - 03:11 PM

Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.

#6 Surg   Members   -  Reputation: 100

Like
0Likes
Like

Posted 19 October 2006 - 03:23 PM

Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


Are you TRYING to start a battle?

#7 Promit   Moderators   -  Reputation: 6590

Like
0Likes
Like

Posted 19 October 2006 - 03:33 PM

He asked. I answered. (And answered truthfully, I might add.)

#8 davepermen   Members   -  Reputation: 1007

Like
0Likes
Like

Posted 19 October 2006 - 03:42 PM

Quote:
Original post by Surg
Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


Are you TRYING to start a battle?


Nope, but as it looks like he can handle c# much better than c++, the chances are big that he get better performance out of his c# work, than his c++ work. not to say, chances that he actually get the work done are much bigger then, too.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud


#9 dbzprogrammer   Members   -  Reputation: 100

Like
0Likes
Like

Posted 19 October 2006 - 04:36 PM

C#.











(I've just always wanted to answer something like that)

#10 MaulingMonkey   Members   -  Reputation: 1556

Like
0Likes
Like

Posted 19 October 2006 - 04:49 PM

Quote:
Original post by Promit
He asked. I answered. (And answered truthfully, I might add.)


The truthfulness of your statement has been

VERIFIED

By MaulingMonkeyTM, Incorperated.

#11 joew   Crossbones+   -  Reputation: 3648

Like
0Likes
Like

Posted 19 October 2006 - 04:50 PM

Quote:
Original post by Surg
Quote:
Original post by Promit
Quote:
Original post by Kixdemp
I prefer C# by a million times, C++ is too complicated, but how would the performance be affected if I do it in C#?
Performance would probably be (significantly?) better in C#.


Are you TRYING to start a battle?

Why would he be starting a battle? All he did was answer the question perfectly. The OP already knows the C# language and anticipates difficulty in some areas of C++. Right there alone should tell you that performance wise C# would be the ideal language to use. The only people that would say otherwise are not software engineers, they are language evangelists.

#12 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 19 October 2006 - 08:21 PM

Quote:
Original post by Promit
He asked. I answered. (And answered truthfully, I might add.)
And also in a way which is sure to get counterarguments. You seem to love defending C#, mr. Microsoft fanboy.

#13 Calin   Members   -  Reputation: 240

Like
0Likes
Like

Posted 19 October 2006 - 08:37 PM

Some archeology if you're interested =]


1) Professional Games Made In C#?
2) Java for game development?
3) Java----C/C++
4) c++ or c#
5) Question about Java Vs. C# Vs. C++
6) Java Games?
7) Java is fast?
8) Secondary Language:VB or Java?
9) What makes C++ so powerful?
10) C# games and cheating...
11) Is C# good enough for system utility programming
12) MC++ vs. C#
13) Which language is best for a 3d Games Engine?
14) C# vs C++ as a choice for development
15) Managed DirectX vs C++

(Promits list not mine)

[Edited by - Calin on October 20, 2006 6:37:00 AM]

#14 Promit   Moderators   -  Reputation: 6590

Like
0Likes
Like

Posted 19 October 2006 - 09:06 PM

Quote:
Original post by Anonymous Poster
You seem to love defending C#, mr. Microsoft fanboy.
At least I have the spine to be somebody and to have views. I don't need to hide behind anonymous posting, and I don't need to sugar-coat reality for the sake of political correctness or whatever the hell it is that people seem to expect these days.

#15 ToohrVyk   Members   -  Reputation: 1591

Like
0Likes
Like

Posted 19 October 2006 - 09:18 PM

To build upon what has already been said: C++ is not a magic wand that makes your program run faster. On average, the two languages are equivalent, with C++ coming out ahead in a significant way only in the hands of experienced programmers who took the time to optimize bottlenecks in their code.

If you are not an experienced C++ programmer, you should not and cannot expect any kind of automatic performance gain: on the contrary, you might achieve worse performance with C++ because you are not used to its idioms and the language does not take care of certain optimizations for you.

You can choose to learn C++ thoroughly and then spend additional time optimizing the game, but this will probably triple or quadruple the time that you will spend creating your game.

#16 Bob Janova   Members   -  Reputation: 765

Like
0Likes
Like

Posted 20 October 2006 - 03:02 AM

I think you've already got this, but you should use C# since you clearly prefer it and are therefore likely to be much better at writing good code.

If you want to take on C++ at some stage that would probably be a good thing, but you shouldn't do a big project like a decent game in a language with which you don't feel comfortable.

#17 NIm   Members   -  Reputation: 210

Like
0Likes
Like

Posted 20 October 2006 - 03:55 AM

One note: I've never fooled with C#, but I understand that it's harder to write cross platform code with it. I'm not sure though. Will someone either back me up or shut me up?

#18 MaulingMonkey   Members   -  Reputation: 1556

Like
0Likes
Like

Posted 20 October 2006 - 05:37 AM

Quote:
Original post by Anonymous Poster
Quote:
Original post by Promit
He asked. I answered. (And answered truthfully, I might add.)
And also in a way which is sure to get counterarguments.


I've not seen any actual counterarguments yet. Those counterarguments need only be addressed should they be raised. There's already been enough argument in favor of C# that no further elaboration is needed.

Quote:
You seem to love defending C#, mr. Microsoft fanboy.


Kind of like how you seem to love circumventing (IP) bans, Mr. AnonJavaDev?

#19 Promit   Moderators   -  Reputation: 6590

Like
0Likes
Like

Posted 20 October 2006 - 08:06 AM

Quote:
Original post by NIm
One note: I've never fooled with C#, but I understand that it's harder to write cross platform code with it. I'm not sure though. Will someone either back me up or shut me up?
It's not harder per se, though there are areas of the framework that you may have to avoid. (System.Windows.Forms is one of the sketchy parts.)

What sucks, though, is that the dev tools are not that evolved, especially on Mac. Doing C# work on OSX was a miserable experience. Sure the programs compiled and ran and even rendered, but it was akward, to say the least.

#20 Kixdemp   Members   -  Reputation: 202

Like
0Likes
Like

Posted 20 October 2006 - 08:54 AM

Quote:
Kind of like how you seem to love circumventing (IP) bans, Mr. AnonJavaDev?

LOL.

Yeah, I'll do it in sharpie, and when I feel I'm ready for plusieplusie, I'll do it in that. [wink] (plusieplusie - I sound like a girl... [razz])

Thanks you all for your replies! [grin]




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