Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Why is c# bad for games dev?

Discussion in 'General Discussion' started by Deleted User, Feb 2, 2010.

  1. Deleted User

    Deleted User

    Guest

    I've seen a lot of people, of which some are my friends, who keep whining and telling me how bad c# is for developing games, javascript (unityscript) too and that c++ is best.
    I know that c++ is very good and is the way to go for AAA games, but why do people say that c# and unityscript (javascript) suck?
    Or are they just jealous kids and it is possible to make good games (graphically) with c#/ js (basically with Unity)?
     
  2. KaelisAsur

    KaelisAsur

    Joined:
    Apr 9, 2009
    Posts:
    361
    Someone who 'keeps whining' about a language probably shouldnt be regarded as an authority on the matter.

    From my experience, people who 'whine' about a certain language are more often than not either (or both):
    a) biased fans of the other option (c++ in this example)
    b) unacquainted with the language in question

    I started with C++ myself and for a long while i thought its the way to go and C# is inferior. Until i actually had to learn C#. Now i dont want to touch C++ ever again. Which is not to say thay that C# is somehow better, i just prefer it over C++.

    To compare, C++ is simply lower-level than C#. This means you have more control, more power if you will, particularly as far as computational efficiency and optimization is concerned. But at the cost of having to do more coding. Due to its higher level of abstraction, C# does much more for you, which simply means less work. The same is true for JavaScript.

    C++ isnt 'very good'. Its different. It has different characteristics and qualities, as every language does. As far as i know, the reason why it is said that C++ is the best choice for AAA games is because of being low-level (which lends well to optimization efforts) while at the same time being one of the most common languages.

    The only valid reasons i can think of:
    a) in certain circumstances (ie. computationally intensive calculations) C++ will usually be faster than C#/JS.
    b) perhaps because C#, due to its higher level of abstraction, can cause some bad programming habits
    c) perhaps because there are more resources for C++ than C#.

    As far as Unity and most other 3d engines/libraries are considered, graphic power has nothing to do with the language used for programming the game. Just being able to use Unity together with C++ or any other language out there would not give you better graphics.
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I'm sorry to say so but b) is definitely no valid

    If something lends to very bad habbits and inacceptable code then its if the language is as open (broken?) as C++, where you to do things in 10+ different ways and is used by users that think that it is required to use them and other highly optimized hacking around instead of a clean, well designed, maintainable code base.

    I've never seen such blatant ignorance towards even basics of coding and "good practice" as when working with C++, which is very annoying, because aside of ASM and C, nothing can fail as badly as C++ when being hacked together badly thanks to the unprotected pointer environment.

    Its true that it low level access gives major power, but with that amount of power, there normally also comes responsibility for not hacking together a pile of poo just "because you can" ;)
     
  4. KaelisAsur

    KaelisAsur

    Joined:
    Apr 9, 2009
    Posts:
    361
    Thats why i said 'perhaps' - ive just seen people talking about it, but i myself actually share your opinion. Just the whole mess with headers makes me shudder.

    But this comes with the lower level of abstraction - its not just C++ thats like that, afaik most low-level languages have this problem. I find that the higher-level language is, the easier it is to maintain the project, if only because theres less code.
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The higher maintainability and stability are one of the main reasons the higher level languages were designed, aside of the desire to overcome the low level bindings I guess.

    I don't think its a common problem with low level languages though.
    C kind of is not even half as bad.

    To me the problem is more that C++ looks and behaves like C with several hundred half baken, independent and non-synergetic additions "plugged ontop", designed to allow any code, independent of how broken and badly hacked together, to run and to always offer the a halfbaken+ version of "state of the art OO design methods"
    Thats where Eiffel, Java and C# clearly show that their designers learned the lessons from C++. The languages were designed consistently with things work hand in hand, in a uniform, stable, maintainable way.
     
    jtsmith1287 likes this.
  6. Deleted User

    Deleted User

    Guest

    Thanks for answers.

    Yes, c++ is faster and that's why many people prefer it over others. It has a good graphics library, which is another reason.

    I too think that C# and javascript as well are way easier to use. They're more user friendly, just like Unity's API is powerful but easy to use compared to some other game engines.
    Also, it's the matter of taste. For e.g. if I was using c++ for years instead of c#, javascript, java etc., then of course I'd be more into c++ instead of other languages, but that's just me :D

    I don't care what languages I use though, all of them are good enough for me lol.
     
  7. KaelisAsur

    KaelisAsur

    Joined:
    Apr 9, 2009
    Posts:
    361
    C++ is not generally faster. It CAN be faster in specific circumstances, but it wont be ALWAYS faster (in some cases it might be even slower, since C# is automatically optimized), it depends on many factors.

    What graphics library do you mean?

    Both C++ and C# have plenty of good graphics libraries.

    So if you basically knew the answer anyway, why the question?
     
  8. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Probably because they believe they have to develop their own game engine to be "real men (tm)". Which, IMHO, may be a pretty cool attitude if you're one of the Unity devs (exchange the "real men" motivation with "democratizing game development" for them; I have great respect for the Unity devs and am very glad they *wanted* to create a game engine and also followed through with that project) ... but ... anyways ... if your primary goal is to develop a game (and not a game engine), it's just plain stupid to even consider C++ as language for development (and consider creating your own game engine). Except for maybe very limited parts of the game (that's what Unity Pro's native plugin feature is for ;-) ).

    I think for developing a game engine, there's not much you can do except using C++ - after all that's what Unity is implemented in for the greatest part. But today's reality is that when you want to develop a game, you don't create a game engine for that. Instead you use an existing one ... like ... Unity, for instance ;-)

    And for coding the game logic, C++ is not a good idea at all for the reasons others have already mentioned. There's also not a single good argument for using C++ for game logic, as game logic is not something that has to run super-low-level. Game logic is something that runs embedded in your game engine. And for that purpose, you use the language that is most efficient from the *coding* perspective (in contrast to "most efficient from the execution perspective"). And languages like Java, C# and the like ("high-level languages") are extremely efficient from the coding perspective because you don't waste weeks trying to find out stupid memory leaks or malformed pointers or other crazy stuff. Well ... at least ... most of the time ;-)

    I'd say they simply missed what has happened on the marked during the last 5 years.
     
  9. Deleted User

    Deleted User

    Guest

    I don't know, I was talking about unity the other day on other forum and some guys started picking on me that c++ has such great graphic libraries and c# doesn't etc.

    I don't know the answer. I know nothing at all about c++, I never used it, that's why I posted this topic :D
     
  10. Deleted User

    Deleted User

    Guest

    EDIT:

    What the hell, why did it double post. I only clicked once o.o

    sorry.
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    There are much more engines for C++ than for C#, thats true.
    But that does not mean much, as aside of the engine programmers nobody has to use C++, even with multi hundred thousands engine, the designers and game logic developers are primarily working within script languages ( lua - python - ruby - own thing ), as no engine developer will be pleased to see "noobs" hack around in critical sections ;)

    For C# there are enough powerfull engines too by the way, some of which a C++ user will never be able to use.
     
  12. Deleted User

    Deleted User

    Guest

    ahahaha, I nearly pooped my pants laughing when I read that lol.
    It's EXACTLY what some of the guys over at the other forum are doing. When I show off some pictures of games I make with Unity, they always come and start picking on me because I use Unity and not my own game engine, that I should write my own engine etc.
    That's exactly what they're doing, they're making their own game engines in c++ to make a game. They keep calling Unity "S***", but when I ask what is so "S***ty" about it, and to give me at least one example, then they stop until next time I show something off lol.
     
  13. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    OMG! Poor souls ... but I'm afraid you won't be able to save them. See, in their eyes, you're not "a real man (tm)". :D
     
  14. oxl

    oxl

    Joined:
    Nov 21, 2008
    Posts:
    325
    Just go on making a game with C# / Unity and let your friends developing their engine.

    Talk to them again in 6 month or so.

    Priceless.
    --
    oxl
     
    jtsmith1287 likes this.
  15. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    Tell your friends that "Real Men" would write their engine bit by bit in straight up binary or at least in asm instructions, and that they should get working on that ASAP....

    You're more likely to be an iphone millionaire by the time they're done, but they certainly will have a fast engine when it finally works. :D
     
  16. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    @jashan - I"m afraid I have to disagree with you... "real men (tm)" use assembler (C++ is for those poor ignorant souls who can't get their head around how computers actually work... slow as h#ll if you ask me :p )

    Anyone want a pointer to some statistics showing Java (TM) out performing c++? :twisted:

    @ djoscard - Kidding aside, if someone tells you that you have to "do it from scratch" for "it to be real" and then quotes an approach that leverages another abstracted layer as better... well. :roll: draw your own conclusions...

    Cheers,

    Galen
     
  17. WinningGuy

    WinningGuy

    Joined:
    Aug 10, 2009
    Posts:
    884
    Too bad it will take so long that their fast engine would be considered archaic by the time they were done!
     
  18. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Ah, you're right, of course. Forgive my ignorance. But seriously, *real* real men ... I mean, the really real ones (realer then real, so-to-say) ... use ... um ... punchcards for their assembler-development, of course! I mean, using keyboards and monitors is really for the feeble, isn't it?
     
  19. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Ahh my friend, one day we must heat up some vacuum tubes and wax philosophic over better times!

    Grok me?

    ACK?
     
  20. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
    With c# you do have access to the direct x API

    1: XNA

    2: The new Windows API Code Pack which has
    direct x 11 support

    3: Slim direct x unofficial API.

    I think that it is defiantly theoretically possible to use c# as your core language. That said I do not think that C# will overtake c++ anytime soon in game dev. Maybe after windows is written in c#. Until then C++ has more libraries and a strong foundation.

    Sometimes I feel like I want the power of c++ but then I remember what a mess the language really is. One thing to remember is that you are likely to get slightly biased answers on this forum. Still c# is the only core language other then c++ right now that is a valid game development language.
     
  21. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    ack! 8)
     
  22. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    Hope the point that Unity is written in C++ isn't lost on anyone here.

    So, this isn't C# vs. C++. It's the comparison of making games from scratch including the basic engine for graphics vs. using a middleware solution like Unity.

    Depends on what you are trying to accomplish, but if you are in a small group of amateurs or a single developer working on a cutting edge game, I hope you choose something like Unity or we won't be hearing from you for awhile. :D
     
  23. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    Sounds like your friends are one of two things:

    1. Super game engine nerds that are mainly interested in the low level aspects of game engine design.

    or

    2. Uninformed on how much more productive they could be by using Unity (or any other 3rd party game engine for that matter).

    The game engine is a tool you use to create the games you want to make. Do they forge their own hammers when they have nails to pound?
     
  24. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    Punchcards!? No way. I find that they abstract me too far from the actual machine. My preferred method of programming involves patch cables and switches. Programming languages are for pussys.
     
  25. Deleted User

    Deleted User

    Guest

    Well they're not my "friends", but just people I know for few years on other forums.
    Yes they are super nerds. They're like 16-17 and have 9-10 years programming experience..
    But they're acting like such losers, like they know everything and they're Gods. Everyone else is wrong but they're right. Every time someone posts a topic, you can except one of them to come and post something negative about it rofl.

    @ The guy above your post.

    I don't have team and I'm not even thinking of changing to c++ lol. I like C#/ unityscript and Unity engine too much :)
     
  26. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    I'm 39 and have 30 years programming experience.:wink: My suggestion, just ignore them if you can.
     
  27. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    I don't know nearly enough about any of this to know why this is. Would writing Unity in a different language allow it to be more maintainable? Would it make it unmarketable as a game engine due to a reduction of performance? Is it only written in C++ because an alternative would destroy multiple-platform compatibility?
     
  28. Redbeer

    Redbeer

    Joined:
    Nov 1, 2009
    Posts:
    402
    Excellent point, I should have said a highly "optimized" engine. :D

    With regards to other posts, yeah, everyone else is spot on, I've been programming since I was about 10, which was 1982 (eek), and while learning C++ is a valuable skill, in the end the game you make is all that matters and you can absolutely make a great game, in just about any language.

    The final product and how well it's received (liked) and how well it sells, is all that matters in the end. A highly optimized engine that never sees the light of day, or never turns into a fun and engaging game, isn't worth very much.
     
  29. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
    a: Unity is written in C++ and you can use c++ plugins

    b: 16-17 years olds are too young. I do not care how much experience they think they have.

    c: c# can be used as a core language at least theoretically. Visual 3d is a good example (but their API sucks right now).
     
  30. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    If you want to show people how far you can go with C# as core language, I would normally point towards NeoAxis.
    Also shuts the noobs down as its renderer is OGRE based.

    Alternatively take TorqueX 3D / Visual 3D if you have XNA nerds hunting you ;)
     
  31. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
    a: It would almost certainly reduce performance. How much would depend on the algorithms / optimization.

    b: Unity uses mono not c# so you do not get any of the following APIs. C# .net is windows only.

    1: XNA

    2: The new Windows API Code Pack which has
    direct x 11 support

    3: Slim direct x unofficial API.

    c: At this point it is a waste of time
     
  32. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    HA! Hell son, why don't you just build a babbage machine and be done with it! :D

    @ djoscard - I think the underlying message of the "semi-serious" humor responses is there is always a "lower level". For anyone who knows, there are always alternatives, trade-offs, and workarounds. But there in lies the secret ... "anyone who knows" if someone claims an absolute that doesn't pertain to the laws of physics (and even at that it should be qualified with "as far as we know now") the simply don't know....

    can c# be optimized to run as fast or faster than c++? short answer: yes, long answer (more questions.... )

    do your friends write their own compilers, or rely on others (kind of a soft approach if you ask me :) )

    Cheers,

    Galen
     
  33. KaelisAsur

    KaelisAsur

    Joined:
    Apr 9, 2009
    Posts:
    361
    Um, Ogre is written in C++. So if NeoAxis uses Ogre as a renderer, then C# is hardly its core language..

    I believe Axiom is a C# port of Ogre. A few other engines written in C# are Visual3d, Irrlicht.Net (i think), and Xen.

    I dont know about you but im writing my scripts in C# alright :p

    I guess you meant 'Unity uses mono not .NET'.

    Also, there are Mono bindings for XNA. Not sure about Slimdx.
     
  34. bpatters

    bpatters

    Joined:
    Oct 5, 2009
    Posts:
    164


    Your core game engine will need to be C++ for many years to come. However unless you just like writing Engine functions and not games I'd stick with a GAME language which is essentially the language offered by whatever ENGINE your using.

    C++ is significantly faster than C# except in very specific *small scoped* scenarios where they compare equally.

    The Productivity of C# is significantly higher than C++ which is why it's preferred if the performance is acceptable, which it is for most game logic.
     
  35. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
    I do not buy it I think that the performance difference between c# and c++ is more based on memory management then on native vs managed code. The closer you get to the hardware the more c++ makes senses. Or with specific algorithms that are problematic.

    I will say it again visual3d and other engines have been written in c# .net and have had arguably better graphics then unity for years (but not the ease of use). I do not see any reason that c# is not theoretically a viable core language. You also have a lot of indie games using XNA. Nevertheless, your right I do not see c++ going away anytime soon.

    I would be surprised if in 10 years c# was not commonly used as a core language at least on Windows.
     
  36. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    Use the best tool for the job, or if you can't or you don't have time to learn, use the tool you know best.

    The hardest part is certainly not picking the tool. :D
     
  37. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    Alright guys.
    Let me point something out. Unless you are a C++ master you will not see any speed deference between C# and C++. In fact, a non-optimized C++ app could be run quite slower (even slower than lots of high-level languages. And this is the case most of the time. Only theses ho really master C++ can get advantages of the (non-noticeable) speed vs C#.
    However, believe me, this is not what game engine programmers are looking for most of the time. The main reason behind C++ is because is quite critical and useful to control everything. I mean, with c++ you know when and how your stuff destroys. You have more power (but not speed). As i say, to see something noticeable you have to really master C++, game engine design, etc. Is not the speed whats really matters, is the power behind.
    However (in my opinion), as lot of people already pointed out, C# still a better language in overall. C# is pretty well designed to not make theses horrible C++ mistakes.
    Now why is Unity using C# as the main scripting language? Well, it compiles to JIT code, it runs 20x times than any other scripting interpreted language and there is nothing better for scripting in Unity.
    In my case, i do prefer C# over Unity's JavaScript 100 times. Is cleaner, well structured and now having Visual Studio support is even better! Is a dream working with Unity and C#.
    My two cents.
    Cheers, :)
     
  38. bpatters

    bpatters

    Joined:
    Oct 5, 2009
    Posts:
    164

    Sorry but that's just not true at all. C++ is significantly faster than C# even for beginner C++ programmers.

    C++ is significantly harder to develop with, and significantly more time consuming to write, however the code generally runs 2-3x faster than C# code for anything of reasonable complexity.


    Garbage collection based languages just cannot compete with native C++ languages on the performance end of things unless your writing something super basic.

    Saying C++ is slower than C# is just silly and completely false. Badly written code is badly written code period. But if you take the same badly written code in C++ and in C# the c++ version will still outperform the C# version significantly.

    You could never write something like Unity in C# and get any reasonable level performance out of it. The core routines need to be in C/C++ to perform adequately. In fact some portions of code are even written in assembler to get that last ounce of speed out of the game engine. Game logic and other AI type activities can be written in C#, and should be written in C# in my opinion.
     
  39. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    I spent a couple years working in C++, and if you know what you're doing, you can work just as fast in C++ as C#. Getting to the point you know what you're doing with C++ can be a road fraught with peril though.

    C# is like a hammer with a nail holder that makes it hard to whack your thumb. C++ makes you hold the nail and rely on your hammering skill to prevent accidents. C# is ok, but I'd be a lot happier working in C++. Sometimes I miss templates and multiple inheritance with an intensity that makes my bones ache. Generics are a poor substitute.

    Performance-wise, for most gameplay code, I don't really think there's a huge difference, if you've written your C# code well.

    If I got to pick a scripting language for Unity, that would be Lua, which is even slower than C#, but lends itself well to describing dynamically configured objects in a world.
     
  40. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    I never say that C++ is slower than C#, what i say is that a badly and un-optimized C++ code(in terms of memory maneagement) could be slower than a C# code. And is true that you have to master C++ to really see big differences compared to others languages when coding a game engine, not a single app.
     
  41. Deleted User

    Deleted User

    Guest

    Eeeks, a lot of views and posts :eek:

    Thanks for useful replies ;)
     
  42. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    Anything even tangentially related to religion always makes for a popular thread.
     
  43. kevinr

    kevinr

    Joined:
    Jul 24, 2008
    Posts:
    263
    These same arguments were brought up when C was the standard and C++ started to creep into play. And we all know how that ended up.

    You can find benchmarks fairly easily to decide if your project is feasible. Just because C++ can execute instructions faster that C# doesn't mean that your game will run any faster. You just need to be able to produce a suitable FPS for your game. Even if in C# you could only produce 80fps vs 1000 with C++, to the player the game would look exactly the same.

    But the point is moot when it comes to what platform you are looking to support. Obviously if you want to target PS3, you're not going to be programming in C#. But far as the future goes, I'd imagine the next XBox will be strongly based on XNA.

    But garbage collection issues can be avoided by utilizing object pooling. You increase performance in a number of ways. You don't have to worry about freezeups from the garbage collector, because it won't collect. You also don't have to keep allocating new memory and instantiate the same objects again and again. This is a life saver and a necessity on the iPhone, because you really can't be instantiating new objects of any size during gameplay.
     
  44. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Not true. Battery.
     
  45. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    Oh, damn thee, mobile computing devices!
     
  46. kevinr

    kevinr

    Joined:
    Jul 24, 2008
    Posts:
    263
    Plug it in. :p

    True, but you have less choice over tools when it comes to mobile devices, so the OPs question typically doesn't even apply.
     
  47. bpatters

    bpatters

    Joined:
    Oct 5, 2009
    Posts:
    164
    Absolutely. There is definitely a time and place for each language. I like C# when it's appropriate because it's a lot more productive than C++ in a lot of ways.

    Sorry but pooling is not the golden egg in this scenario. The major problems with garbage collection are not large reusable objects but lots of small objects that you can't practically reuse. Additionally there are lots of immutable objects that you cannot pool and reuse at all in most managed languages.

    String are an excellent example. The fact is it's very difficult to write any program of reasonable complexity in a Garbage collected language that compares favorably to C++ because of these kinds of issues. C# does have a very very strong advantage to something like Java though since C# has struct data types to make use of the stack effectively to minimize garbage collection.

    I'm not arguing that C++ should always be used, if you read my posts I was mainly refuting the statements that C# is faster than C++ and there isn't any reason for C++.

    Personally I use whatever language is best when balancing performance and productivity. For Game creation C# etc is just fine, for engine development I don't think C# is a good choice.
     
  48. kevinr

    kevinr

    Joined:
    Jul 24, 2008
    Posts:
    263

    Yea, you do make a lot of good points. But you still have to agree that if we look past the general overhead, garbage collectors have improved immensely over the years and continue to be optimized. On Windows, where the OS is highly wrapped around it's managed framework, it seems that the garbage collector would have a better view of the system as a whole, compared to what you're able to see from within a specific application. It can delay deallocation to times where no other services are putting a strain on the system.

    The GC isn't going to start churning on you unless you are throwing it huge chunks of now unreferenced memory. The small stuff should be kept up with just fine. Provided we are talking about a platform that is designed and tuned for managed applications. It's not going to wait till memory is maxed out and then deallocate everything, essentially locking up the system. It's going to be deallocating small chunks in a background process. In the end, there is an overhead to all this, that doesn't quite match the performance compared to something unmanaged, but it's probably close enough to not be a show stopper. Although I'd never write an engine from scratch either way. There really isn't enough time in the day to write your own engine and write your own games, imho. At least not if you are doing it as an independent and what to also make money doing it.
     
  49. MadMax

    MadMax

    Joined:
    Aug 5, 2009
    Posts:
    203
    I believe that Parallelism is also going to be on the side of C# going into the future. C# 3.0 and 4.0 have both been moving in this direction.

    Not that long ago C was the language of game development and before that assembly, mainstream AAA games no longer use assembly and rarely use C. C++ will go the same way over the next decade. It will never really go away it just will no longer be mainstream.

    Programmers also need to move away from computer science and become software engineers. Implementation vs theory is largely lost on most.
     
  50. longshot

    longshot

    Joined:
    Sep 24, 2009
    Posts:
    71
    There are still a decent amount of mainstream AAA games written in pure C. Just from what I know of the Los Angeles dev scene, Infinity Ward is a pure C shop, and so is Insomniac.

    However, that is somewhat off-topic. I think C# is good enough for the kinds of games that people reading this forum are likely to make.

    For AAA game development, C# isn't likely to take over from C++ anytime soon.

    The main issue with C# is that it tries to be a safe language, which is great for programmer productivity( don't have to worry about crashes/weird errors because you went out of the bounds of an array ), but comes at a substantial cost. Array accesses in C# are obnoxiously slow, and you get similar slow downs for most data structures.

    Not really a problem, until you need to code something like A*. An extremely well written implementation of A* in pure C# will never come close to a mediocrely written one in C/C++ in terms of performance.

    For most people however on this board however, a second best version of A* is probably good enough, these are only really issues for AAA game development, where you are required to push the envelope.