Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


is C# an alternative to 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.

  • This topic is locked This topic is locked
13 replies to this topic

#1 abcdef44   Banned   -  Reputation: 2

Like
-22Likes
Like

Posted 06 August 2012 - 12:20 AM

No, at least not for me.

Looking for game engines lately, I only found C++ stuff, except MOgre which is a C# version of Ogre and Unity3D. Mogre would be a pain in the ass to integrate c++ addon libs (at least for me) and Unity has lots of disadvantages. (like booting crappy Windows etc.)

Not even for small tools it's a good solution, as you would need to ship also the MONO runtime.
There must be some reasons why Mono is not included in Ubuntu, OSX etc.?

Back to C++ coding. Bye,bye RIP C#

Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6166

Like
7Likes
Like

Posted 06 August 2012 - 12:35 AM

Mono is included in Ubuntu (and Linux Mint, and probably a whole bunch of other Linux distributions aswell these days). you'd have to go out of your way to remove it.

Not sure what you mean about (booting crappy Windows) for Unity, the splash screen can be removed in Pro, and while you do have to run Windows to use the editor that isn't a huge drawback. (Yeah, its annoying to use Windows but it isn't that crappy), When it comes to AAA game engines i'd agree that C# is not an alternative to C++, but when it comes to using game engines C# is a perfectly valid(and often preferable) alternative to Lua, Python or various proprietary scripting languages.
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 Memories are Better   Prime Members   -  Reputation: 769

Like
2Likes
Like

Posted 06 August 2012 - 12:59 AM

No, at least not for me.

Looking for game engines lately, I only found C++ stuff, except MOgre which is a C# version of Ogre and Unity3D. Mogre would be a pain in the ass to integrate c++ addon libs (at least for me) and Unity has lots of disadvantages. (like booting crappy Windows etc.)

Not even for small tools it's a good solution, as you would need to ship also the MONO runtime.
There must be some reasons why Mono is not included in Ubuntu, OSX etc.?

Back to C++ coding. Bye,bye RIP C#


You could have at least been constructive with your ranting.

Going back to your actual question "is C# an alternative to C++?", I think C# and C++ work excellent together, for many reasons (even out of graphics programming), so when you are using C# there is no reason not to use C++ and vice versa, because of this it makes very little sense completely rejecting one or the other language. Therefore I guess what I am saying is "Why should C# or C++ replace the other?", "Why should someones project design ONLY use one or the other language?" and most importantly "Since C# and C++ interact nicely why do comparison threads even exist?"

Now I understand performance, safety and time efficiency are usually the cause of said comparison wars, but im sure someone could easily and effectively make use of both languages minimizing the side effects of doing everything in one language alone.

Also you havent exactly explained what your issues were with C#, only Mogre and Unity (both of which I havent used enough to comment on).

Edited by Dynamo_Maestro, 06 August 2012 - 01:09 AM.


#4 abcdef44   Banned   -  Reputation: 2

Like
-4Likes
Like

Posted 06 August 2012 - 08:52 AM

I should not have compared C# to C++, I see. It will never replace C++, but it's even more surprising, that a hardly used language is put at the top of this forum.

#5 Hodgman   Moderators   -  Reputation: 30882

Like
0Likes
Like

Posted 06 August 2012 - 08:55 AM

C# is put at the top of this forum

What does this mean?

#6 laztrezort   Members   -  Reputation: 968

Like
0Likes
Like

Posted 06 August 2012 - 10:00 AM

How and why is this even a topic, especially considering which forum it was posted in?

#7 Memories are Better   Prime Members   -  Reputation: 769

Like
3Likes
Like

Posted 06 August 2012 - 03:21 PM

I should not have compared C# to C++, I see. It will never replace C++, but it's even more surprising, that a hardly used language is put at the top of this forum.


Thats the thing, you didnt really compare C# to C++, you just criticised Mogre, unity and randomly brought mono in the equation. I dont like using DXUT or Win32 programming, does this mean I should criticise C++?

