Skip to main content
GameDev.net gamedev.net
🔒 Locked

Is there any chance of C# bieng adopted by the AAA game studios, as a replacement to C++?

Started by sankrant Nov 30, 2012 at 5:27 PM 64 replies 15.4k views
Original Post
sankrant
sankrant
C++ has a niche in Middleware development. Can C# replace it?
frob
frob
Not only is there a chance, but it has already happened.

Years ago.

Several engines at my studio (EA) are written in C#, or a mix of C# and C++.
sankrant
sankrant
Can you please name a few? It will be very kind of you....
Dynamo_Maestro
Dynamo_Maestro
Why replace C++ why not just use C# and C++ together, I think C++ gets far too much hate these days and C# not enough compliments yet both can be used together efficiently :/
frob
frob

Can you please name a few? It will be very kind of you....

I'm not sure what I can point out without breaking NDA, but it is public knowledge that The Sims 3 used C# for the objects and interactions code, and the SIms3 modding community apparently love it.

I know of three other engines that do, but I can't find references to any of those three on Google so I'm not posting them.

Second Life also used C# for scripting.
frob
frob
Okay, I did find some references to this one in Google as well. The latest Frostbite engine also has C#. That engine has shipped several games.
ApochPiQ
ApochPiQ
The only obstacle to this - and I emphasize only - is adoption by console manufacturers. Until C++ is displaced there, it will continue to be heavily used for major game development that involves consoles.
frob
frob

The only obstacle to this - and I emphasize only - is adoption by console manufacturers. Until C++ is displaced there, it will continue to be heavily used for major game development that involves consoles.
We use mono on the consoles. It is a little more difficult to debug, but not so much more than C# using the various awful debuggers out there.
way2lazy2care
way2lazy2care

We use mono on the consoles. It is a little more difficult to debug, but not so much more than C# using the various awful debuggers out there.

C++ debuggers?
sankrant
sankrant
@frob Frostbite does uses C#; only the game editor is writern in C#, rest pipeline (c++), render engine (c++), etc.
If you have any solid link about, that would be too nice of you...

Also, in sims 3 the main game logic (upper level) is C#, but the core engine (renderer etc) is C++...
sankrant
sankrant
ah, another question, Can I get into functional programming using C#? Laziness, monads, im learning that, it might be helpfull.
ApochPiQ
ApochPiQ
C# has support for some things that are considered staples of functional programming (lexical closures, first class functions, etc.) but it's an eagerly evaluated language so accomplishing true lazy evaluation semantics can be messy. Generally it isn't designed to be programmed in the same way as, say, Haskell. They're just different thought models.
ApochPiQ
ApochPiQ

[quote name='ApochPiQ' timestamp='1354307971' post='5005833']
The only obstacle to this - and I emphasize only - is adoption by console manufacturers. Until C++ is displaced there, it will continue to be heavily used for major game development that involves consoles.
We use mono on the consoles. It is a little more difficult to debug, but not so much more than C# using the various awful debuggers out there.
[/quote]

I've seen mono on... well, let's say, "certain non-PC platforms." It's not terrible - has some ways to go - but the obstacle I perceive isn't technical feasibility, it's political buy-in. Until those tools get first-class status from the manufacturers, C++ will be preferable in many cases, just because it's the path of least resistance.
ddn3
ddn3
C# is used often in middleware since it makes programming GUIs for Windows so much easier. My guess is a significant percentage of middleware development is in C# if their development platform is Windows based ( some arn't ). Good tools engineer use a variety of programming languages to get the job done of course, Python, Ruby, Perl, etc. What'ever works.
sankrant
sankrant
After a kind of resistance in microsoft C# feels like a lag...

Edit : Hey people, I got the answer

No language can replace any other language.
Nothing matches C++ when CREATING a game-engine, and C# is strong at USING that game engine, and tools.
Dynamo_Maestro
Dynamo_Maestro

After a kind of resistance in microsoft C# feels like a lag


What?


Nothing matches C++ when CREATING a game-engine


Maybe for you this is the case, but others have quite happily created their engine either mixing C++ in their code or created purely in some other language WITHOUT issues.
sankrant
sankrant

[quote name='sankrant' timestamp='1354331415' post='5005927']
After a kind of resistance in microsoft C# feels like a lag


What?


Nothing matches C++ when CREATING a game-engine


Maybe for you this is the case, but others have quite happily created their engine either mixing C++ in their code or created purely in some other language WITHOUT issues.
[/quote]

Other than C++? I like Haskell. Working on mastering it
3Ddreamer
3Ddreamer
The C# use in AAA games will only increase, is my prediction based on the high quality of the language and the crop of C# programmers which will come to maturity in their fields in the coming years. The .Net Framework is here to stay and C# is the core of it - make no mistake about capabilities, too.


Clinton
Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order. </p
ChaosEngine
ChaosEngine

The .Net Framework is here to stay and C# is the core of it


I hope this is the case, but I'm not as confident as you are. MS are no longer pushing .net the way they were. Look at the failure of WPF, and the subsequent return to C++ in winRT.

I know these aren't related to games directly, but this is microsofts bread and butter. If it's not working for them there, you have to wonder if they'll continue to push .net.

Personally I hope they do, as C# is a much nicer language to work in that C++.
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
3Ddreamer
3Ddreamer
That's true, yet we have the limit of being on the outside of major decision making. Several years ago or more, OpenGL was surging and some people were complaining about DirectX and wondering if MS was getting ready to either kill support or starve it to death. Both OpenGL and DirectX are going strong now.

Here is why the OpenGL to DirectX comparison is relevant to .NET Framework: Cross-platform needs have given increased demand for OpenGL and derivative technologies from Google, Apple, Sony, Samsung, and others - mobile devices - mainly laptops, tablets, and smartphones. This puts pressure on Microsoft to find ways to compete indirectly against OpenGL and Linux related tech. They chose .NET Framework as the mainstream for Windows application development with their flagship C# language with huge investments in money, time, talent, and reputation. They knew that they could not compete with OpenGL in quantity of market segments so they focused on quality of Windows based development and implementation.

It is much more cost effective to improve existing technologies rather than replace the whole .NET Framework fleet with another huge set of them. I believe there is evidence to consider that the Great Recession caused a temporary market saturation of .NET Framework software, applications, and end user devices during the economic downturn. Microsoft is able to track such trends with fairly good accuracy in most market segments, though the gaming industry seems to be one of the least predictable. At the time, they prioritized because of market uncertainty.

The .NET Framework has kept pace with DirectX progress. Hardware, third-party software, and chip architecture is interdependent on stable technologies of low level APIs such as DirectX and OpenGL to interface applications, from a marketing standpoint. As the frameworks have matured in growth, there is less to accomplish in innovations so most support involves customer implementation demands (such as shader upgrades), hardware compatibility, and backward compatibility. The frameworks matured so they are generally self-sustaining and needing less support. Each framework fork maintains its role in the marketplace, so why upset the flow? The .NET Framework is technologically mature and Microsoft depends on it in many ways.

The popularity of .NET with developers means that it needs to be "pushed" less. You are right about other technologies getting major effort, such as new mobiles, NVIDIA partnership, and the famous (or infamous, depending on your love or hate of MS) online store. Now the strategy of Microsoft is to get the return on their investments by these areas.

Massive sets of technologies are not easy to develop, change, or eliminate. Customers and partners depend on .NET Framework. The efficiency of development in the framework is popular. Microsoft is harvesting the crop now which grew from .NET investment of more than a decade.

More energy is now focused on marketing the products from existing technologies in this improving economic cycle, like a surfer catching the next incoming wave - good strategy for Microsoft and other companies. This is what you see actually happening.


Clinton
Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order. </p

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.