This site has done a lot to convince people of C# benefits over other managed languages and over C++, theres a C# vs Java (for example) or C# vs C++ every other day and the responses to why C# is a good choice is clearly stated, if after all this a person doesnt wish to use C# for whatever he / she wishes to do then ultimately they wont need to, thats what free will is all about.

If you dont want to use C#, then dont but at least when criticising the language try to actually mention issues with the language or .NET framework and not libraries that can be used with it.

#8 Cygon   Crossbones+   -  Reputation: 1123

Like
3Likes
Like

Posted 06 August 2012 - 03:29 PM

Weird post. Trying to let off some steam after a failed learning attempt?

I found it to be one of the nicest and most complete environments I ever worked in. It's incredibly cool to be able to run the same binaries on Windows and Linux (and Android and iPhone). Porting has always been a big effort before. Mono also has the smallest overhead of all "managed" languages (like Python, Java, Ruby) and can bundle the Mono runtime with an application so users get a single executable and don't have to have Mono installed (between 1 and 2.5 MB - which is incredible given the extensive .NET BCL).

EDIT: Regarding the "hardly used language" bit - check the tag frequencies on StackOverflow, for example. C# is 3 times as popular as C++ there. It has almost driven C++ extinct in the business world. And yet is still mostly under the radar for Linux users. How popular it appears depends very much on which circles you frequent.

Edited by Cygon, 06 August 2012 - 03:36 PM.

Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.

#9 jbadams   Senior Staff   -  Reputation: 19018

Like
1Likes
Like

Posted 06 August 2012 - 11:06 PM

You've posted in a forum for an inactive/completed C# workshop -- I'm going to move you out to For Beginners.

it's even more surprising, that a hardly used language is put at the top of this forum

Putting the "hardly used" bit aside for now, the reason the C# workshop is listed towards the top of the forum index is to give more prominent/easier access to the items in that view that are absent from the actual site navigation provided by the drop-down menus up the top -- you'll notice the completed/inactive workshops (which are reasonably clearly marked as such) aren't included there at all.

#10 jbadams   Senior Staff   -  Reputation: 19018

Like
14Likes
Like

Posted 06 August 2012 - 11:50 PM

Now that that little piece of administrative business is out of the way, let's get back to this little gem:

a hardly used language [referring to C#]

...and because it's related, this little nugget of wisdom from another recent topic:

90% is written in C++. Hence why bother at all about other languages?


Obviously you like C++. That's absolutely fine, it's your opinion and you are entitled to have and to express it.
Obviously you don't particularly like C#, or Java, or probably other languages. Again, that's fine, it's your opinion, and you're welcome to use and to not use whatever languages you prefer for your own projects.

Your beliefs about the languages other people use however, are simply outright incorrect.


Let's start with that "90% is written in C++". 90% of what are you talking about exactly?

If you're talking about video games, then you would be incorrect.
  • Many older games were written in assembly, or in C, and games are still being written in those languages.
  • Android games can be written in Java or in C++, and a significant number of them are written in Java.
  • The only officially supported language for targeting iOS (iPhone, iPad, et al.) is Objective-C. There are work-arounds that allow usage of other languages (of which C++ is only one option), but these would not likely out-number the Objective-C and other languages (such as Flash).
  • There are hundreds of thousands of browser based games: I'd posit a guess that the majority are Flash games, while there are others written in Java, Silverlight, JavaScript, or plugins such as the one provided by Unity. Where server-side logic is involved it is often implemented in PHP, Java or ASP. Sometimes it might be JavaScript (often via Node.js), Python, or Ruby. It's very rarely C++, which can be troublesome to work with on the server-side of a browser game. Facebook games are included here.
  • There are many desktop games written in languages other than C++. Minecraft is Java. Terraria is C#/XNA. EVE Online is Stackless Python. RuneScape is Java. The list could go on and on. There are even commercially available games created with Game Maker (such as Legend of Fae).
  • It's increasingly common in professional development to write the underlying engine in a language such as C or C++ and then implement higher-level functionality and game-play logic in a scripting language such as Lua, Python or others. Civilization IV used a large amount of Python, whilst Civilization V changed to Lua. Disney's MMO Toontown Online is implemented in Python, or top of the Panda3d engine which uses C++ for performance critical functionality. I believe World of Warcraft has some Lua scripting.
As you can see, there are an incredible number of games written in languages other than C++, and even when C++ is used it's increasingly common for it to be used with another language rather than alone. If you meant 90% of games, you're very obviously outright incorrect -- it would probably be fair to say that "C++ is one of the most popular languages in professional AAA games development", but the games produced by those teams account for far, far less than 90% of games in total.


Perhaps you didn't mean games though? Perhaps you meant all software? I'd be willing to bet that for all software you'd be even more wrong than if you just meant games:
  • Linux is mostly (entirely?) C, not C++.
  • Embedded software is often C or assembly, and there is a lot of it. Some embedded software is C++, or a sub-set there-of, but I'd guess this is probably not the majority. Phones, pagers, smart-fridges/toasters/whatever. Intercom systems. DVD/Blu-ray players. There is embedded software all over the place, and plenty of it is not written in C++.
  • Web-site back ends are very often PHP, or sometimes ASP. Some of them use Python, Ruby, or Pearl. Some of them use Java, or JavaScript. Very few of them use much (if any) C++.
  • Web-site front-ends -- and yes, most of this is just mark-up, which doesn't count, but some of it is programmed logic -- often use some JavaScript, or Flash.
  • A lot of business software is written in Java or (especially in more recent years) C#. There's even a reasonable amount of Visual Basic out there.
  • Plenty of legacy software is written in COBOL. You might also find some Fortran, lots of C, and plenty of weird mixes of various languages.
  • Mathematicians and physicists use a lot of Matlab, and it's also common to find them using Fortran, and not-uncommon to find them using Python.

You're wrong about how much software is written in C++. Educate yourself, stop making such foolish (and easily disproven) claims, and move on.


You also claim that C# is "hardly used". Again, you're outright wrong. Just take a look at the number of jobs available for those with C# experience, and the number of questions being asked about the language in programming communities online. C# is a very popular language that is used extensively in the business world, and that is seeing increasing use for tools and scripting in games development. There are also many indie and hobbyist games developed entirely in C#.

Educate yourself, stop making such foolish (and easily disproven) claims, and move on.


You're entitled to your opinion, and it's absolutely fine if you prefer C++ for your own projects, but stop spreading factually incorrect nonsense as if you believe it to be fact.

Educate yourself.

#11 mhagain   Crossbones+   -  Reputation: 8134

Like
2Likes
Like

Posted 07 August 2012 - 01:31 AM

No, at least not for me.

Looking for game engines lately, I only found C++ stuff, except MOgre which is a C# version of Ogre and Unity3D. Mogre would be a pain in the ass to integrate c++ addon libs (at least for me) and Unity has lots of disadvantages. (like booting crappy Windows etc.)

Not even for small tools it's a good solution, as you would need to ship also the MONO runtime.
There must be some reasons why Mono is not included in Ubuntu, OSX etc.?

Back to C++ coding. Bye,bye RIP C#


I think you'll find that petty tribal bickering coupled with a smug sense of superiority isn't going to get you too far, either here or in the real world. A bad workman blames his tools, but an even worse workman doesn't even take time to properly consider the tools that are available.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#12 jbadams   Senior Staff   -  Reputation: 19018

Like
1Likes
Like

Posted 07 August 2012 - 02:05 AM

Looking for game engines lately, I only found C++ stuff, except MOgre which is a C# version of Ogre and Unity3D

As for this, you might need to practice your searching skills. Searching the DevMaster Engine database for engines that support C# turned up 41 results. Java has 21 results. There are plenty of libraries and engines for languages other than C++, and many of them are very good.

#13 dimitri.adamou   Members   -  Reputation: 329

Like
1Likes
Like

Posted 07 August 2012 - 02:19 AM

I guess someone had a bad day?

#14 Josh Petrie   Moderators   -  Reputation: 3171

Like
2Likes
Like

Posted 07 August 2012 - 09:16 AM

This does not appear to be constructive at all.

Josh Petrie | Game Developer, Undead Labs





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